diff options
author | Bruce A. Mah <bmah@FreeBSD.org> | 2002-12-04 16:50:04 +0000 |
---|---|---|
committer | Bruce A. Mah <bmah@FreeBSD.org> | 2002-12-04 16:50:04 +0000 |
commit | 80afc7818f699f0c2bd3c1164f9c8d88ea85ef19 (patch) | |
tree | 61334614ae3ac483566764e7a348012fe4e2e41a /lang/perl5.6 | |
parent | cd6f6ad6c84c37ad170068ac6fb47a43c218bd9d (diff) | |
download | ports-80afc7818f699f0c2bd3c1164f9c8d88ea85ef19.tar.gz ports-80afc7818f699f0c2bd3c1164f9c8d88ea85ef19.zip |
Notes
Diffstat (limited to 'lang/perl5.6')
-rw-r--r-- | lang/perl5.6/Makefile | 10 | ||||
-rw-r--r-- | lang/perl5.6/files/use.perl | 18 | ||||
-rw-r--r-- | lang/perl5.6/pkg-install | 9 |
3 files changed, 31 insertions, 6 deletions
diff --git a/lang/perl5.6/Makefile b/lang/perl5.6/Makefile index 127b1d3f1dc2..16a684ea8990 100644 --- a/lang/perl5.6/Makefile +++ b/lang/perl5.6/Makefile @@ -7,7 +7,7 @@ PORTNAME= perl PORTVERSION= ${PERL_VER} -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= lang devel perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN} \ ${MASTER_SITE_LOCAL:S/$/:local/} @@ -56,6 +56,10 @@ INCLUDEDIR= /usr/include .include <bsd.port.pre.mk> +.if ${OSVERSION} >= 500043 +PKGMESSAGE= ${PKGDIR}/.not-here +.endif + MAN1= a2p.1 c2ph.1 dprofpp.1 find2perl.1 h2ph.1 h2xs.1 perl.1 \ perl5004delta.1 perl5005delta.1 perlaix.1 perlamiga.1 \ perlapi.1 perlapio.1 perlbook.1 perlboot.1 perlbot.1 \ @@ -161,6 +165,10 @@ post-install: ${BSDPAN_WRKSRC}/${file} ${BSDPAN_DEST}/${file} .endfor @(cd ${INCLUDEDIR} && ${PREFIX}/bin/h2ph *.h machine/*.h sys/*.h) +.if ${OSVERSION} < 500043 @fmt ${PKGMESSAGE} +.else + @${PREFIX}/bin/use.perl port +.endif .include <bsd.port.post.mk> diff --git a/lang/perl5.6/files/use.perl b/lang/perl5.6/files/use.perl index bed88bd46d44..0853b08da0a4 100644 --- a/lang/perl5.6/files/use.perl +++ b/lang/perl5.6/files/use.perl @@ -17,8 +17,6 @@ EOF my $port_perl = '%%PREFIX%%/bin/perl'; $port_perl =~ tr|/|/|s; -my $ident = `/usr/bin/ident -q /usr/bin/perl5`; - @ARGV == 1 or usage(); if ($ARGV[0] eq 'port') { switch_to_port(); @@ -43,6 +41,7 @@ sub switch_to_system link '/usr/bin/perl5', '/usr/bin/perl'; link '/usr/bin/perl5', '/usr/bin/perl%%PERL_VERSION%%'; + my $ident = `/usr/bin/ident -q /usr/bin/perl5`; if ($ident =~ m#src/usr.bin/perl/perl.c#) { link '/usr/bin/perl5', '/usr/bin/suidperl'; } else { @@ -81,10 +80,18 @@ sub switch_to_port { # protect against cases where people use PREFIX=/usr if ($port_perl ne '/usr/bin/perl') { - if ($ident =~ m#src/usr.bin/perl/perl.c#) { - rename '/usr/bin/perl', '/usr/bin/perl-wrapper'; + + my $need_perl5_link; + if (-e "/usr/bin/perl5" && !-l "/usr/bin/perl5") { + my $ident = `/usr/bin/ident -q /usr/bin/perl5`; + if ($ident =~ m#src/usr.bin/perl/perl.c#) { + rename '/usr/bin/perl', '/usr/bin/perl-wrapper'; + } else { + unlink '/usr/bin/perl'; + } } else { - unlink '/usr/bin/perl'; + unlink "/usr/bin/perl5"; + $need_perl5_link = 1; } unlink '/usr/bin/suidperl', '/usr/bin/perl%%PERL_VERSION%%'; @@ -92,6 +99,7 @@ sub switch_to_port symlink '%%PREFIX%%/bin/perl', '/usr/bin/perl'; symlink '%%PREFIX%%/bin/suidperl', '/usr/bin/suidperl'; symlink '%%PREFIX%%/bin/perl', '/usr/bin/perl%%PERL_VERSION%%'; + symlink '%%PREFIX%%/bin/perl', '/usr/bin/perl5' if $need_perl5_link; } open MK, ">> /etc/make.conf" or die "/etc/make.conf: $!"; diff --git a/lang/perl5.6/pkg-install b/lang/perl5.6/pkg-install index 47fee558c9ae..46b4ae82fab1 100644 --- a/lang/perl5.6/pkg-install +++ b/lang/perl5.6/pkg-install @@ -9,5 +9,14 @@ INCLUDEDIR=/usr/include install -d ${PKG_PREFIX}/lib/perl5/site_perl/5.6.1/mach cd ${INCLUDEDIR} && ${PKG_PREFIX}/bin/h2ph *.h machine/*.h sys/*.h +if [ -f /sbin/sysctl -a -x /sbin/sysctl ] ; then + osreldate=`/sbin/sysctl -n kern.osreldate` +else + osreldate=`/usr/sbin/sysctl -n kern.osreldate` +fi + +if [ $osreldate -ge 500043 ] ; then + ${PKG_PREFIX}/bin/use.perl port +fi exit 0 |