diff options
author | joerg <joerg@pkgsrc.org> | 2006-11-03 07:09:45 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2006-11-03 07:09:45 +0000 |
commit | f0f238c0cfb529be13cde836f311f7c2a437f652 (patch) | |
tree | 93383a88d024072aa9e4ac307dc91510932a210d | |
parent | 042af8886653772a8f6f4e20d34bb7d2da215322 (diff) | |
download | pkgsrc-f0f238c0cfb529be13cde836f311f7c2a437f652.tar.gz |
DESTDIR support. Slightly refactor Perl build to avoid calling the newly
build executable, either by using the same constants or by sourcing the
config.sh script created by Configure.
Don't create $installsitearch and don't attempt to remove
$installvendorarch, the former is easy and the latter not needed.
-rw-r--r-- | lang/perl5/Makefile | 43 | ||||
-rw-r--r-- | lang/perl5/distinfo | 3 | ||||
-rw-r--r-- | lang/perl5/packlist.mk | 11 | ||||
-rw-r--r-- | lang/perl5/patches/patch-ab | 12 |
4 files changed, 41 insertions, 28 deletions
diff --git a/lang/perl5/Makefile b/lang/perl5/Makefile index 7ccb0c59a3b..efdf0c55f83 100644 --- a/lang/perl5/Makefile +++ b/lang/perl5/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.122 2006/10/01 14:48:39 rillig Exp $ +# $NetBSD: Makefile,v 1.123 2006/11/03 07:09:45 joerg Exp $ DISTNAME= perl-5.8.8 PKGREVISION= 3 @@ -11,6 +11,8 @@ MAINTAINER= jlam@pkgsrc.org HOMEPAGE= http://www.perl.org/ COMMENT= Practical Extraction and Report Language +PKG_DESTDIR_SUPPORT= user-destdir + CONFLICTS= perl-base-[0-9]* perl-thread-[0-9]* \ p5-CGI-2.66 p5-CGI-2.75 p5-CGI-2.75.[0-2] @@ -87,7 +89,9 @@ CONFIGURE_ARGS+= -Dvendorprefix=${PERL5_VENDORPREFIX:Q} # The Perl Configure script will install scripts into "*/script" # directories if they exist, so override with explicit settings. # -CONFIGURE_ARGS+= -Dscriptdir=${PERL5_PERLBASE:Q}/bin +PERL5_SCRIPTDIR= ${PERL5_PERLBASE}/bin + +CONFIGURE_ARGS+= -Dscriptdir=${PERL5_SCRIPTDIR:Q} CONFIGURE_ARGS+= -Dsitescript=${PERL5_SITEBASE:Q}/bin CONFIGURE_ARGS+= -Dvendorscript=${PERL5_VENDORBASE:Q}/bin @@ -112,8 +116,10 @@ CONFIGURE_ARGS+= -Dvendorlib_stem=${PERL5_VENDORBASE:Q} # Avoid manpage conflicts between the standard Perl library, 3rd-party # modules, and other packages. # +PERL5_MAN1DIR= ${PERL5_PERLBASE}/${PKGMANDIR}/man1 + CONFIGURE_ARGS+= -Dman1ext="1" -CONFIGURE_ARGS+= -Dman1dir=${PERL5_PERLBASE:Q}/${PKGMANDIR:Q}/man1 +CONFIGURE_ARGS+= -Dman1dir=${PERL5_MAN1DIR:Q} CONFIGURE_ARGS+= -Dsiteman1dir=${PERL5_SITEBASE:Q}/${PKGMANDIR:Q}/man1 CONFIGURE_ARGS+= -Dvendorman1dir=${PERL5_VENDORBASE:Q}/${PKGMANDIR:Q}/man1 CONFIGURE_ARGS+= -Dman3ext="3" @@ -316,8 +322,7 @@ post-build: ${FILESDIR}/perllink.in > ${WRKDIR}/perllink.sh INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 -PERL5_PACKLIST_DIR_cmd= eval `${PERL5} -V:installarchlib 2>/dev/null`; \ - echo $$installarchlib +PERL5_PACKLIST_DIR_cmd= . ${WRKSRC}/config.sh; echo $$installarchlib PERL5_PACKLIST_DIR= ${PERL5_PACKLIST_DIR_cmd:sh} PERL5_PACKLIST= .packlist FILES_SUBST+= PERL5_COMMENT=\# @@ -327,25 +332,19 @@ PLIST_SRC= ${WRKDIR}/.PLIST_SRC post-install: perl5-post-install perl5-post-install: - if ${TEST} -x ${PREFIX}/bin/a2p; then \ - strip ${PREFIX}/bin/a2p; \ + if ${TEST} -x ${DESTDIR}${PREFIX}/bin/a2p; then \ + strip ${DESTDIR}${PREFIX}/bin/a2p; \ fi - eval `${PERL5} -V:installsitearch 2>/dev/null`; \ - eval `${PERL5} -V:installvendorarch 2>/dev/null`; \ - ${RMDIR} -p $$installsitearch 2>/dev/null || ${TRUE}; \ - ${RMDIR} -p $$installvendorarch 2>/dev/null || ${TRUE}; \ - eval `${PERL5} -V:scriptdir 2>/dev/null`; \ - eval `${PERL5} -V:man1dir 2>/dev/null`; \ - ${INSTALL_SCRIPT} ${WRKDIR}/perllink.sh $$scriptdir/perllink; \ - ${INSTALL_MAN} ${FILESDIR}/perllink.1 $$man1dir/perllink.1; \ - ${RM} -f ${PREFIX}/bin/perllink \ - ${PREFIX}/${PKGMANDIR}/man1/perllink.1; \ - ${LN} -s $$scriptdir/perllink ${PREFIX}/bin/perllink; \ - ${LN} -s $$man1dir/perllink.1 \ - ${PREFIX}/${PKGMANDIR}/man1/perllink.1; \ + ${INSTALL_SCRIPT} ${WRKDIR}/perllink.sh ${DESTDIR}${PERL5_SCRIPTDIR}/perllink; \ + ${INSTALL_MAN} ${FILESDIR}/perllink.1 ${DESTDIR}${PERL5_MAN1DIR}/perllink.1; \ + ${RM} -f ${DESTDIR}${PREFIX}/bin/perllink \ + ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/perllink.1; \ + ${LN} -s ${PERL5_SCRIPTDIR}/perllink ${DESTDIR}${PREFIX}/bin/perllink; \ + ${LN} -s ${PERL5_MAN1DIR}/perllink.1 \ + ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/perllink.1; \ { ${CAT} ${PKGDIR}/PLIST; \ - ${ECHO} "$$scriptdir/perllink"; \ - ${ECHO} "$$man1dir/perllink.1"; \ + ${ECHO} "${PERL5_SCRIPTDIR}/perllink"; \ + ${ECHO} "${PERL5_MAN1DIR}/perllink.1"; \ } | ${SED} -e "s,^"${PREFIX:Q}"/,," > ${PLIST_SRC} .include "packlist.mk" diff --git a/lang/perl5/distinfo b/lang/perl5/distinfo index 9cd834ba02a..6ef111bd7fb 100644 --- a/lang/perl5/distinfo +++ b/lang/perl5/distinfo @@ -1,9 +1,10 @@ -$NetBSD: distinfo,v 1.38 2006/10/08 17:48:30 ben Exp $ +$NetBSD: distinfo,v 1.39 2006/11/03 07:09:45 joerg Exp $ SHA1 (perl-5.8.8.tar.bz2) = 4aab490040727ca4419098720eca2ba4367df539 RMD160 (perl-5.8.8.tar.bz2) = e78f26d9b96e6db35f946ad4ff55e3a69385c71b Size (perl-5.8.8.tar.bz2) = 10123359 bytes SHA1 (patch-aa) = 9b6844635086206dc7740103747a2b54bf987941 +SHA1 (patch-ab) = e32427327192f023477b16f29bc55fdf4f057410 SHA1 (patch-ae) = 044ac094cd475a16483552aa6f1bde03bd11f592 SHA1 (patch-ah) = 39b1a46a0ee5e73b4707a3d947fe17016df9630a SHA1 (patch-am) = cf1687063d0c0542e811545aaaad291bad12d75e diff --git a/lang/perl5/packlist.mk b/lang/perl5/packlist.mk index afa1d4b6f5f..44c9f6af97f 100644 --- a/lang/perl5/packlist.mk +++ b/lang/perl5/packlist.mk @@ -1,4 +1,4 @@ -# $NetBSD: packlist.mk,v 1.8 2006/06/15 22:13:59 jlam Exp $ +# $NetBSD: packlist.mk,v 1.9 2006/11/03 07:09:45 joerg Exp $ # # This Makefile fragment is intended to be included by packages that # create packlist files. This file is automatically included by @@ -21,7 +21,8 @@ _PERL5_PACKLIST_MK= # defined .if defined(PERL5_PACKLIST) PERL5_PACKLIST_DIR?= ${PERL5_INSTALLVENDORARCH} -_PERL5_PACKLIST= ${PERL5_PACKLIST:S/^/${PERL5_PACKLIST_DIR}\//} +_PERL5_REAL_PACKLIST= ${PERL5_PACKLIST:S/^/${PERL5_PACKLIST_DIR}\//} +_PERL5_PACKLIST= ${_PERL5_REAL_PACKLIST:S/^/${DESTDIR}/} .endif @@ -33,7 +34,7 @@ _PERL5_PACKLIST= ${PERL5_PACKLIST:S/^/${PERL5_PACKLIST_DIR}\//} INSTALL_TEMPLATES+= ${.CURDIR}/../../lang/perl5/files/install.tmpl DEINSTALL_TEMPLATES+= ${.CURDIR}/../../lang/perl5/files/deinstall.tmpl FILES_SUBST+= PERL5_COMMENT= -FILES_SUBST+= PERL5_PACKLIST=${_PERL5_PACKLIST:Q} +FILES_SUBST+= PERL5_PACKLIST=${_PERL5_REAL_PACKLIST:Q} ########################################################################### @@ -47,11 +48,11 @@ PERL5_PLIST_COMMENT_CMD= \ { ${ECHO} "@comment The following lines are automatically generated"; \ ${ECHO} "@comment from the installed .packlist files."; } PERL5_PLIST_FILES_CMD= \ - { ${CAT} ${_PERL5_PACKLIST}; for f in ${_PERL5_PACKLIST}; do ${TEST} ! -f "$$f" || ${ECHO} "$$f"; done; } \ + { ${CAT} ${_PERL5_PACKLIST}; for f in ${_PERL5_REAL_PACKLIST}; do ${TEST} ! -f "$$f" || ${ECHO} "$$f"; done; } \ | ${SED} -e "s,[ ].*,," -e "s,/\\./,/,g" -e "s,${PREFIX}/,," \ | ${SORT} -u PERL5_PLIST_DIRS_CMD= \ - { ${CAT} ${_PERL5_PACKLIST}; for f in ${_PERL5_PACKLIST}; do ${TEST} ! -f "$$f" || ${ECHO} "$$f"; done; } \ + { ${CAT} ${_PERL5_PACKLIST}; for f in ${_PERL5_REAL_PACKLIST}; do ${TEST} ! -f "$$f" || ${ECHO} "$$f"; done; } \ | ${SED} -e "s,[ ].*,," -e "s,/\\./,/,g" -e "s,${PREFIX}/,," \ -e "s,^,@unexec "${RMDIR:Q}" -p %D/," \ -e "s,/[^/]*\$$, 2>/dev/null || "${TRUE:Q}"," \ diff --git a/lang/perl5/patches/patch-ab b/lang/perl5/patches/patch-ab new file mode 100644 index 00000000000..a8b74bb3503 --- /dev/null +++ b/lang/perl5/patches/patch-ab @@ -0,0 +1,12 @@ +$NetBSD: patch-ab,v 1.14 2006/11/03 07:09:46 joerg Exp $ + +--- installperl.orig 2006-11-01 02:21:12.000000000 +0100 ++++ installperl +@@ -379,7 +379,6 @@ my ($do_installarchlib, $do_installprivl + mkpath($installprivlib, $verbose, 0777); + mkpath($installarchlib, $verbose, 0777); + mkpath($installsitelib, $verbose, 0777) if ($installsitelib); +-mkpath($installsitearch, $verbose, 0777) if ($installsitearch); + + if (chdir "lib") { + $do_installarchlib = ! samepath($installarchlib, '.'); |