pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc Update lang/perl5 to 5.8.7. Changes from version 5.8....



details:   https://anonhg.NetBSD.org/pkgsrc/rev/de6954573768
branches:  trunk
changeset: 497858:de6954573768
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sat Aug 06 06:18:44 2005 +0000

description:
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.

diffstat:

 doc/CHANGES                          |    3 +-
 lang/perl5/MESSAGE                   |    9 -
 lang/perl5/Makefile                  |  229 ++++++++++++++++++++------------
 lang/perl5/PLIST                     |    8 +-
 lang/perl5/buildlink3.mk             |   15 +-
 lang/perl5/distinfo                  |   30 ++--
 lang/perl5/files/deinstall_link.tmpl |   16 ++
 lang/perl5/files/install_link.tmpl   |   11 +
 lang/perl5/files/perllink.1          |  126 ++++++++++++++++++
 lang/perl5/files/perllink.in         |  195 ++++++++++++++++++++++++++++
 lang/perl5/module.mk                 |  239 ++++++++++++++++++----------------
 lang/perl5/patches/patch-aa          |   38 +++++-
 lang/perl5/patches/patch-ah          |  126 ++++++++++-------
 lang/perl5/patches/patch-al          |   21 +++
 lang/perl5/patches/patch-am          |   55 ++++++++
 lang/perl5/patches/patch-an          |   13 +
 lang/perl5/patches/patch-be          |   24 ---
 lang/perl5/patches/patch-bf          |   24 ---
 lang/perl5/patches/patch-ca          |   20 +-
 lang/perl5/patches/patch-cb          |   24 ++-
 lang/perl5/patches/patch-cd          |   12 -
 lang/perl5/patches/patch-ce          |    8 +-
 lang/perl5/patches/patch-cf          |   12 -
 lang/perl5/patches/patch-cg          |   13 -
 lang/perl5/patches/patch-ch          |    6 +-
 lang/perl5/patches/patch-ci          |    6 +-
 lang/perl5/vars.mk                   |   61 ++------
 mk/tools/perl.mk                     |    8 +-
 mk/tools/replace.mk                  |    6 +-
 29 files changed, 904 insertions(+), 454 deletions(-)

diffs (truncated from 1837 to 300 lines):

diff -r dcd40c4972b3 -r de6954573768 doc/CHANGES
--- a/doc/CHANGES       Sat Aug 06 05:33:48 2005 +0000
+++ b/doc/CHANGES       Sat Aug 06 06:18:44 2005 +0000
@@ -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 @@
        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 -r dcd40c4972b3 -r de6954573768 lang/perl5/MESSAGE
--- a/lang/perl5/MESSAGE        Sat Aug 06 05:33:48 2005 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r dcd40c4972b3 -r de6954573768 lang/perl5/Makefile
--- a/lang/perl5/Makefile       Sat Aug 06 05:33:48 2005 +0000
+++ b/lang/perl5/Makefile       Sat Aug 06 06:18:44 2005 +0000
@@ -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 @@
 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]
+
+.include "../../mk/bsd.prefs.mk"
 
-PKG_INSTALLATION_TYPES=        overwrite pkgviews
+# 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 @@
 
 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.
+###
+### 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}
+
+# The Perl Configure script will install scripts into "*/script"
+# directories if they exist, so override with explicit settings.
 #
-CONFIGURE_ARGS+=       -Dman3ext="3"
-CONFIGURE_ARGS+=       -Dman3dir="${PERL5_PRIVLIB}/man/man3"
-CONFIGURE_ARGS+=       -Dsiteman3dir="${PERL5_SITEPERL}/man/man3"
+CONFIGURE_ARGS+=       -Dscriptdir=${PERL5_PERLBASE:Q}/bin
+CONFIGURE_ARGS+=       -Dsitescript=${PERL5_SITEBASE:Q}/bin
+CONFIGURE_ARGS+=       -Dvendorscript=${PERL5_VENDORBASE:Q}/bin
 
-# 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.
+# Put the API-specific files into API-specific directories instead
+# of the default version-specific directories.
 #
-CONFIGURE_ARGS+=       -Dman1dir="${PREFIX}/man/man1"
+CONFIGURE_ARGS+=       -Dprivlib=${PERL5_PRIVLIB:Q}
+CONFIGURE_ARGS+=       -Dsitelib=${PERL5_SITELIB:Q}
+CONFIGURE_ARGS+=       -Dvendorlib=${PERL5_VENDORLIB:Q}
 
-# The site directories are all relative to the perl view.
-CONFIGURE_ARGS+=       -Dsiteprefix="${VIEWBASE}"
-CONFIGURE_ARGS+=       -Dsiteman1dir="${VIEWBASE}/man/man1"
-
-.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 @@
 
 # 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 @@
 ### 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 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"
 
-# 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
+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 @@
        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} "";                                           \



Home | Main Index | Thread Index | Old Index