aboutsummaryrefslogtreecommitdiff
path: root/lang/perl5.6
diff options
context:
space:
mode:
authorAnton Berezin <tobez@FreeBSD.org>2001-12-19 17:05:05 +0000
committerAnton Berezin <tobez@FreeBSD.org>2001-12-19 17:05:05 +0000
commitfb226407ee460453e08f0c16d1ed0ff4cfe74ebf (patch)
tree0e8598e113256b87911f26ff4e0b6f11b2b9af59 /lang/perl5.6
parentc863b8e94ad8b6c357010a9049de0a83407206c3 (diff)
downloadports-fb226407ee460453e08f0c16d1ed0ff4cfe74ebf.tar.gz
ports-fb226407ee460453e08f0c16d1ed0ff4cfe74ebf.zip
Notes
Diffstat (limited to 'lang/perl5.6')
-rw-r--r--lang/perl5.6/Makefile37
-rw-r--r--lang/perl5.6/distinfo1
-rw-r--r--lang/perl5.6/files/use.perl82
-rw-r--r--lang/perl5.6/pkg-descr6
-rw-r--r--lang/perl5.6/pkg-install4
-rw-r--r--lang/perl5.6/pkg-message22
-rw-r--r--lang/perl5.6/pkg-plist6
7 files changed, 142 insertions, 16 deletions
diff --git a/lang/perl5.6/Makefile b/lang/perl5.6/Makefile
index 3982ac9c2780..4f6e1b718cfc 100644
--- a/lang/perl5.6/Makefile
+++ b/lang/perl5.6/Makefile
@@ -7,13 +7,19 @@
PORTNAME= perl
PORTVERSION= ${PERL_VER}
+PORTREVISION= 1
CATEGORIES= lang devel perl5
-MASTER_SITES= ${MASTER_SITE_PERL_CPAN:S|/modules/by-module|/src|}
+# If you don't use MASTER_SITE_OVERRIDE set to one of the
+# ftp.FreeBSD.org mirrors, fetching will be *very* slow.
+MASTER_SITES= ${MASTER_SITE_LOCAL} ${MASTER_SITE_PERL_CPAN}
+MASTER_SITE_SUBDIR= ../../src tobez
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} BSDPAN-${PORTVERSION}${EXTRACT_SUFX}
MAINTAINER= tobez@FreeBSD.org
-# This will need to be "fixed" in ../../Mk/bsd.port.mk as well.
PERL_VER= 5.6.1
+PERL_ARCH= mach
+PERL_VERSION= ${PERL_VER}
HAS_CONFIGURE= yes
CONFIGURE_SCRIPT=Configure
@@ -23,18 +29,13 @@ CONFIGURE_ARGS= -sde -Dprefix=${PREFIX} \
-Dman3dir=${PREFIX}/lib/perl5/${PERL_VER}/man/man3 \
-Dsitearch=${PREFIX}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH} \
-Dsitelib=${PREFIX}/lib/perl5/site_perl/${PERL_VER} \
- -Ui_gdbm
+ -Ui_gdbm -Ui_malloc -Dccflags=-DAPPLLIB_EXP=\"${BSDPAN_DEST}\"
INSTALLS_SHLIB= yes
INCLUDEDIR= /usr/include
.include <bsd.port.pre.mk>
-# If you know what you are doing, you may disable this!
-.if ${OSVERSION} > 300003
-FORBIDDEN= perl is in system
-.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 \
@@ -112,10 +113,30 @@ MAN3PREFIX= ${PREFIX}/lib/perl5/${PERL_VER}
test:
@(cd ${WRKSRC}; make test)
+BSDPAN_DEST= ${PREFIX}/lib/perl5/${PERL_VER}/BSDPAN
+BSDPAN_FILES= BSDPAN.pm BSDPAN/Override.pm Config.pm \
+ ExtUtils/MM_Unix.pm ExtUtils/Packlist.pm
+BSDPAN_WRKSRC= ${WRKDIR}/BSDPAN-${PORTVERSION}
+
+post-patch:
+ ${CP} ${FILESDIR}/use.perl ${WRKDIR}
+ ${PERL} -pi -e 's|%%PREFIX%%|${PREFIX}|g;' \
+ -e 's|%%PERL_VER%%|${PERL_VER}|g;' \
+ -e 's|%%PERL_VERSION%%|${PERL_VERSION}|g;' \
+ -e 's|%%PERL_ARCH%%|${PERL_ARCH}|g;' \
+ ${WRKDIR}/use.perl
+
post-install:
@strip ${PREFIX}/bin/perl ${PREFIX}/bin/suidperl
@${LN} -sf ${PREFIX}/bin/perl ${PREFIX}/bin/perl5
@${LN} -sf ${PREFIX}/bin/perl ${PREFIX}/bin/perl${PERL_VER}
+ ${INSTALL_SCRIPT} ${WRKDIR}/use.perl ${PREFIX}/bin/use.perl
+.for file in ${BSDPAN_FILES}
+ ${MKDIR} ${BSDPAN_DEST}/${file:H}
+ ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
+ ${BSDPAN_WRKSRC}/${file} ${BSDPAN_DEST}/${file}
+.endfor
@(cd ${INCLUDEDIR} && ${PREFIX}/bin/h2ph *.h machine/*.h sys/*.h)
+ @fmt ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/lang/perl5.6/distinfo b/lang/perl5.6/distinfo
index 06a932104bc7..366f0ccc3a75 100644
--- a/lang/perl5.6/distinfo
+++ b/lang/perl5.6/distinfo
@@ -1 +1,2 @@
MD5 (perl-5.6.1.tar.gz) = ec1ff15464809b562aecfaa2e65edba6
+MD5 (BSDPAN-5.6.1.tar.gz) = 2e80d385547ac4a9e0d8360c943ad155
diff --git a/lang/perl5.6/files/use.perl b/lang/perl5.6/files/use.perl
new file mode 100644
index 000000000000..4bd8fdef66d1
--- /dev/null
+++ b/lang/perl5.6/files/use.perl
@@ -0,0 +1,82 @@
+#! /usr/bin/perl5 -w
+# $FreeBSD$
+use strict;
+
+# XXX what to do with perldoc, pelbug, perlcc ??
+
+sub usage
+{
+ print STDERR <<EOF;
+Usage:
+ $0 port -> /usr/bin/perl is the perl5 port
+ $0 system -> /usr/bin/perl is the system perl
+EOF
+ exit 2;
+}
+
+@ARGV == 1 or usage();
+if ($ARGV[0] eq 'port') {
+ switch_to_port();
+} elsif ($ARGV[0] eq 'system') {
+ switch_to_system();
+} else {
+ usage();
+}
+exit 0;
+
+sub switch_to_system
+{
+ my $port_perl = '%%PREFIX%%/bin/perl';
+ $port_perl =~ tr|/|/|s;
+
+ # protect against cases where people use PREFIX=/usr
+ if ($port_perl ne '/usr/bin/perl') {
+ unlink '/usr/bin/perl', '/usr/bin/suidperl',
+ '/usr/bin/perl%%PERL_VERSION%%';
+
+ link '/usr/bin/perl5', '/usr/bin/perl';
+ link '/usr/bin/sperl5', '/usr/bin/suidperl';
+ }
+
+ open MK, ">> /etc/make.conf" or die "/etc/make.conf: $!";
+ print MK <<EOF;
+# -- use.perl generated deltas -- #
+# Created: @{[scalar localtime]}
+# Setting to use base system perl:
+.undef PERL_VER
+.undef PERL_VERSION
+.undef PERL_ARCH
+.undef NOPERL
+
+EOF
+ close MK;
+}
+
+sub switch_to_port
+{
+ my $port_perl = '%%PREFIX%%/bin/perl';
+ $port_perl =~ tr|/|/|s;
+
+ # protect against cases where people use PREFIX=/usr
+ if ($port_perl ne '/usr/bin/perl') {
+ unlink '/usr/bin/perl', '/usr/bin/suidperl',
+ '/usr/bin/perl%%PERL_VERSION%%';
+
+ symlink '%%PREFIX%%/bin/perl', '/usr/bin/perl';
+ symlink '%%PREFIX%%/bin/suidperl', '/usr/bin/suidperl';
+ symlink '%%PREFIX%%/bin/perl', '/usr/bin/perl%%PERL_VERSION%%';
+ }
+
+ open MK, ">> /etc/make.conf" or die "/etc/make.conf: $!";
+ print MK <<EOF;
+# -- use.perl generated deltas -- #
+# Created: @{[scalar localtime]}
+# Setting to use base perl from ports:
+PERL_VER=%%PERL_VER%%
+PERL_VERSION=%%PERL_VERSION%%
+PERL_ARCH=%%PERL_ARCH%%
+NOPERL=yo
+
+EOF
+ close MK;
+}
diff --git a/lang/perl5.6/pkg-descr b/lang/perl5.6/pkg-descr
index 8741d148a278..8493844a09da 100644
--- a/lang/perl5.6/pkg-descr
+++ b/lang/perl5.6/pkg-descr
@@ -3,10 +3,4 @@ awk and shell. See the manual page for more hype. There are also
many published by O'Reilly & Assoc. See pod/perlbook.pod for more
information.
---
-
-This port is marked FORBIDDEN as it conflics badly with the Perl5
-that is in the 'base' system. Sysadmins and users who know how to
-override this may do so, and must accept the risk of doing so.
-
- MarkM
diff --git a/lang/perl5.6/pkg-install b/lang/perl5.6/pkg-install
index e0d6a6bc7a46..47fee558c9ae 100644
--- a/lang/perl5.6/pkg-install
+++ b/lang/perl5.6/pkg-install
@@ -6,8 +6,8 @@ fi
INCLUDEDIR=/usr/include
-install -d ${PREFIX}/lib/perl5/site_perl/5.6.1/arch
-cd ${INCLUDEDIR} && ${PREFIX}/bin/h2ph *.h machine/*.h sys/*.h
+install -d ${PKG_PREFIX}/lib/perl5/site_perl/5.6.1/mach
+cd ${INCLUDEDIR} && ${PKG_PREFIX}/bin/h2ph *.h machine/*.h sys/*.h
exit 0
diff --git a/lang/perl5.6/pkg-message b/lang/perl5.6/pkg-message
new file mode 100644
index 000000000000..e575728b19be
--- /dev/null
+++ b/lang/perl5.6/pkg-message
@@ -0,0 +1,22 @@
+Installation of Perl distribution is finished. Please note, that since
+Perl is also in the base system, this distribution will not be used by
+default.
+
+If you want this version of Perl to be used by default, please type
+
+ use.perl port
+
+Assuming that use.perl script (which was installed with the rest of the
+Perl distribution) can be found in your PATH (you might have to type
+`rehash' first, depending upon a shell you use), this action will
+replace /usr/bin/perl and /usr/bin/suidperl with symbolic links to the
+versions of these binaries in the Perl distribution. This action will
+also put some variables into your /etc/make.conf file, so that newly
+installed ports (not packages!) will use new version of perl, and the
+system upgrades from the source will not overwrite the changes made.
+
+At any time you can also type
+
+ use.perl system
+
+if you wish to revert back to the system version of perl.
diff --git a/lang/perl5.6/pkg-plist b/lang/perl5.6/pkg-plist
index 00b454a19b9d..132d7bf80a72 100644
--- a/lang/perl5.6/pkg-plist
+++ b/lang/perl5.6/pkg-plist
@@ -26,6 +26,7 @@ bin/podselect
bin/pstruct
bin/s2p
bin/splain
+bin/use.perl
lib/perl5/%%PERL_VER%%/AnyDBM_File.pm
lib/perl5/%%PERL_VER%%/AutoLoader.pm
lib/perl5/%%PERL_VER%%/AutoSplit.pm
@@ -33,6 +34,11 @@ lib/perl5/%%PERL_VER%%/B/assemble
lib/perl5/%%PERL_VER%%/B/cc_harness
lib/perl5/%%PERL_VER%%/B/disassemble
lib/perl5/%%PERL_VER%%/B/makeliblinks
+lib/perl5/%%PERL_VER%%/BSDPAN/BSDPAN.pm
+lib/perl5/%%PERL_VER%%/BSDPAN/BSDPAN/Override.pm
+lib/perl5/%%PERL_VER%%/BSDPAN/Config.pm
+lib/perl5/%%PERL_VER%%/BSDPAN/ExtUtils/MM_Unix.pm
+lib/perl5/%%PERL_VER%%/BSDPAN/ExtUtils/Packlist.pm
lib/perl5/%%PERL_VER%%/Benchmark.pm
lib/perl5/%%PERL_VER%%/CGI.pm
lib/perl5/%%PERL_VER%%/CGI/Apache.pm