diff options
author | jlam <jlam@pkgsrc.org> | 2005-08-06 06:18:44 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2005-08-06 06:18:44 +0000 |
commit | 86f92684818eb77da677366cd49b4fa35e87b579 (patch) | |
tree | 554688efac79710dce203345436bb3e8cb9748b1 | |
parent | 948ada653aefeccbbb05b811348b0025017134ba (diff) | |
download | pkgsrc-86f92684818eb77da677366cd49b4fa35e87b579.tar.gz |
Update lang/perl5 to 5.8.7. Changes from version 5.8.6 include updates
for many "core" modules, UTF-8 and Unicode bugfixes, and ithreads
bugfixes.
The major changes are in the pkgsrc infrastructure to handle Perl and
Perl modules. All pkgsrc-installed Perl modules are now installed in
"vendor" directories, and the perl interpreter has been modifed to
search for libraries in the following order: site, vendor, perl. The
Perl library is stored in a directory that is named for the Perl ABI
version associated with the Perl release, so any updates of Perl to
newer versions can be done "in-place" as long as Perl ABI version
remains the same. All Perl scripts and man pages are stored in
locations that won't conflict between site, vendor, and perl modules,
and a new utility perllink(1) now manages symlinks to those scripts
and man pages under the usual ${LOCALBASE}/bin and ${LOCALBASE}/man/man1.
PERL5_SITEPREFIX may be set to the prefix where local, site-specific
modules will be installed, e.g. PERL5_SITEPREFIX=/usr/local. Note
that modules installed here are completely unmanaged by pkgsrc.
Update the buildlink and tool dependencies on perl to require perl>=5.8.7
to reflect the new locations for Perl modules and the Perl shared
library.
29 files changed, 899 insertions, 449 deletions
diff --git a/doc/CHANGES b/doc/CHANGES index e33715be6d0..acbf5742294 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -1,4 +1,4 @@ -$NetBSD: CHANGES,v 1.10804 2005/08/06 05:33:48 xtraeme Exp $ +$NetBSD: CHANGES,v 1.10805 2005/08/06 06:18:44 jlam Exp $ Changes to the packages collection and infrastructure in 2005: @@ -508,3 +508,4 @@ Changes to the packages collection and infrastructure in 2005: Added net/btget version 1.04 [reinoud 2005-08-06] Updated emulators/suse91_base to 9.1nb6 [wiz 2005-08-05] Added mail/etpan version 0.6.1 [xtraeme 2005-08-06] + Updated lang/perl5 to 5.8.7 [jlam 2005-08-06] diff --git a/lang/perl5/MESSAGE b/lang/perl5/MESSAGE deleted file mode 100644 index 3a985af08b2..00000000000 --- a/lang/perl5/MESSAGE +++ /dev/null @@ -1,9 +0,0 @@ -=========================================================================== -$NetBSD: MESSAGE,v 1.5 2005/06/24 06:43:45 jlam Exp $ - -${PKGNAME} will use the following directory as the default -location of the site-specific Perl modules: - - ${PERL5_SITELIB} - -=========================================================================== diff --git a/lang/perl5/Makefile b/lang/perl5/Makefile index 78cab3a83cc..58f1d9e33ff 100644 --- a/lang/perl5/Makefile +++ b/lang/perl5/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.96 2005/07/13 15:20:29 jschauma Exp $ +# $NetBSD: Makefile,v 1.97 2005/08/06 06:18:45 jlam Exp $ # The following two variables should have empty values unless we're # building a perl snapshot or release candidate. @@ -6,14 +6,15 @@ PERL5_SNAPSHOT= # empty PERL5_RC_VERS= # empty -PERL5_VERS= 5.8.6 +PERL5_VERS= 5.8.7 CATEGORIES= lang devel perl5 EXTRACT_SUFX= .tar.bz2 +WRKSRC= ${WRKDIR}/${DISTNAME} .if empty(PERL5_SNAPSHOT) && empty(PERL5_RC_VERS) DISTNAME= perl-${PERL5_VERS} PKGNAME= perl-${PERL5_VERS} -PKGREVISION= 6 +PKGREVISION= # empty MASTER_SITES= ${MASTER_SITE_PERL_CPAN:S,/modules/by-module/$,/src/,} .else . if !empty(PERL5_SNAPSHOT) @@ -35,25 +36,51 @@ MAINTAINER= jlam@NetBSD.org HOMEPAGE= http://www.perl.com/ COMMENT= Practical Extraction and Report Language -CONFLICTS= perl-5.00* perl-base-[0-9]* \ - p5-CGI-2.66 p5-CGI-2.75 p5-CGI-2.75.[0-2] \ - p5-Data-Dumper-2.1[0-9][0-9] p5-Data-Dumper-[0-9][0-9] \ - p5-Devel-DProf-[0-9]* p5-Devel-Peek-[0-9]* \ - perl-mk-[0-9]* perl-thread-[0-9]* +CONFLICTS= perl-base-[0-9]* perl-thread-[0-9]* \ + p5-CGI-2.66 p5-CGI-2.75 p5-CGI-2.75.[0-2] -PKG_INSTALLATION_TYPES= overwrite pkgviews +.include "../../mk/bsd.prefs.mk" + +# Determine the Perl API version from the patchlevel.h file from the +# source distribution. +# +PERL5_API_VERS?= unknown +.if exists(${WRKSRC}/patchlevel.h) +PERL5_API_VERS_cmd= \ + ${AWK} '/\#define[ ]*PERL_API_REVISION/ { R = $$3 } \ + /\#define[ ]*PERL_API_VERSION/ { r = "."$$3 } \ + /\#define[ ]*PERL_API_SUBVERSION/ { s = "."$$3 } \ + END { printf "%s%s%s\n", R, r, s }' \ + ${WRKSRC}/patchlevel.h +PERL5_API_VERS= ${PERL5_API_VERS_cmd:sh} +.endif + +PERL5_PREFIX= ${PREFIX} +PERL5_VENDORPREFIX= ${PERL5_PERLBASE}/vendor_perl +PERL5_SITEPREFIX?= ${PERL5_PERLBASE}/site_perl +BUILD_DEFS+= PERL5_SITEPREFIX + +PERL5= ${PERL5_PREFIX}/bin/perl +PERL5_PERLBASE= ${PERL5_PREFIX}/lib/perl5 +PERL5_VENDORBASE= ${PERL5_VENDORPREFIX} +PERL5_SITEBASE= ${PERL5_SITEPREFIX} + +PERL5_PRIVLIB= ${PERL5_PERLBASE}/${PERL5_API_VERS} +PERL5_VENDORLIB= ${PERL5_VENDORBASE}/${PERL5_API_VERS} +.if !empty(PERL5_SITEBASE:M*lib/perl5/site_perl) +PERL5_SITELIB= ${PERL5_SITEBASE}/${PERL5_API_VERS} +.else +PERL5_SITELIB= ${PERL5_SITEBASE}/lib/perl5/site_perl/${PERL5_API_VERS} +.endif .include "../../mk/compiler.mk" HAS_CONFIGURE= yes CONFIGURE_SCRIPT= ./Configure CONFIGURE_ARGS+= -sde -CONFIGURE_ARGS+= -Dprefix="${PREFIX}" -CONFIGURE_ARGS+= -Dscriptdir="${PREFIX}/bin" CONFIGURE_ARGS+= -Darchname="${MACHINE_ARCH}-${LOWER_OPSYS}" -CONFIGURE_ARGS+= -Dcc="${CC}" -CONFIGURE_ARGS+= -Doptimize="${CFLAGS}" -CONFIGURE_ARGS+= -Dinstallstyle="lib/perl5" +CONFIGURE_ARGS+= -Dcc=${CC:Q} +CONFIGURE_ARGS+= -Doptimize=${CFLAGS:Q} CONFIGURE_ARGS+= -Duseshrplib CONFIGURE_ARGS+= -Ui_malloc CONFIGURE_ARGS+= -Uusemymalloc @@ -62,31 +89,43 @@ MAKE_ENV+= LC_ALL="C" TEST_TARGET= test -# Install Perl man3 pages into a private directory under the normal -# Perl installation. Also install site-specific Perl man3 pages into a -# private directory within site_perl. This avoids manpage conflicts -# between 3rd-party modules, the standard Perl library, and other -# packages. -# -CONFIGURE_ARGS+= -Dman3ext="3" -CONFIGURE_ARGS+= -Dman3dir="${PERL5_PRIVLIB}/man/man3" -CONFIGURE_ARGS+= -Dsiteman3dir="${PERL5_SITEPERL}/man/man3" +### +### Installation directories for "perl", "vendor" and "site" bits. +### +CONFIGURE_ARGS+= -Dinstallstyle="lib/perl5" +CONFIGURE_ARGS+= -Dprefix=${PERL5_PREFIX:Q} +CONFIGURE_ARGS+= -Dsiteprefix=${PERL5_SITEPREFIX:Q} +CONFIGURE_ARGS+= -Dvendorprefix=${PERL5_VENDORPREFIX:Q} -# Ensure that the Perl man1 pages go into ${PREFIX}/man/man1 and not -# into some other platform-specific location kindly "guessed" by the -# Configure script. +# The Perl Configure script will install scripts into "*/script" +# directories if they exist, so override with explicit settings. # -CONFIGURE_ARGS+= -Dman1dir="${PREFIX}/man/man1" +CONFIGURE_ARGS+= -Dscriptdir=${PERL5_PERLBASE:Q}/bin +CONFIGURE_ARGS+= -Dsitescript=${PERL5_SITEBASE:Q}/bin +CONFIGURE_ARGS+= -Dvendorscript=${PERL5_VENDORBASE:Q}/bin -# The site directories are all relative to the perl view. -CONFIGURE_ARGS+= -Dsiteprefix="${VIEWBASE}" -CONFIGURE_ARGS+= -Dsiteman1dir="${VIEWBASE}/man/man1" +# Put the API-specific files into API-specific directories instead +# of the default version-specific directories. +# +CONFIGURE_ARGS+= -Dprivlib=${PERL5_PRIVLIB:Q} +CONFIGURE_ARGS+= -Dsitelib=${PERL5_SITELIB:Q} +CONFIGURE_ARGS+= -Dvendorlib=${PERL5_VENDORLIB:Q} -.include "../../mk/bsd.prefs.mk" +# Avoid manpage conflicts between the standard Perl library, 3rd-party +# modules, and other packages. +# +CONFIGURE_ARGS+= -Dman1ext="1" +CONFIGURE_ARGS+= -Dman1dir=${PERL5_PERLBASE:Q}/man/man1 +CONFIGURE_ARGS+= -Dsiteman1dir=${PERL5_SITEBASE:Q}/man/man1 +CONFIGURE_ARGS+= -Dvendorman1dir=${PERL5_VENDORBASE:Q}/man/man1 +CONFIGURE_ARGS+= -Dman3ext="3" +CONFIGURE_ARGS+= -Dman3dir=${PERL5_PERLBASE:Q}/man/man3 +CONFIGURE_ARGS+= -Dsiteman3dir=${PERL5_SITEBASE:Q}/man/man3 +CONFIGURE_ARGS+= -Dvendorman3dir=${PERL5_VENDORBASE:Q}/man/man3 .if ${OPSYS} == "Darwin" # -# The perl build attempts to work around case-insensitivity problems on +# The Perl build attempts to work around case-insensitivity problems on # HFS filesystems by using GNUmakefiles, so we need to use GNU make. # USE_TOOLS+= gmake @@ -157,9 +196,9 @@ CHECK_BUILTIN.pthread:= no # By default, build with threads only if the threads are native. .if !empty(USE_BUILTIN.pthread:M[yY][eE][sS]) -PERL5_USE_THREADS?= yes +PERL5_BUILD_THREADS_SUPPORT= yes .else -PERL5_USE_THREADS?= ${DLOPEN_REQUIRE_PTHREADS} +PERL5_BUILD_THREADS_SUPPORT= ${DLOPEN_REQUIRE_PTHREADS} .endif ### [Sat Dec 18 17:29:44 EST 2004 : jlam] @@ -167,56 +206,61 @@ PERL5_USE_THREADS?= ${DLOPEN_REQUIRE_PTHREADS} ### Build Perl without threads-support until VAX native threads are ### known to work. ### -.if !empty(MACHINE_PLATFORM:MNetBSD-*-vax) -PKG_HACKS+= broken-vax-pthreads -PERL5_USE_THREADS= no +.if !empty(MACHINE_PLATFORM:MNetBSD-*-vax) && \ + !empty(USE_BUILTIN.pthread:M[yY][eE][sS]) +PKG_HACKS+= broken-vax-pthreads +PERL5_BUILD_THREADS_SUPPORT= no .endif -.if !empty(PERL5_USE_THREADS:M[nN][oO]) -CONFIGURE_ARGS+= -Uuseithreads -.else +PKG_OPTIONS_VAR= PKG_OPTIONS.perl +PKG_SUPPORTED_OPTIONS= threads +.if !empty(PERL5_BUILD_THREADS_SUPPORT:M[yY][eE][sS]) +PKG_SUGGESTED_OPTIONS= threads +.endif +PKG_OPTIONS_LEGACY_VARS+= PERL5_USE_THREADS:threads + +.include "../../mk/bsd.options.mk" + +.if !empty(PKG_OPTIONS:Mthreads) . include "../../mk/pthread.buildlink3.mk" CONFIGURE_ARGS+= -Duseithreads CFLAGS+= ${PTHREAD_CFLAGS} PERL5_HINTS_LDFLAGS+= ${PTHREAD_LDFLAGS} PERL5_HINTS_LDDLFLAGS+= ${PTHREAD_LDFLAGS} LIBSWANTED+= ${PTHREAD_LIBS:M-l*:S/^-l//} +.else +CONFIGURE_ARGS+= -Uuseithreads .endif .if !empty(LIBSWANTED) -CONFIGURE_ARGS+= -Dlibswanted="${LIBSWANTED}" +CONFIGURE_ARGS+= -Dlibswanted=${LIBSWANTED:Q} .endif .include "../../mk/compiler.mk" .if ${OPSYS} == "IRIX" . if ${ABI} == "64" -CONFIGURE_ARGS+= -Dcc='${CC} -64' -Duse64bitint +CONFIGURE_ARGS+= -Dcc=${CC:Q}" -64" -Duse64bitint . else -CONFIGURE_ARGS+= -Dcc='${CC} -n32' +CONFIGURE_ARGS+= -Dcc=${CC:Q}" -n32" . endif .endif -PERL5= ${PREFIX}/bin/perl${PERL5_VERS} -PERL5_PRIVLIB= ${PREFIX}/lib/perl5/${PERL5_VERS} -PERL5_SITEPERL= ${VIEWBASE}/lib/perl5/site_perl -PERL5_SITELIB= ${VIEWBASE}/lib/perl5/site_perl/${PERL5_VERS} -PLIST_SUBST+= PERL5_SITEPERL=${PERL5_SITEPERL:S/^${PREFIX}\///} -PLIST_SUBST+= PERL5_SITELIB=${PERL5_SITELIB:S/^${PREFIX}\///} -MESSAGE_SUBST+= PERL5_SITELIB=${PERL5_SITELIB} - -# Some platforms may want the directory mode not to be 0755. This is, -# unfortunately, hardcoded in quite a few places in Perl. So let's substitute -# what pkgsrc said instead. -post-patch: -.if ${PKGDIRMODE} != "755" -. for f in installhtml installman installperl lib/ExtUtils/Install.pm - cd ${WRKSRC} && \ - ${MV} -f ${f} ${f}.dirmode && \ - ${SED} -e 's/755/${PKGDIRMODE}/g;/umask(/d' \ - ${f}.dirmode >${f} -. endfor -.endif +# Some platforms may want the directory mode not to be 0755. This +# is, unfortunately, hardcoded in quite a few places in Perl, so +# let's substitute what pkgsrc says instead. +# +SUBST_CLASSES+= dirmode +SUBST_STAGE.dirmode= post-patch +SUBST_FILES.dirmode= installhtml installman installperl \ + lib/ExtUtils/Install.pm +SUBST_SED.dirmode= -e "s/755/${PKGDIRMODE}/g;/umask(/d" + +USE_PKGINSTALL= yes +INSTALL_EXTRA_TMPL+= ${FILESDIR}/install_link.tmpl +DEINSTALL_EXTRA_TMPL+= ${FILESDIR}/deinstall_link.tmpl +FILES_SUBST+= PERL5_PACKLIST= +FILES_SUBST+= PERL5_COMMENT=\# # It's tough to guess which hints file will be used, so add our modifications # to all of them: @@ -228,63 +272,74 @@ pre-configure: hintdir="${WRKSRC}/hints"; \ for hints in $${hintdir}/*.sh; do \ ${CHMOD} +w $${hints}; \ - ( ${ECHO} ""; \ + { ${ECHO} ""; \ ${ECHO} "cat > UU/pkgsrc.cbu <<'EOCBU'"; \ ${ECHO} "# This script UU/pkgsrc.cbu will get 'called-back' by Configure to set"; \ ${ECHO} '# linker options after all other call-back scripts have been invoked.'; \ ${ECHO} 'ldflags="${PERL5_HINTS_LDFLAGS} $$ldflags"'; \ ${ECHO} 'lddlflags="${PERL5_HINTS_LDFLAGS} $$lddlflags"'; \ ${ECHO} "EOCBU"; \ - ) >> $${hints}; \ + } >> $${hints}; \ done hintdir="${WRKSRC}/hints"; \ for hints in $${hintdir}/*.sh; do \ - ( ${ECHO} ""; \ + { ${ECHO} ""; \ ${ECHO} "# Set pkgsrc defaults for library and header search paths."; \ ${ECHO} 'locincpth="${LOCINCPATH}"'; \ ${ECHO} 'loclibpth="${LOCLIBPATH}"'; \ - ) >> $${hints}; \ + } >> $${hints}; \ done .if !empty(SYSLIBPATH) hintdir="${WRKSRC}/hints"; \ for hints in $${hintdir}/*.sh; do \ - ( ${ECHO} "glibpth='${SYSLIBPATH}'"; \ - ) >> $${hints}; \ + { ${ECHO} "glibpth='${SYSLIBPATH}'"; } >> $${hints}; \ done .endif -WRKSRC_PERL5= ${WRKSRC}/perl PLIST_SRC= ${WRKDIR}/.PLIST_SRC PLIST_FILE_SED= -e "s,[ ].*,," -e "s,/\./,/,g" -e "s,${PREFIX}/,," PLIST_DIR_SED= ${PLIST_FILE_SED} \ -e "s,^,@unexec \${RMDIR} -p %D/," \ -e "s,/[^/]*$$, 2>/dev/null || ${TRUE}," \ +INSTALLATION_DIRS= bin man/man1 + +post-build: + @${SED} ${FILES_SUBST_SED} ${FILESDIR}/perllink.in \ + > ${WRKDIR}/perllink + post-install: - ${RM} -f ${PREFIX}/bin/perl ${PREFIX}/bin/perl${PERL5_VERS} - ${INSTALL_PROGRAM_DIR} ${PREFIX}/bin - ${INSTALL_PROGRAM} ${WRKSRC_PERL5} ${PREFIX}/bin/perl${PERL5_VERS} - ${LN} -f ${PREFIX}/bin/perl${PERL5_VERS} ${PREFIX}/bin/perl -.if defined(_STRIPFLAG_INSTALL) && !empty(_STRIPFLAG_INSTALL) - if [ -x ${PREFIX}/bin/a2p ]; then \ + if ${TEST} -x ${PREFIX}/bin/a2p; then \ strip ${PREFIX}/bin/a2p; \ fi -.endif - # Generate the PLIST template eval `${PERL5} -V:installarchlib 2>/dev/null`; \ eval `${PERL5} -V:installsitearch 2>/dev/null`; \ - sitearch=`${ECHO} $$installsitearch | ${SED} ${PLIST_FILE_SED}`; \ - ${RMDIR} -p $$installsitearch 2>/dev/null || ${TRUE}; \ + eval `${PERL5} -V:installvendorarch 2>/dev/null`; \ + case $$installsitearch in \ + ${PREFIX}/*) \ + ${RMDIR} -p $$installsitearch 2>/dev/null || ${TRUE}; \ + ;; \ + esac; \ + ${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 $$scriptdir/perllink; \ + ${INSTALL_MAN} ${FILESDIR}/perllink.1 $$man1dir/perllink.1; \ + ${RM} -f ${PREFIX}/bin/perllink ${PREFIX}/man/man1/perllink.1; \ + ${LN} -s $$scriptdir/perllink ${PREFIX}/bin/perllink; \ + ${LN} -s $$man1dir/perllink.1 ${PREFIX}/man/man1/perllink.1; \ packlist="$$installarchlib/.packlist"; \ - ( ${ECHO} "@unexec ${RM} -f %D/$$sitearch/perllocal.pod"; \ - ${ECHO} "@unexec ${RMDIR} -p %D/$$sitearch 2>/dev/null || ${TRUE}"; \ - ${CAT} ${PKGDIR}/PLIST; \ + { ${CAT} ${PKGDIR}/PLIST; \ ${ECHO} "@comment The following lines are automatically generated"; \ ${ECHO} "@comment from the installed .packlist files."; \ - ) > ${PLIST_SRC}; \ - ( ${ECHO} "$$packlist" && ${CAT} $$packlist ) \ - | ${SED} ${PLIST_FILE_SED} | ${SORT} -u >> ${PLIST_SRC}; \ - ( ${ECHO} "$$packlist" && ${CAT} $$packlist ) \ - | ${SED} ${PLIST_DIR_SED} | ${SORT} -ur >> ${PLIST_SRC} + { ${ECHO} "$$packlist"; ${CAT} $$packlist; \ + ${ECHO} "$$scriptdir/perllink"; \ + ${ECHO} "$$man1dir/perllink.1"; \ + } | ${SED} ${PLIST_FILE_SED} | ${SORT} -u; \ + { ${ECHO} "$$packlist"; ${CAT} $$packlist; \ + ${ECHO} "$$scriptdir/perllink"; \ + ${ECHO} "$$man1dir/perllink.1"; \ + } | ${SED} ${PLIST_DIR_SED} | ${SORT} -ur; \ + } > ${PLIST_SRC} .include "../../mk/bsd.pkg.mk" diff --git a/lang/perl5/PLIST b/lang/perl5/PLIST index 2a77ff1ff91..0283fa07ed4 100644 --- a/lang/perl5/PLIST +++ b/lang/perl5/PLIST @@ -1,5 +1,3 @@ -@comment $NetBSD: PLIST,v 1.4 2005/06/24 06:43:45 jlam Exp $ -@unexec ${RMDIR} -p %D/${PERL5_SITEPERL}/man/man3 2>/dev/null || ${TRUE} -@unexec ${RMDIR} -p %D/${PERL5_SITEPERL}/man 2>/dev/null || ${TRUE} -@unexec ${RMDIR} -p %D/${PERL5_SITEPERL} 2>/dev/null || ${TRUE} -@unexec ${RMDIR} -p %D/${PERL5_SITELIB} 2>/dev/null || ${TRUE} +@comment $NetBSD: PLIST,v 1.5 2005/08/06 06:18:45 jlam Exp $ +bin/perllink +man/man1/perllink.1 diff --git a/lang/perl5/buildlink3.mk b/lang/perl5/buildlink3.mk index 2ad9613a90f..4d5fc72277a 100644 --- a/lang/perl5/buildlink3.mk +++ b/lang/perl5/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.26 2005/07/16 01:19:11 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.27 2005/08/06 06:18:45 jlam Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ PERL5_BUILDLINK3_MK:= ${PERL5_BUILDLINK3_MK}+ @@ -14,18 +14,18 @@ BUILDLINK_PACKAGES+= perl .if !empty(PERL5_BUILDLINK3_MK:M+) USE_TOOLS+= perl +PERL5_REQD+= 5.8.7 TOOLS_DEPENDS.perl= # buildlink3 will handle the dependency -BUILDLINK_DEPENDS.perl+= {perl>=${PERL5_REQD},perl-thread>=${PERL5_REQD}} -BUILDLINK_RECOMMENDED.perl+= perl>=5.8.5nb6 +BUILDLINK_DEPENDS.perl+= perl>=${PERL5_REQD} BUILDLINK_PKGSRCDIR.perl?= ../../lang/perl5 PERL5_OPTIONS?= # empty -.if !empty(PERL5_OPTIONS:Mthreads) +. if !empty(PERL5_OPTIONS:Mthreads) USE_PKGINSTALL= yes INSTALL_EXTRA_TMPL+= ${.CURDIR}/../../lang/perl5/files/install.tmpl -.endif +. endif -.if ${PKG_INSTALLATION_TYPE} == "overwrite" +. if ${PKG_INSTALLATION_TYPE} == "overwrite" # # Perl keeps headers and odd libraries in an odd path not caught by the # default BUILDLINK_FILES_CMD, so name them to be symlinked into @@ -34,8 +34,7 @@ INSTALL_EXTRA_TMPL+= ${.CURDIR}/../../lang/perl5/files/install.tmpl BUILDLINK_FILES.perl= \ ${PERL5_SUB_INSTALLARCHLIB}/CORE/* \ ${PERL5_SUB_INSTALLARCHLIB}/auto/DynaLoader/DynaLoader.a -.endif - +. endif .endif # PERL5_BUILDLINK3_MK BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} diff --git a/lang/perl5/distinfo b/lang/perl5/distinfo index 1f8297f697c..7af1c66045b 100644 --- a/lang/perl5/distinfo +++ b/lang/perl5/distinfo @@ -1,24 +1,22 @@ -$NetBSD: distinfo,v 1.22 2005/06/24 06:43:45 jlam Exp $ +$NetBSD: distinfo,v 1.23 2005/08/06 06:18:45 jlam Exp $ -SHA1 (perl-5.8.6.tar.bz2) = 5267c5b4900a995a10e4fc56fe10a6852004c29b -RMD160 (perl-5.8.6.tar.bz2) = 52fdee3caecf67417a9c081b7aae84807235cb27 -Size (perl-5.8.6.tar.bz2) = 9693085 bytes -SHA1 (patch-aa) = 3c16c599dae752cea4143ca48071118ece5925a4 +SHA1 (perl-5.8.7.tar.bz2) = c9477c6fe76b200033694bdc555a0276523d4228 +RMD160 (perl-5.8.7.tar.bz2) = 110c286d73fd89e25da8ea394e763f209a76d283 +Size (perl-5.8.7.tar.bz2) = 9839086 bytes +SHA1 (patch-aa) = 03e6d0683625a3da30582abb89646b88cde84ea9 SHA1 (patch-ae) = 044ac094cd475a16483552aa6f1bde03bd11f592 -SHA1 (patch-ah) = cb103c14090b2d61720ee9b555b32085c8eeb810 +SHA1 (patch-ah) = 7847562d35cd4834a45139b6a8cfe766aa45fa0a +SHA1 (patch-al) = 7b86ec658c09077bec513eadc02006525a548d6f +SHA1 (patch-am) = f82f8fd7fa372f1d47b057b6051613d66dc4bc23 +SHA1 (patch-an) = 25c0991dba16ebe11422a97f544cb100e8da56b8 SHA1 (patch-ba) = 096835f71a69f29e50bdad47944afa838dba5aec SHA1 (patch-bd) = 9f96ba1912f2a8db93db31f7a63c0b49a045318d -SHA1 (patch-be) = 9f667f33ea24300a5580db84d0978ca53f126f29 -SHA1 (patch-bf) = 9bc5690b41a70617cde89b805184a8d5605d20d1 -SHA1 (patch-ca) = 3198a5f49c2a850b1ea1f5c6f0738f45da505924 -SHA1 (patch-cb) = 5eec09e832735d2e59fd82f7043fa78ee08cbd0d +SHA1 (patch-ca) = 8eef6a9f96b8f1c6a7c34b521b7c633d396757e3 +SHA1 (patch-cb) = 1a67bf37338de9b8e24e90ddad90205ec4fbb6c8 SHA1 (patch-cc) = b04ea30ac47ae0748aa6b6c83c8de0396ace349f -SHA1 (patch-cd) = d9420f57f036567abac821a8144768a2a7057b47 -SHA1 (patch-ce) = c7d2defd2cfa872c1f6651678bc3de6cd7aeaf34 -SHA1 (patch-cf) = 23cf46c8d683b688878433ec9b33f3c65528cd28 -SHA1 (patch-cg) = e1b56aaa40934f78298d1fd9303fbae33c472d8e -SHA1 (patch-ch) = 6cfd77bba102a4bca82576f061ba60c1610c4d07 -SHA1 (patch-ci) = 89bc6e67b18ca903cb3791fd598fd579bc48298b +SHA1 (patch-ce) = 6b1efab32c6bc28e0faf7522322e6d805eb21730 +SHA1 (patch-ch) = 028439dde97f1d5a94fbd571a59fd0ab2c5b3b07 +SHA1 (patch-ci) = 908a8bb35c088b994bde49707ab1536b4ab3d7a4 SHA1 (patch-cj) = 680b7161d7530825376b9d5c108fc01f15768e5e SHA1 (patch-ck) = 28207b8186c9ad194a1edc696159915bc16d1097 SHA1 (patch-cl) = 8553c83e721f5ae43a5f6e0e4d2b70510b69e77c diff --git a/lang/perl5/files/deinstall_link.tmpl b/lang/perl5/files/deinstall_link.tmpl new file mode 100644 index 00000000000..6c7bc8b4867 --- /dev/null +++ b/lang/perl5/files/deinstall_link.tmpl @@ -0,0 +1,16 @@ +# $NetBSD: deinstall_link.tmpl,v 1.1 2005/08/06 06:18:45 jlam Exp $ + +case ${STAGE} in +DEINSTALL) + eval `${PERL5} -V:scriptdir` + PERL5_PACKLIST="@PERL5_PACKLIST@" + + # Remove any symlinked bits that belong to this module. + $scriptdir/perllink -f -p ${PKG_PREFIX} delete ${PERL5_PACKLIST} + + # If this is not the perl package, then re-link any perl bits + # back into place. + # + @PERL5_COMMENT@$scriptdir/perllink -p ${PKG_PREFIX} add + ;; +esac diff --git a/lang/perl5/files/install_link.tmpl b/lang/perl5/files/install_link.tmpl new file mode 100644 index 00000000000..ad196d32d2e --- /dev/null +++ b/lang/perl5/files/install_link.tmpl @@ -0,0 +1,11 @@ +# $NetBSD: install_link.tmpl,v 1.1 2005/08/06 06:18:45 jlam Exp $ + +case ${STAGE} in +POST-INSTALL) + eval `${PERL5} -V:scriptdir` + PERL5_PACKLIST="@PERL5_PACKLIST@" + + # Symlink the bits that belong to this module. + $scriptdir/perllink -f -p ${PKG_PREFIX} add ${PERL5_PACKLIST} + ;; +esac diff --git a/lang/perl5/files/perllink.1 b/lang/perl5/files/perllink.1 new file mode 100644 index 00000000000..71154ac12c0 --- /dev/null +++ b/lang/perl5/files/perllink.1 @@ -0,0 +1,126 @@ +.\" $NetBSD: perllink.1,v 1.1 2005/08/06 06:18:45 jlam Exp $ +.\" +.\" Copyright (c) 2005 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Johnny C. Lam. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the NetBSD +.\" Foundation, Inc. and its contributors. +.\" 4. Neither the name of The NetBSD Foundation nor the names of its +.\" contributors may be used to endorse or promote products derived +.\" from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd July 15, 2005 +.Dt PERLLINK 1 +.Sh NAME +.Nm perllink +.Nd add and delete symlinks in the standard Perl installation +.Sh SYNOPSIS +.Nm perllink +.Op Fl fnv +.Op Fl p Ar prefix +.Ar action +.Op Ar packlist ... +.Sh DESCRIPTION +.Nm +manages the symlinks that match the files listed in the given +packlists. +.Pp +The perl configuration library defines the main directory trees +containing the standard Perl installation in the following variables: +.Bl -column -offset indent +.It Va prefix +.It Va siteprefix +.It Va vendorprefix +.El +.Pp +The perl configuration library also defines the locations of scripts +and manual pages in the following variables: +.Bl -column -offset indent ".Va vendorscript" ".Va vendorman1dir" +.It Va scriptdir Ta Va man1dir +.It Va sitescript Ta Va siteman1dir +.It Va vendorscript Ta Va vendorman1dir +.El +.Pp +For each file listed in the packlists that is in one of the script +or manual page locations, +a relative symbolic link to that file is added or deleted from +. Va prefix Ns Pa /bin +and +. Va prefix Ns Pa /man/man1 . +.Pp +If +.Fl p Ar prefix +is specified, then the script and manual page locations are recomputed +relative to the given +.Ar prefix +instead of to perl's +.Va prefix , +and the symlinks are managed under the given +.Ar prefix +instead. +.Pp +The options are as follows: +.Bl -tag -width indent +.It Ar action +This required option is either +.Dq add +or +.Dq delete +and determines +whether the managed symlinks are added or deleted. +.It Ar packlist ... +These are paths to packlists containing the files installed as +part of a module. +Each line of a packlist contains a path terminated by a newline. +If no packlists are specified, then the packlist for Perl itself +is used. +.It Fl f , -force +Unlink any already existing files, permitting the new symlinks +to replace the existing ones. +.It Fl n , -noaction +Do not actually make any changes to the files in +.Ar prefix . +.It Fl p Ar prefix , Fl -prefix= Ns Ar prefix +Manage the symlinks in +.Ar prefix . +By default, +.Nm +manages the symlinks in the location referenced by the perl configuration +variable +.Va prefix . +.It Fl v +Be verbose. +Display on standard error the shell-equivalent commands that +are being executed. +.El +.Sh SEE ALSO +.Xr perl 1 , +.Xr symlink 2 +.Sh AUTHORS +.An Johnny C. Lam +.Aq jlam@NetBSD.org diff --git a/lang/perl5/files/perllink.in b/lang/perl5/files/perllink.in new file mode 100644 index 00000000000..44dfacca2d5 --- /dev/null +++ b/lang/perl5/files/perllink.in @@ -0,0 +1,195 @@ +#!@SH@ +# $NetBSD: perllink.in,v 1.1 2005/08/06 06:18:45 jlam Exp $ +# +# Copyright (c) 2005 The NetBSD Foundation, Inc. +# All rights reserved. +# +# This code is derived from software contributed to The NetBSD Foundation +# by Johnny C. Lam. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by the NetBSD +# Foundation, Inc. and its contributors. +# 4. Neither the name of The NetBSD Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +# +# This script parses the packlists listed on the command line and either +# adds or deletes the symlinks in <prefix>/bin and <prefix>/man/man1 that +# match the files in the packlists. +# + +perlprog="@PERL5@" + +usage() +{ + echo 1>&2 "usage: $0 [-fnv] [-p prefix] add|delete [packlist ...]" + exit 1 +} + +opt_action= +opt_force= +opt_noaction= +opt_prefix= +opt_packlists= +opt_verbose= + +while test $# -gt 0; do + opt="$1" + case "$opt" in + -f|--force) opt_force=yes; shift ;; + -n|--noaction) opt_noaction=yes; shift ;; + -p) opt_prefix="$2"; shift; shift ;; + --prefix=*) opt_prefix="${1#--prefix=}"; shift ;; + -v|--verbose) opt_verbose=yes; shift ;; + --) break; shift ;; + -*) usage ;; + [!-]*) break ;; + esac +done + +# We expect the action argument, as well as any packlists, to be left +# in the argument list. +# +test $# -gt 0 || usage +opt_action="$1"; shift + +# Get the values of various Config.pm values from perl. +eval `$perlprog -V:prefix -V:scriptdir -V:man1dir -V:vendorprefix -V:vendorscript -V:vendorman1dir -V:siteprefix -V:sitescript -V:siteman1dir -V:archlib` + +# The remaining arguments, if any, are packlists. +if test $# -gt 0; then + opt_packlists="$@" +elif test -f "$archlib/.packlist"; then + opt_packlists="$archlib/.packlist" +fi + +test -n "$opt_prefix" || opt_prefix="$prefix" + +# Re-point variables so that if they are under $prefix, then they are +# recomputed to point under $opt_prefix. +# +case "$scriptdir" in +$prefix/*) scriptdir="$opt_prefix/${scriptdir#$prefix/}" ;; +"") scriptdir="$opt_prefix/bin" ;; +esac +case "$man1dir" in +$prefix/*) man1dir="$opt_prefix/${man1dir#$prefix/}" ;; +"") man1dir="$opt_prefix/man/man1" ;; +esac +case "$siteprefix" in +$prefix/*) siteprefix="$opt_prefix/${siteprefix#$prefix/}" ;; +"") siteprefix="$opt_prefix" ;; +esac +case "$sitescript" in +$prefix/*) sitescript="$opt_prefix/${sitescript#$prefix/}" ;; +"") sitescript="$scriptdir" ;; +esac +case "$siteman1dir" in +$prefix/*) siteman1dir="$opt_prefix/${siteman1dir#$prefix/}" ;; +"") siteman1dir="$man1dir" ;; +esac +case "$vendorprefix" in +$prefix/*) vendorprefix="$opt_prefix/${vendorprefix#$prefix/}" ;; +"") vendorprefix="$opt_prefix" ;; +esac +case "$vendorscript" in +$prefix/*) vendorscript="$opt_prefix/${vendorscript#$prefix/}" ;; +"") vendorscript="$scriptdir" ;; +esac +case "$vendorman1dir" in +$prefix/*) vendorman1dir="$opt_prefix/${vendorman1dir#$prefix/}" ;; +"") vendorman1dir="$man1dir" ;; +esac + +destbindir="$opt_prefix/bin" +destman1dir="$opt_prefix/man/man1" + +echo __dummy__ | perl -pe '0' $opt_packlists | +{ while read file junk; do + case "$file" in + $scriptdir/*|$sitescript/*|$vendorscript/*) destdir="$destbindir" ;; + $man1dir/*|$siteman1dir/*|$vendorman1dir/*) destdir="$destman1dir" ;; + esac + + case "$file" in + $scriptdir/*) dest="$destdir/${file#$scriptdir/}" ;; + $sitescript/*) dest="$destdir/${file#$sitescript/}" ;; + $vendorscript/*) dest="$destdir/${file#$vendorscript/}" ;; + $man1dir/*) dest="$destdir/${file#$man1dir/}" ;; + $siteman1dir/*) dest="$destdir/${file#$siteman1dir/}" ;; + $vendorman1dir/*) dest="$destdir/${file#$vendorman1dir/}" ;; + *) continue ;; + esac + + test "$file" != "$dest" || continue + + # Set $src to be a relative symlink from $file into $destdir. + file="${file#/}" + destdir="${destdir#/}" + while test "${file%%/*}" = "${destdir%%/*}"; do + case "$file" in + */*) file="${file#*/}" ;; + *) file= ;; + esac + case "$destdir" in + */*) destdir="${destdir#*/}" ;; + *) destdir= ;; + esac + done + src="" + while test -n "$destdir"; do + src="../$src" + case "$destdir" in + */*) destdir="${destdir#*/}" ;; + *) destdir= ;; + esac + done + src="$src$file" + + case "$opt_action" in + add|delete) + if test -n "$opt_force"; then + test -z "$opt_verbose" || \ + echo "print STDERR \"rm $dest\\n\";" + test -n "$opt_noaction" || \ + echo "unlink(\"$dest\");" + fi + ;; + *) + usage + ;; + esac + case "$opt_action" in + add) + test -z "$opt_verbose" || \ + echo "print STDERR \"ln -s $src $dest\\n\";" + test -n "$opt_noaction" || \ + echo "symlink(\"$src\", \"$dest\");" + ;; + esac +done; +echo "exit(0);"; } | $perlprog -w - diff --git a/lang/perl5/module.mk b/lang/perl5/module.mk index fa998fe2bbb..dad5e897e7b 100644 --- a/lang/perl5/module.mk +++ b/lang/perl5/module.mk @@ -1,4 +1,4 @@ -# $NetBSD: module.mk,v 1.47 2005/07/13 18:01:31 jlam Exp $ +# $NetBSD: module.mk,v 1.48 2005/08/06 06:18:45 jlam Exp $ # # This Makefile fragment is intended to be included by packages that build # and install perl5 modules. @@ -34,10 +34,6 @@ _PERL5_MODULE_MK= # defined .include "../../mk/bsd.prefs.mk" -BUILDLINK_DEPMETHOD.perl+= full - -BUILDING_PERL5?= no -BUILDING_MODULE_BUILD?= no PERL5_MODULE_TYPE?= MakeMaker .if (${PERL5_MODULE_TYPE} != "MakeMaker") && \ @@ -45,119 +41,171 @@ PERL5_MODULE_TYPE?= MakeMaker PKG_FAIL_REASON+= "\`\`${PERL5_MODULE_TYPE}'' is not a supported PERL5_MODULE_TYPE." .endif -.if empty(BUILDING_PERL5:M[yY][eE][sS]) -. include "../../lang/perl5/buildlink3.mk" +# Default test target for Perl modules +TEST_TARGET?= test + +.include "../../mk/compiler.mk" + +.if ${OPSYS} == "AIX" +. if !empty(CC_VERSION:Mgcc*) +BROKEN= Perl does not like building with GCC on AIX, please use a different compiler +. endif +.endif + +.if ${PERL5_MODULE_TYPE} == "Module::Build" +_PERL5_MODTYPE= modbuild +.elif ${PERL5_MODULE_TYPE} == "MakeMaker" +_PERL5_MODTYPE= makemaker .endif -.if empty(BUILDING_MODULE_BUILD:M[yY][eE][sS]) && \ + +########################################################################### +### +### Add the proper dependencies for using the specified module build +### system. +### + +BUILDLINK_DEPMETHOD.perl+= full +.include "../../lang/perl5/buildlink3.mk" + +.if empty(PKGPATH:Mdevel/p5-Module-Build) && \ (${PERL5_MODULE_TYPE} == "Module::Build") BUILD_DEPENDS+= p5-Module-Build>=0.2608nb1:../../devel/p5-Module-Build .endif -.include "../../lang/perl5/vars.mk" -PERL5_CONFIGURE?= YES +########################################################################### +### +### Target definitions (configure, build, install, etc.) +### + +PERL5_CONFIGURE?= yes PERL5_CONFIGURE_DIRS?= ${CONFIGURE_DIRS} -# All pkgsrc-install perl modules are installed into the "site" +MAKE_ENV+= LC_ALL=C + +# All pkgsrc-installed Perl modules are installed into the "vendor" # directories. # -MAKE_PARAMS+= INSTALLDIRS=site - -.include "../../mk/compiler.mk" - -.if ${OPSYS} == "AIX" -.if !empty(CC_VERSION:Mgcc*) -BROKEN= Perl does not like building with gcc on AIX, please use a different compiler -.endif -.endif +MAKE_PARAMS.makemaker+= INSTALLDIRS=vendor +MAKE_PARAMS.modbuild+= installdirs=vendor -MAKE_ENV+= LC_ALL=C -.if ${PERL5_MODULE_TYPE} == "Module::Build" -_CONF_ARG= Build.PL -.elif ${PERL5_MODULE_TYPE} == "MakeMaker" -_CONF_ARG= Makefile.PL ${MAKE_PARAMS} -.endif +MAKE_PARAMS+= ${MAKE_PARAMS.${_PERL5_MODTYPE}} -.PHONY: perl5-configure -perl5-configure: +.PHONY: do-makemaker-configure +do-makemaker-configure: ${_PKG_SILENT}${_PKG_DEBUG} \ for dir in ${PERL5_CONFIGURE_DIRS}; do \ - if [ -f $$dir/Makefile.PL ]; then \ + if ${TEST} -f $$dir/Makefile.PL; then \ ( cd $$dir && ${SETENV} ${MAKE_ENV} \ - ${PERL5} ${_CONF_ARG}); \ + ${PERL5} Makefile.PL ${MAKE_PARAMS} ); \ fi; \ done -.if defined(PERL5_CONFIGURE) && !empty(PERL5_CONFIGURE:M[yY][eE][sS]) -. if target(do-configure) -do-configure: perl5-configure -. else -do-configure: perl5-configure - ${_PKG_SILENT}${_PKG_DEBUG}${DO_NADA} -. endif -.endif +.PHONY: do-modbuild-configure +do-modbuild-configure: + ${_PKG_SILENT}${_PKG_DEBUG} \ + for dir in ${PERL5_CONFIGURE_DIRS}; do \ + if ${TEST} -f $$dir/Build.PL; then \ + ( cd $$dir && ${SETENV} ${MAKE_ENV} \ + ${PERL5} Build.PL ${MAKE_PARAMS} ); \ + fi; \ + done -# Repoint all of the site-specific variables to be under the perl5 -# module's ${PREFIX}. -# -.for _var_ in ${_PERL5_SITEVARS} INSTALLSCRIPT -PERL5_${_var_}= ${PREFIX}/${PERL5_SUB_${_var_}} -PERL5_MAKE_FLAGS+= ${_var_}="${PERL5_${_var_}}" -.endfor +.PHONY: perl5-configure +perl5-configure: do-${_PERL5_MODTYPE}-configure -.if ${PERL5_MODULE_TYPE} == "MakeMaker" -# -# The PREFIX in the generated Makefile will point to ${_PERL5_PREFIX}, -# so override its value to the module's ${PREFIX}. -# -PERL5_MAKE_FLAGS+= PREFIX="${PREFIX}" +.if !empty(PERL5_CONFIGURE:M[yY][eE][sS]) +do-configure: perl5-configure .endif -.if ${PERL5_MODULE_TYPE} == "Module::Build" -do-build: +.PHONY: do-modbuild-build +do-modbuild-build: @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./Build -do-test: +.PHONY: do-modbuild-test +do-modbuild-test: @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./Build test -do-install: +.PHONY: do-modbuild-install +do-modbuild-install: @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./Build install -.endif -.if defined(DEFAULT_VIEW.perl) -DEFAULT_VIEW.${PKGBASE}= ${DEFAULT_VIEW.perl} -.endif +.for _target_ in build test install +. if target(do-${_PERL5_MODTYPE}-${_target_}) +do-${_target_}: do-${_PERL5_MODTYPE}-${_target_} +. endif +.endfor -.if defined(PERL5_LDFLAGS) && !empty(PERL5_LDFLAGS) -FIX_RPATH+= PERL5_LDFLAGS -LDFLAGS+= ${PERL5_LDFLAGS} -.endif + +########################################################################### +### +### Make variable overrides +### # MakeMaker provides two hooks, OPTIMIZE and OTHERLDFLAGS, to # customize the arguments passed to the preprocessor and linker, # respectively. # -PERL5_MAKE_FLAGS+= OPTIMIZE="${CFLAGS} ${CPPFLAGS}" +PERL5_MAKE_FLAGS.makemaker+= OPTIMIZE=${CFLAGS:Q}" "${CPPFLAGS:Q} .if ${OBJECT_FMT} == "a.out" -PERL5_MAKE_FLAGS+= OTHERLDFLAGS="${LDFLAGS:S/-Wl,//g}" +PERL5_MAKE_FLAGS.makemaker+= OTHERLDFLAGS=${LDFLAGS:S/-Wl,//g:Q} .else -PERL5_MAKE_FLAGS+= OTHERLDFLAGS="${LDFLAGS}" +PERL5_MAKE_FLAGS.makemaker+= OTHERLDFLAGS=${LDFLAGS:Q} .endif +# Repoint all of the vendor-specific variables to be under the perl5 +# module's ${PREFIX}. +# +.include "../../lang/perl5/vars.mk" +.for _var_ in ${_PERL5_VARS} +PERL5_MAKE_FLAGS.makemaker+= ${_var_}=${PERL5_${_var_}:Q} +.endfor +# +# The PREFIX in the generated Makefile will point to ${_PERL5_PREFIX}, +# so override its value to the module's ${PREFIX}. +# +PERL5_MAKE_FLAGS.makemaker+= PREFIX=${PREFIX:Q} + +PERL5_MAKE_FLAGS+= ${PERL5_MAKE_FLAGS.${_PERL5_MODTYPE}} +MAKE_FLAGS+= ${PERL5_MAKE_FLAGS} + +.if defined(PERL5_LDFLAGS) && !empty(PERL5_LDFLAGS) +FIX_RPATH+= PERL5_LDFLAGS +LDFLAGS+= ${PERL5_LDFLAGS} +.endif + + +########################################################################### +### +### INSTALL/DEINSTALL scripts to manage symlinks +### + +USE_PKGINSTALL= yes +INSTALL_EXTRA_TMPL+= ${.CURDIR}/../../lang/perl5/files/install_link.tmpl +DEINSTALL_EXTRA_TMPL+= ${.CURDIR}/../../lang/perl5/files/deinstall_link.tmpl +FILES_SUBST+= PERL5_COMMENT= +FILES_SUBST+= PERL5_PACKLIST=${_PERL5_PACKLIST:Q} + + +########################################################################### +### +### Packlist -> PLIST generation +### + # Generate the PLIST from the files listed in PERL5_PACKLIST. .if defined(PERL5_PACKLIST) -PERL5_PACKLIST_DIR?= ${PERL5_SITEARCH} +PERL5_PACKLIST_DIR?= ${PERL5_INSTALLVENDORARCH} _PERL5_PACKLIST= ${PERL5_PACKLIST:S/^/${PERL5_PACKLIST_DIR}\//} PERL5_PLIST_COMMENT= \ - ( ${ECHO} "@comment The following lines are automatically generated"; \ - ${ECHO} "@comment from the installed .packlist files." ) + { ${ECHO} "@comment The following lines are automatically generated"; \ + ${ECHO} "@comment from the installed .packlist files."; } PERL5_PLIST_FILES= \ - ( ${CAT} ${_PERL5_PACKLIST}; for f in ${_PERL5_PACKLIST}; do [ ! -f $$f ] || ${ECHO} $$f; done ) \ + { ${CAT} ${_PERL5_PACKLIST}; for f in ${_PERL5_PACKLIST}; do ${TEST} ! -f "$$f" || ${ECHO} "$$f"; done; } \ | ${SED} -e "s,[ ].*,," -e "s,/\./,/,g" -e "s,${PREFIX}/,," \ | ${SORT} -u PERL5_PLIST_DIRS= \ - ( ${CAT} ${_PERL5_PACKLIST}; for f in ${_PERL5_PACKLIST}; do [ ! -f $$f ] || ${ECHO} $$f; done ) \ + { ${CAT} ${_PERL5_PACKLIST}; for f in ${_PERL5_PACKLIST}; do ${TEST} ! -f "$$f" || ${ECHO} "$$f"; done; } \ | ${SED} -e "s,[ ].*,," -e "s,/\./,/,g" -e "s,${PREFIX}/,," \ -e "s,^,@unexec \${RMDIR} -p %D/," \ -e "s,/[^/]*$$, 2>/dev/null || ${TRUE}," \ @@ -168,41 +216,4 @@ PERL5_GENERATE_PLIST= ${PERL5_PLIST_COMMENT}; \ GENERATE_PLIST+= ${PERL5_GENERATE_PLIST}; .endif -# The build and install stages require slightly different values for -# INSTALLARCHLIB. During the build, INSTALLARCHLIB refers to the -# directory where libperl.so may be found, which should point into the -# default view. During the install, INSTALLARCHLIB refers to the -# directory where the perllocal.pod file should be installed, which -# should point into the package prefix. -# -.if empty(BUILDING_PERL5:M[yY][eE][sS]) -MAKE_FLAGS+= ${PERL5_MAKE_FLAGS} -BUILD_MAKE_FLAGS= ${MAKE_FLAGS} -BUILD_MAKE_FLAGS+= INSTALLARCHLIB="${VIEWBASE}/${PERL5_SUB_INSTALLARCHLIB}" -INSTALL_MAKE_FLAGS= ${MAKE_FLAGS} -INSTALL_MAKE_FLAGS+= INSTALLARCHLIB="${PREFIX}/${PERL5_SUB_INSTALLARCHLIB}" -.endif - -# Remove the perllocal.pod file from the installation since we don't -# bother keeping the file contents up-to-date anyway. -# -.if ${PKG_INSTALLATION_TYPE} == "pkgviews" -post-install: perl5-post-install -.endif - -.PHONY: perl5-post-install -perl5-post-install: - ${_PKG_SILENT}${_PKG_DEBUG} \ - for dir in \ - ${PREFIX}/${PERL5_SUB_INSTALLARCHLIB} \ - ${PERL5_INSTALLSITEARCH}; \ - do \ - if [ -f $$dir/perllocal.pod ]; then \ - ${RM} -f $$dir/perllocal.pod; \ - fi; \ - done - -# Default test target for perl5 modules -TEST_TARGET?= test - .endif # _PERL5_MODULE_MK diff --git a/lang/perl5/patches/patch-aa b/lang/perl5/patches/patch-aa index 68259c37791..91b08bc57cc 100644 --- a/lang/perl5/patches/patch-aa +++ b/lang/perl5/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.26 2005/06/24 06:43:45 jlam Exp $ +$NetBSD: patch-aa,v 1.27 2005/08/06 06:18:45 jlam Exp $ --- lib/ExtUtils/MM_Unix.pm.orig 2004-01-05 17:34:59.000000000 -0500 +++ lib/ExtUtils/MM_Unix.pm @@ -48,3 +48,39 @@ $NetBSD: patch-aa,v 1.26 2005/06/24 06:43:45 jlam Exp $ } } } +@@ -2480,13 +2480,13 @@ sub install { + my(@m); + + push @m, q{ +-install :: all pure_install doc_install ++install :: all pure_install + +-install_perl :: all pure_perl_install doc_perl_install ++install_perl :: all pure_perl_install + +-install_site :: all pure_site_install doc_site_install ++install_site :: all pure_site_install + +-install_vendor :: all pure_vendor_install doc_vendor_install ++install_vendor :: all pure_vendor_install + + pure_install :: pure_$(INSTALLDIRS)_install + +@@ -2519,7 +2519,7 @@ pure_site_install :: + $(INST_LIB) $(DESTINSTALLSITELIB) \ + $(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \ + $(INST_BIN) $(DESTINSTALLSITEBIN) \ +- $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \ ++ $(INST_SCRIPT) $(DESTINSTALLSITESCRIPT) \ + $(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \ + $(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR) + $(NOECHO) $(WARN_IF_OLD_PACKLIST) \ +@@ -2532,7 +2532,7 @@ pure_vendor_install :: + $(INST_LIB) $(DESTINSTALLVENDORLIB) \ + $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \ + $(INST_BIN) $(DESTINSTALLVENDORBIN) \ +- $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \ ++ $(INST_SCRIPT) $(DESTINSTALLVENDORSCRIPT) \ + $(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \ + $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR) + diff --git a/lang/perl5/patches/patch-ah b/lang/perl5/patches/patch-ah index 002c1bb137e..27c45c2cc78 100644 --- a/lang/perl5/patches/patch-ah +++ b/lang/perl5/patches/patch-ah @@ -1,67 +1,91 @@ -$NetBSD: patch-ah,v 1.6 2005/06/24 06:43:46 jlam Exp $ +$NetBSD: patch-ah,v 1.7 2005/08/06 06:18:45 jlam Exp $ ---- perl.c.orig 2004-11-23 10:16:56.000000000 -0500 +--- perl.c.orig 2005-04-22 10:14:27.000000000 -0400 +++ perl.c -@@ -4314,12 +4314,33 @@ S_init_perllib(pTHX) +@@ -4391,45 +4391,12 @@ S_init_perllib(pTHX) } /* Use the ~-expanded versions of APPLLIB (undocumented), - ARCHLIB PRIVLIB SITEARCH SITELIB VENDORARCH and VENDORLIB -+ SITEARCH SITELIB ARCHLIB PRIVLIB VENDORARCH and VENDORLIB ++ SITEARCH SITELIB VENDORARCH VENDORLIB ARCHLIB and PRIVLIB */ #ifdef APPLLIB_EXP incpush(APPLLIB_EXP, TRUE, TRUE, TRUE); #endif -+#ifdef SITEARCH_EXP -+ /* sitearch is always relative to sitelib on Windows for -+ * DLL-based path intuition to work correctly */ -+# if !defined(WIN32) -+ incpush(SITEARCH_EXP, FALSE, FALSE, TRUE); -+# endif -+#endif -+ -+#ifdef SITELIB_EXP -+# if defined(WIN32) -+ /* this picks up sitearch as well */ -+ incpush(SITELIB_EXP, TRUE, FALSE, TRUE); -+# else -+ incpush(SITELIB_EXP, FALSE, FALSE, TRUE); -+# endif -+#endif -+ -+#ifdef SITELIB_STEM /* Search for version-specific dirs below here */ -+ incpush(SITELIB_STEM, FALSE, TRUE, TRUE); -+#endif -+ - #ifdef ARCHLIB_EXP - incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE); - #endif -@@ -4353,27 +4374,6 @@ S_init_perllib(pTHX) - incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE); - #endif - --#ifdef SITEARCH_EXP -- /* sitearch is always relative to sitelib on Windows for -- * DLL-based path intuition to work correctly */ --# if !defined(WIN32) -- incpush(SITEARCH_EXP, FALSE, FALSE, TRUE); --# endif +-#ifdef ARCHLIB_EXP +- incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE); -#endif -- --#ifdef SITELIB_EXP --# if defined(WIN32) -- /* this picks up sitearch as well */ -- incpush(SITELIB_EXP, TRUE, FALSE, TRUE); --# else -- incpush(SITELIB_EXP, FALSE, FALSE, TRUE); --# endif +-#ifdef MACOS_TRADITIONAL +- { +- Stat_t tmpstatbuf; +- SV * privdir = NEWSV(55, 0); +- char * macperl = PerlEnv_getenv("MACPERL"); +- +- if (!macperl) +- macperl = ""; +- +- Perl_sv_setpvf(aTHX_ privdir, "%slib:", macperl); +- if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) +- incpush(SvPVX(privdir), TRUE, FALSE, TRUE); +- Perl_sv_setpvf(aTHX_ privdir, "%ssite_perl:", macperl); +- if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) +- incpush(SvPVX(privdir), TRUE, FALSE, TRUE); +- +- SvREFCNT_dec(privdir); +- } +- if (!PL_tainting) +- incpush(":", FALSE, FALSE, TRUE); +-#else +-#ifndef PRIVLIB_EXP +-# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl" -#endif -- --#ifdef SITELIB_STEM /* Search for version-specific dirs below here */ -- incpush(SITELIB_STEM, FALSE, TRUE, TRUE); +-#if defined(WIN32) +- incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE); +-#else +- incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE); -#endif - - #ifdef PERL_VENDORARCH_EXP - /* vendorarch is always relative to vendorlib on Windows for + #ifdef SITEARCH_EXP + /* sitearch is always relative to sitelib on Windows for * DLL-based path intuition to work correctly */ +@@ -4471,6 +4438,39 @@ S_init_perllib(pTHX) + incpush(PERL_VENDORLIB_STEM, FALSE, TRUE, TRUE); + #endif + ++#ifdef ARCHLIB_EXP ++ incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE); ++#endif ++#ifdef MACOS_TRADITIONAL ++ { ++ Stat_t tmpstatbuf; ++ SV * privdir = NEWSV(55, 0); ++ char * macperl = PerlEnv_getenv("MACPERL"); ++ ++ if (!macperl) ++ macperl = ""; ++ ++ Perl_sv_setpvf(aTHX_ privdir, "%slib:", macperl); ++ if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) ++ incpush(SvPVX(privdir), TRUE, FALSE, TRUE); ++ Perl_sv_setpvf(aTHX_ privdir, "%ssite_perl:", macperl); ++ if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) ++ incpush(SvPVX(privdir), TRUE, FALSE, TRUE); ++ ++ SvREFCNT_dec(privdir); ++ } ++ if (!PL_tainting) ++ incpush(":", FALSE, FALSE, TRUE); ++#else ++#ifndef PRIVLIB_EXP ++# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl" ++#endif ++#if defined(WIN32) ++ incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE); ++#else ++ incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE); ++#endif ++ + #ifdef PERL_OTHERLIBDIRS + incpush(PERL_OTHERLIBDIRS, TRUE, TRUE, TRUE); + #endif diff --git a/lang/perl5/patches/patch-al b/lang/perl5/patches/patch-al new file mode 100644 index 00000000000..1ef3b34fffa --- /dev/null +++ b/lang/perl5/patches/patch-al @@ -0,0 +1,21 @@ +$NetBSD: patch-al,v 1.3 2005/08/06 06:18:45 jlam Exp $ + +--- lib/ExtUtils/MM_VMS.pm.orig 2004-01-05 17:34:59.000000000 -0500 ++++ lib/ExtUtils/MM_VMS.pm +@@ -1457,13 +1457,13 @@ sub install { + } + + push @m, q[ +-install :: all pure_install doc_install ++install :: all pure_install + $(NOECHO) $(NOOP) + +-install_perl :: all pure_perl_install doc_perl_install ++install_perl :: all pure_perl_install + $(NOECHO) $(NOOP) + +-install_site :: all pure_site_install doc_site_install ++install_site :: all pure_site_install + $(NOECHO) $(NOOP) + + pure_install :: pure_$(INSTALLDIRS)_install diff --git a/lang/perl5/patches/patch-am b/lang/perl5/patches/patch-am new file mode 100644 index 00000000000..97baf7442de --- /dev/null +++ b/lang/perl5/patches/patch-am @@ -0,0 +1,55 @@ +$NetBSD: patch-am,v 1.3 2005/08/06 06:18:45 jlam Exp $ + +--- lib/ExtUtils/MakeMaker.pm.orig 2004-01-05 17:34:59.000000000 -0500 ++++ lib/ExtUtils/MakeMaker.pm +@@ -215,7 +215,7 @@ sub full_setup { + INSTALLMAN1DIR INSTALLMAN3DIR + INSTALLSITEMAN1DIR INSTALLSITEMAN3DIR + INSTALLVENDORMAN1DIR INSTALLVENDORMAN3DIR +- INSTALLSCRIPT ++ INSTALLSCRIPT INSTALLSITESCRIPT INSTALLVENDORSCRIPT + PERL_LIB PERL_ARCHLIB + SITELIBEXP SITEARCHEXP + +@@ -1075,7 +1075,7 @@ INSTALLDIRS according to the following t + INST_ARCHLIB INSTALLARCHLIB INSTALLSITEARCH INSTALLVENDORARCH + INST_LIB INSTALLPRIVLIB INSTALLSITELIB INSTALLVENDORLIB + INST_BIN INSTALLBIN INSTALLSITEBIN INSTALLVENDORBIN +- INST_SCRIPT INSTALLSCRIPT INSTALLSCRIPT INSTALLSCRIPT ++ INST_SCRIPT INSTALLSCRIPT INSTALLSITESCRIPT INSTALLVENDORSCRIPT + INST_MAN1DIR INSTALLMAN1DIR INSTALLSITEMAN1DIR INSTALLVENDORMAN1DIR + INST_MAN3DIR INSTALLMAN3DIR INSTALLSITEMAN3DIR INSTALLVENDORMAN3DIR + +@@ -1527,7 +1527,7 @@ Defaults to $Config{installprivlib}. + =item INSTALLSCRIPT + + Used by 'make install' which copies files from INST_SCRIPT to this +-directory. ++directory if INSTALLDIRS is set to perl. + + =item INSTALLSITEARCH + +@@ -1554,6 +1554,11 @@ $(SITEPREFIX)/man/man$(MAN*EXT). + + If set to 'none', no man pages will be installed. + ++=item INSTALLSITESCRIPT ++ ++Used by 'make install' which copies files from INST_SCRIPT to this ++directory if INSTALLDIRS is set to site (default). ++ + =item INSTALLVENDORARCH + + Used by 'make install', which copies files from INST_ARCHLIB to this +@@ -1578,6 +1583,11 @@ INSTALLDIRS=vendor. Defaults to $(VENDO + + If set to 'none', no man pages will be installed. + ++=item INSTALLVENDORSCRIPT ++ ++Used by 'make install' which copies files from INST_SCRIPT to this ++directory if INSTALLDIRS is set to vendor. ++ + =item INST_ARCHLIB + + Same as INST_LIB for architecture dependent files. diff --git a/lang/perl5/patches/patch-an b/lang/perl5/patches/patch-an new file mode 100644 index 00000000000..584129ece08 --- /dev/null +++ b/lang/perl5/patches/patch-an @@ -0,0 +1,13 @@ +$NetBSD: patch-an,v 1.1 2005/08/06 06:18:45 jlam Exp $ + +--- lib/ExtUtils/MM_Any.pm.orig 2004-01-05 17:34:59.000000000 -0500 ++++ lib/ExtUtils/MM_Any.pm +@@ -57,7 +57,7 @@ sub installvars { + return qw(PRIVLIB SITELIB VENDORLIB + ARCHLIB SITEARCH VENDORARCH + BIN SITEBIN VENDORBIN +- SCRIPT ++ SCRIPT SITESCRIPT VENDORSCRIPT + MAN1DIR SITEMAN1DIR VENDORMAN1DIR + MAN3DIR SITEMAN3DIR VENDORMAN3DIR + ); diff --git a/lang/perl5/patches/patch-be b/lang/perl5/patches/patch-be deleted file mode 100644 index d5dd53dbe56..00000000000 --- a/lang/perl5/patches/patch-be +++ /dev/null @@ -1,24 +0,0 @@ -$NetBSD: patch-be,v 1.1 2005/06/24 06:43:47 jlam Exp $ - ---- lib/perl5db.pl.orig 2004-11-17 07:51:18.000000000 -0500 -+++ lib/perl5db.pl -@@ -215,7 +215,7 @@ the TTY to use for debugging i/o. - =item * noTTY - - if set, goes in NonStop mode. On interrupt, if TTY is not set, --uses the value of noTTY or F</tmp/perldbtty$$> to find TTY using -+uses the value of noTTY or F<$HOME/.perldbtty$$> to find TTY using - Term::Rendezvous. Current variant is to have the name of TTY in this - file. - -@@ -6004,8 +6004,8 @@ sub setterm { - eval "require Term::Rendezvous;" or die; - - # See if we have anything to pass to Term::Rendezvous. -- # Use /tmp/perldbtty$$ if not. -- my $rv = $ENV{PERLDB_NOTTY} || "/tmp/perldbtty$$"; -+ # Use $HOME/.perldbtty$$ if not [CAN-2004-0976]. -+ my $rv = $ENV{PERLDB_NOTTY} || "$ENV{HOME}/.perldbtty$$"; - - # Rendezvous and get the filehandles. - my $term_rv = new Term::Rendezvous $rv; diff --git a/lang/perl5/patches/patch-bf b/lang/perl5/patches/patch-bf deleted file mode 100644 index cc65e2cc14a..00000000000 --- a/lang/perl5/patches/patch-bf +++ /dev/null @@ -1,24 +0,0 @@ -$NetBSD: patch-bf,v 1.1 2005/06/24 06:43:47 jlam Exp $ - ---- perlio.c.orig 2004-09-10 03:06:52.000000000 -0400 -+++ perlio.c -@@ -454,7 +454,8 @@ PerlIO_debug(const char *fmt, ...) - va_list ap; - dSYS; - va_start(ap, fmt); -- if (!dbg) { -+ /* Tighten uid/gid checks [CAN-2005-0155] */ -+ if (!dbg && !PL_tainting && PL_uid == PL_euid && PL_gid == PL_egid) { - char *s = PerlEnv_getenv("PERLIO_DEBUG"); - if (s && *s) - dbg = PerlLIO_open3(s, O_WRONLY | O_CREAT | O_APPEND, 0666); -@@ -471,7 +472,8 @@ PerlIO_debug(const char *fmt, ...) - s = CopFILE(PL_curcop); - if (!s) - s = "(none)"; -- sprintf(buffer, "%s:%" IVdf " ", s, (IV) CopLINE(PL_curcop)); -+ /* Avoid PERLIO_DEBUG buffer overflow [CAN-2005-0156] */ -+ sprintf(buffer, "%.40s:%" IVdf " ", s, (IV) CopLINE(PL_curcop)); - len = strlen(buffer); - vsprintf(buffer+len, fmt, ap); - PerlLIO_write(dbg, buffer, strlen(buffer)); diff --git a/lang/perl5/patches/patch-ca b/lang/perl5/patches/patch-ca index e5cc0bdc5db..283cdf17807 100644 --- a/lang/perl5/patches/patch-ca +++ b/lang/perl5/patches/patch-ca @@ -1,8 +1,8 @@ -$NetBSD: patch-ca,v 1.2 2005/06/24 06:43:47 jlam Exp $ +$NetBSD: patch-ca,v 1.3 2005/08/06 06:18:45 jlam Exp $ ---- Configure.orig 2004-09-10 02:25:52.000000000 -0400 +--- Configure.orig 2005-04-20 12:34:37.000000000 -0400 +++ Configure -@@ -3107,11 +3107,13 @@ EOM +@@ -3111,11 +3111,13 @@ EOM dgux) osname=dgux osvers="$3" ;; @@ -17,7 +17,7 @@ $NetBSD: patch-ca,v 1.2 2005/06/24 06:43:47 jlam Exp $ genix) osname=genix ;; gnu) osname=gnu osvers="$3" ;; -@@ -3133,7 +3135,7 @@ EOM +@@ -3137,7 +3139,7 @@ EOM MiNT) osname=mint ;; netbsd*) osname=netbsd @@ -26,7 +26,7 @@ $NetBSD: patch-ca,v 1.2 2005/06/24 06:43:47 jlam Exp $ ;; news-os) osvers="$3" case "$3" in -@@ -3144,8 +3146,8 @@ EOM +@@ -3148,8 +3150,8 @@ EOM next*) osname=next ;; nonstop-ux) osname=nonstopux ;; openbsd) osname=openbsd @@ -37,16 +37,16 @@ $NetBSD: patch-ca,v 1.2 2005/06/24 06:43:47 jlam Exp $ os2) osname=os2 osvers="$4" ;; -@@ -7852,7 +7854,7 @@ if "$useshrplib"; then +@@ -7856,7 +7858,7 @@ if "$useshrplib"; then solaris) xxx="-R $shrpdir" ;; -- freebsd|netbsd|openbsd) +- freebsd|netbsd|openbsd|interix) + freebsd|netbsd|openbsd|dragonfly|interix) xxx="-Wl,-R$shrpdir" ;; - bsdos|linux|irix*|dec_osf) -@@ -8973,6 +8975,13 @@ EOCP + bsdos|linux|irix*|dec_osf|gnu*) +@@ -8977,6 +8979,13 @@ EOCP ;; esac @@ -60,7 +60,7 @@ $NetBSD: patch-ca,v 1.2 2005/06/24 06:43:47 jlam Exp $ case "$vendorprefix" in '') d_vendorbin="$undef" vendorbin='' -@@ -17290,7 +17299,15 @@ RCAT(Rei,ser) +@@ -17339,7 +17348,15 @@ RCAT(Rei,ser) ACAT(Cir,cus) EOCP $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1 diff --git a/lang/perl5/patches/patch-cb b/lang/perl5/patches/patch-cb index f4377f8f8db..4ee3864c341 100644 --- a/lang/perl5/patches/patch-cb +++ b/lang/perl5/patches/patch-cb @@ -1,7 +1,8 @@ -$NetBSD: patch-cb,v 1.1 2005/06/24 06:43:47 jlam Exp $ ---- Makefile.SH.orig 2004-10-21 08:30:02.000000000 -0700 -+++ Makefile.SH 2005-03-08 18:05:48.000000000 -0700 -@@ -69,7 +69,11 @@ +$NetBSD: patch-cb,v 1.2 2005/08/06 06:18:45 jlam Exp $ + +--- Makefile.SH.orig 2005-02-05 10:17:44.000000000 -0500 ++++ Makefile.SH +@@ -73,7 +73,11 @@ true) sunos*) linklibperl="-lperl" ;; @@ -13,8 +14,8 @@ $NetBSD: patch-cb,v 1.1 2005/06/24 06:43:47 jlam Exp $ + netbsd*|freebsd[234]*|openbsd*|dragonfly*) linklibperl="-L. -lperl" ;; - aix*) -@@ -77,7 +81,7 @@ + interix*) +@@ -85,7 +89,7 @@ true) case "$osvers" in 3*) shrpldflags="$shrpldflags -e _nostart" ;; @@ -23,3 +24,14 @@ $NetBSD: patch-cb,v 1.1 2005/06/24 06:43:47 jlam Exp $ ;; esac shrpldflags="$shrpldflags $ldflags $perllibs $cryptlib" +@@ -969,6 +973,10 @@ s_dummy $(static_ext): miniperl$(EXE_EXT + n_dummy $(nonxs_ext): miniperl$(EXE_EXT) preplibrary $(DYNALOADER) FORCE + @$(LDLIBPTH) sh ext/util/make_ext nonxs $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) + ++.PHONY: printconfig ++printconfig: ++ @eval `$(LDLIBPTH) ./perl -Ilib -V:$(CONFIGVAR)`; echo $$$(CONFIGVAR) ++ + .PHONY: clean _tidy _mopup _cleaner1 _cleaner2 \ + realclean _realcleaner clobber _clobber \ + distclean veryclean _verycleaner diff --git a/lang/perl5/patches/patch-cd b/lang/perl5/patches/patch-cd deleted file mode 100644 index 5b8f03aa9c5..00000000000 --- a/lang/perl5/patches/patch-cd +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-cd,v 1.1 2005/06/24 06:43:47 jlam Exp $ - ---- lib/File/Find.pm.orig Fri Feb 27 11:31:34 2004 -+++ lib/File/Find.pm Mon Apr 26 00:34:04 2004 -@@ -1221,6 +1221,7 @@ - - $File::Find::dont_use_nlink = 1 - if $^O eq 'os2' || $^O eq 'dos' || $^O eq 'amigaos' || $^O eq 'MSWin32' || -+ $^O eq 'interix' || - $^O eq 'cygwin' || $^O eq 'epoc' || $^O eq 'qnx' || - $^O eq 'nto'; - diff --git a/lang/perl5/patches/patch-ce b/lang/perl5/patches/patch-ce index c01c70988be..9adf2941afc 100644 --- a/lang/perl5/patches/patch-ce +++ b/lang/perl5/patches/patch-ce @@ -1,8 +1,8 @@ -$NetBSD: patch-ce,v 1.1 2005/06/24 06:43:47 jlam Exp $ +$NetBSD: patch-ce,v 1.2 2005/08/06 06:18:45 jlam Exp $ ---- lib/File/Temp.pm.orig Fri Apr 23 12:42:30 2004 -+++ lib/File/Temp.pm Fri Apr 23 12:44:21 2004 -@@ -2012,6 +2012,7 @@ +--- lib/File/Temp.pm.orig 2005-04-03 11:27:16.000000000 -0400 ++++ lib/File/Temp.pm +@@ -2128,6 +2128,7 @@ The value is only relevant when C<safe_l { my $TopSystemUID = 10; diff --git a/lang/perl5/patches/patch-cf b/lang/perl5/patches/patch-cf deleted file mode 100644 index 2142490c38c..00000000000 --- a/lang/perl5/patches/patch-cf +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-cf,v 1.1 2005/06/24 06:43:47 jlam Exp $ - ---- t/io/openpid.t.orig Fri Apr 23 12:45:43 2004 -+++ t/io/openpid.t Fri Apr 23 12:45:56 2004 -@@ -23,6 +23,7 @@ - use Config; - $| = 1; - $SIG{PIPE} = 'IGNORE'; -+$SIG{HUP} = 'IGNORE' if $^O eq 'interix'; - - my $perl = which_perl(); - $perl .= qq[ "-I../lib"]; diff --git a/lang/perl5/patches/patch-cg b/lang/perl5/patches/patch-cg deleted file mode 100644 index 881ce18429a..00000000000 --- a/lang/perl5/patches/patch-cg +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-cg,v 1.1 2005/06/24 06:43:47 jlam Exp $ - ---- t/op/groups.t.orig Fri Apr 23 12:46:39 2004 -+++ t/op/groups.t Fri Apr 23 12:46:53 2004 -@@ -133,7 +133,7 @@ - - print "# gr = @gr\n"; - --if ($^O =~ /^(?:uwin|cygwin|solaris)$/) { -+if ($^O =~ /^(?:uwin|cygwin|interix|solaris)$/) { - # Or anybody else who can have spaces in group names. - $gr1 = join(' ', grep(!$did{$_}++, sort split(' ', join(' ', @gr)))); - } else { diff --git a/lang/perl5/patches/patch-ch b/lang/perl5/patches/patch-ch index 80db4adb75f..b5a96982e4b 100644 --- a/lang/perl5/patches/patch-ch +++ b/lang/perl5/patches/patch-ch @@ -1,8 +1,8 @@ -$NetBSD: patch-ch,v 1.1 2005/06/24 06:43:47 jlam Exp $ +$NetBSD: patch-ch,v 1.2 2005/08/06 06:18:45 jlam Exp $ ---- hints/dec_osf.sh.orig 2004-05-14 03:44:00.000000000 +0200 +--- hints/dec_osf.sh.orig 2005-02-05 10:19:27.000000000 -0500 +++ hints/dec_osf.sh -@@ -243,7 +243,7 @@ case "`uname -r`" in +@@ -254,7 +254,7 @@ case "`uname -r`" in # fixed in 4.0E or better. ;; *) diff --git a/lang/perl5/patches/patch-ci b/lang/perl5/patches/patch-ci index 01324fa0395..8cab67363e0 100644 --- a/lang/perl5/patches/patch-ci +++ b/lang/perl5/patches/patch-ci @@ -1,8 +1,8 @@ -$NetBSD: patch-ci,v 1.1 2005/06/24 06:43:47 jlam Exp $ +$NetBSD: patch-ci,v 1.2 2005/08/06 06:18:45 jlam Exp $ ---- pp_sys.c.orig 2004-10-19 13:07:23.000000000 -0400 +--- pp_sys.c.orig 2005-04-27 18:12:46.000000000 -0400 +++ pp_sys.c -@@ -4450,9 +4450,11 @@ PP(pp_gmtime) +@@ -4466,9 +4466,11 @@ PP(pp_gmtime) when = (Time_t)SvIVx(POPs); #endif diff --git a/lang/perl5/vars.mk b/lang/perl5/vars.mk index fa309e69ff2..86150d9f836 100644 --- a/lang/perl5/vars.mk +++ b/lang/perl5/vars.mk @@ -1,4 +1,4 @@ -# $NetBSD: vars.mk,v 1.2 2005/05/12 20:59:29 jlam Exp $ +# $NetBSD: vars.mk,v 1.3 2005/08/06 06:18:45 jlam Exp $ # # This Makefile fragment exposes several Perl configuration variables # to the package Makefiles. The variables are only defined if the @@ -6,18 +6,19 @@ .include "../../mk/bsd.prefs.mk" -_PERL5_SITEVARS= \ - INSTALLSITEBIN INSTALLSITELIB INSTALLSITEARCH \ - INSTALLSITEMAN1DIR INSTALLSITEMAN3DIR \ - SITELIBEXP SITEARCHEXP +_PERL5_VARS= INSTALLARCHLIB INSTALLSCRIPT \ + INSTALLVENDORBIN INSTALLVENDORSCRIPT \ + INSTALLVENDORLIB INSTALLVENDORARCH \ + INSTALLVENDORMAN1DIR INSTALLVENDORMAN3DIR -_PERL5_SITEVAR.INSTALLSITEBIN= installsitebin -_PERL5_SITEVAR.INSTALLSITELIB= installsitelib -_PERL5_SITEVAR.INSTALLSITEARCH= installsitearch -_PERL5_SITEVAR.INSTALLSITEMAN1DIR= installsiteman1dir -_PERL5_SITEVAR.INSTALLSITEMAN3DIR= installsiteman3dir -_PERL5_SITEVAR.SITELIBEXP= sitelibexp -_PERL5_SITEVAR.SITEARCHEXP= sitearchexp +_PERL5_VAR.INSTALLARCHLIB= installarchlib +_PERL5_VAR.INSTALLSCRIPT= installscript +_PERL5_VAR.INSTALLVENDORBIN= installvendorbin +_PERL5_VAR.INSTALLVENDORSCRIPT= installvendorscript +_PERL5_VAR.INSTALLVENDORLIB= installvendorlib +_PERL5_VAR.INSTALLVENDORARCH= installvendorarch +_PERL5_VAR.INSTALLVENDORMAN1DIR= installvendorman1dir +_PERL5_VAR.INSTALLVENDORMAN3DIR= installvendorman3dir .if defined(PERL5) && exists(${PERL5:Q}) # @@ -29,40 +30,18 @@ _PERL5_PREFIX!= \ eval `${PERL5:Q} -V:prefix 2>/dev/null`; ${ECHO} $$prefix . endif MAKEVARS+= _PERL5_PREFIX -. if !defined(_PERL5_SITEPREFIX) -_PERL5_SITEPREFIX!= \ - eval `${PERL5:Q} -V:siteprefix 2>/dev/null`; ${ECHO} $$siteprefix -. endif -MAKEVARS+= _PERL5_SITEPREFIX # -# Define PERL5_SUB_* as the site variables minus the installation prefix +# Define PERL5_SUB_* as the vendor variables minus the installation prefix # define later variables. # -. for _var_ in ${_PERL5_SITEVARS} +. for _var_ in ${_PERL5_VARS} . if !defined(PERL5_SUB_${_var_}) PERL5_SUB_${_var_}!= \ - eval `${PERL5:Q} -V:${_PERL5_SITEVAR.${_var_}} 2>/dev/null`; \ - ${ECHO} $${${_PERL5_SITEVAR.${_var_}}} | ${SED} -e "s,^${_PERL5_SITEPREFIX}/,," + eval `${PERL5:Q} -V:${_PERL5_VAR.${_var_}} 2>/dev/null`; \ + ${ECHO} $${${_PERL5_VAR.${_var_}}} | ${SED} -e "s,^${_PERL5_PREFIX}/,," . endif -MAKEVARS+= PERL5_SUB_${_var_} +PERL5_${_var_}?= ${PREFIX}/${PERL5_SUB_${_var_}} +MAKEVARS+= PERL5_SUB_${_var_} +PLIST_SUBST+= PERL5_SUB_${_var_}=${PERL5_SUB_${_var_}:Q} . endfor - -. if !defined(PERL5_SUB_INSTALLARCHLIB) -PERL5_SUB_INSTALLARCHLIB!= \ - eval `${PERL5} -V:installarchlib 2>/dev/null`; \ - ${ECHO} $$installarchlib | ${SED} -e "s,^${_PERL5_PREFIX}/,," -. endif -MAKEVARS+= PERL5_SUB_INSTALLARCHLIB -. if !defined(PERL5_SUB_INSTALLSCRIPT) -PERL5_SUB_INSTALLSCRIPT!= \ - eval `${PERL5} -V:installscript 2>/dev/null`; \ - ${ECHO} $$installscript | ${SED} -e "s,^${_PERL5_PREFIX}/,," -. endif -MAKEVARS+= PERL5_SUB_INSTALLSCRIPT .endif # PERL5 - -.if ${PKG_INSTALLATION_TYPE} == "overwrite" -. for _var_ in SITELIB SITEARCH ARCHLIB -PERL5_${_var_}?= ${LOCALBASE}/${PERL5_SUB_INSTALL${_var_}} -. endfor -.endif diff --git a/mk/tools/perl.mk b/mk/tools/perl.mk index 0ca5bbe668a..9d026870bdb 100644 --- a/mk/tools/perl.mk +++ b/mk/tools/perl.mk @@ -1,4 +1,4 @@ -# $NetBSD: perl.mk,v 1.18 2005/05/22 02:30:53 jlam Exp $ +# $NetBSD: perl.mk,v 1.19 2005/08/06 06:18:45 jlam Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -49,12 +49,6 @@ # includes find-prefix.mk. # . include "../../lang/perl5/vars.mk" - -# Substitute for PERL5_* variables in PLISTs. -PLIST_SUBST+= PERL5_SITELIB=${PERL5_SUB_INSTALLSITELIB} -PLIST_SUBST+= PERL5_SITEARCH=${PERL5_SUB_INSTALLSITEARCH} -PLIST_SUBST+= PERL5_ARCHLIB=${PERL5_SUB_INSTALLARCHLIB} - .else # # Some packages want the path to the perl tool, even if they don't have diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk index d894e908923..19e019264f3 100644 --- a/mk/tools/replace.mk +++ b/mk/tools/replace.mk @@ -1,4 +1,4 @@ -# $NetBSD: replace.mk,v 1.122 2005/07/26 20:00:50 jlam Exp $ +# $NetBSD: replace.mk,v 1.123 2005/08/06 06:18:45 jlam Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -861,7 +861,7 @@ TOOLS_PATH.pax= ${TOOLS_PREFIX.pax}/bin/pax MAKEFLAGS+= TOOLS_IGNORE.perl= . elif !empty(_TOOLS_USE_PKGSRC.perl:M[yY][eE][sS]) . include "../../lang/perl5/version.mk" -TOOLS_DEPENDS.perl?= {perl>=${PERL5_REQD},perl-thread>=${PERL5_REQD}}:../../lang/perl5 +TOOLS_DEPENDS.perl?= perl>=${PERL5_REQD}:../../lang/perl5 TOOLS_CREATE+= perl TOOLS_FIND_PREFIX+= TOOLS_PREFIX.perl=perl TOOLS_PATH.perl= ${TOOLS_PREFIX.perl}/bin/perl @@ -873,7 +873,7 @@ TOOLS_PATH.perl= ${TOOLS_PREFIX.perl}/bin/perl MAKEFLAGS+= TOOLS_IGNORE.pod2man= . elif !empty(_TOOLS_USE_PKGSRC.pod2man:M[yY][eE][sS]) . include "../../lang/perl5/version.mk" -TOOLS_DEPENDS.perl?= {perl>=${PERL5_REQD},perl-thread>=${PERL5_REQD}}:../../lang/perl5 +TOOLS_DEPENDS.perl?= perl>=${PERL5_REQD}:../../lang/perl5 TOOLS_CREATE+= pod2man TOOLS_FIND_PREFIX+= TOOLS_PREFIX.pod2man=perl TOOLS_PATH.pod2man= ${TOOLS_PREFIX.pod2man}/bin/pod2man |