diff options
author | Anton Berezin <tobez@FreeBSD.org> | 2001-12-19 17:05:05 +0000 |
---|---|---|
committer | Anton Berezin <tobez@FreeBSD.org> | 2001-12-19 17:05:05 +0000 |
commit | fb226407ee460453e08f0c16d1ed0ff4cfe74ebf (patch) | |
tree | 0e8598e113256b87911f26ff4e0b6f11b2b9af59 /lang/perl5.12/Makefile | |
parent | The latest version unzips to a subdir. (diff) |
Unforbid the port for the use of general FreeBSD public.
Compile perl with BSDPAN support, both -current and -stable. The
version of BSDPAN used here coincides accidentally with the one present
in the -current system perl, but is installed in a different place.
Provide a script, use.perl, to facilitate switching of the perl used by
default between the system perl and this port. Also print a message
describing the usage of use.perl (this works for the port and for the
package built from it). The switching to the port version is done by
removing /usr/bin/perl and /usr/bin/suidperl (they both have link count
>1, so this is reversible), and making them to be symlinks to the
corresponding binaries in $PREFIX/bin. Also, assignments of the correct
values of PERL_VER, PERL_VERSION, and PERL_ARCH are appended to
/etc/make.conf. Last, NOPERL=yes is appended to /etc/make.conf, so that
the changes made will survive system upgrades from source. The
switching to the system version is more or less a reverse of the process
described above.
Set and use PERL_ARCH which is independed from the one used by the
system perl.
Fix the port for post-malloc.h -current.
Fix a small bogon when PREFIX was used in pkg-install (PKG_PREFIX should
have been used instead).
Reviewed by: markm, joe
Notes
Notes:
svn path=/head/; revision=51847
Diffstat (limited to 'lang/perl5.12/Makefile')
-rw-r--r-- | lang/perl5.12/Makefile | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/lang/perl5.12/Makefile b/lang/perl5.12/Makefile index 3982ac9c2780..4f6e1b718cfc 100644 --- a/lang/perl5.12/Makefile +++ b/lang/perl5.12/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> |