[arch-commits] CVS update of core/base/perl (3 files)

Kevin Piche kevin at archlinux.org
Fri Nov 30 22:36:20 EST 2007


    Date: Friday, November 30, 2007 @ 22:36:20
  Author: kevin
    Path: /home/cvs-core/core/base/perl

   Added: archlinux-cpan-installdir.patch (1.1)
          archlinux-inc-order.patch (1.1)
Modified: PKGBUILD (1.52 -> 1.53)

upgpkg: perl 5.8.8-10
First try at reworking package for new Perl policy


---------------------------------+
 PKGBUILD                        |   53 ++++++++++++++-----
 archlinux-cpan-installdir.patch |   17 ++++++
 archlinux-inc-order.patch       |  101 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 156 insertions(+), 15 deletions(-)


Index: core/base/perl/PKGBUILD
diff -u core/base/perl/PKGBUILD:1.52 core/base/perl/PKGBUILD:1.53
--- core/base/perl/PKGBUILD:1.52	Tue Nov  6 20:43:18 2007
+++ core/base/perl/PKGBUILD	Fri Nov 30 22:36:20 2007
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD,v 1.52 2007/11/07 01:43:18 kevin Exp $
+# $Id: PKGBUILD,v 1.53 2007/12/01 03:36:20 kevin Exp $
 # Maintainer: judd <jvinet at zeroflux.org>
 pkgname=perl
 pkgver=5.8.8
-pkgrel=9
+pkgrel=10
 pkgdesc="Practical Extraction and Report Language"
 arch=(i686 x86_64) 
 license=('GPL' 'PerlArtistic')
@@ -14,15 +14,18 @@
 	http://search.cpan.org/CPAN/authors/id/S/SA/SAPER/Sys-Syslog-0.10.tar.gz
 	perl-5.8.6-picdl.patch0
 	perl-5.8.8-gcc-4.2.0.patch
-	perl-5.8.8-utf-regexes.patch)
+	perl-5.8.8-utf-regexes.patch
+	archlinux-cpan-installdir.patch
+	archlinux-inc-order.patch)
 install=perl.install
 md5sums=('b8c118d4360846829beb30b02a6b91a7'
          '5ae102fe172f2aaf771a8d9cae23ca3a'
-         'e1ce6f6cf32434db77f78be5938af09c'
          '8fc1f24fc7890e4fd8360e7e9f293099'
          '319b56a7ce715fb7a494fe4d5cb9474c'
          '546fc05b63b0add38898361c8de0c949'
-         'b0463a38a49da77734014c1f6d25a8d2')
+         'b0463a38a49da77734014c1f6d25a8d2'
+         'e09a21b169a006b223b5d9a24151402c'
+         '846a09cdcad976cb665bf8a0b9bb614a')
 # for site_perl this is needed!
 options=('emptydirs')
 
@@ -40,24 +43,44 @@
   cd $startdir/src/$pkgname-$pkgver
   patch -Np1 -i ${startdir}/src/perl-5.8.8-gcc-4.2.0.patch || return 1
   patch -Np0 -i ${startdir}/src/perl-5.8.8-utf-regexes.patch || return 1
+  patch -Np0 -i ../archlinux-inc-order.patch
+  patch -Np0 -i ../archlinux-cpan-installdir.patch
+
   if [ "$CARCH" = "x86_64" ]; then
     # for x86_64
     patch -Np0 -i ../perl-5.8.6-picdl.patch0 || return 1
-    ./Configure -des -Dprefix=/usr -Dinstallprefix=$startdir/pkg/usr \
-      -Dman1dir=/usr/man/man1 -Dman3dir=/usr/man/man3 -Doptimize="$CFLAGS" \
-      -Dusethreads -Dcccdlflags='-fPIC'
+    ./Configure -des -Dusethreads -Doptimize="$CFLAGS" -Dprefix=/usr \
+	  -Dinstallprefix=$startdir/pkg/usr -Dvendorprefix=/usr \
+      -Dman1dir=/usr/man/man1 -Dman3dir=/usr/man/man3 \
+      -Dprivlib=/usr/share/perl5/core_perl \
+	  -Darchlib=/usr/lib/perl5/core_perl \
+      -Dsitelib=/usr/share/perl5/site_perl/$pkgver \
+      -Dsitearch=/usr/lib/perl5/site_perl/$pkgver \
+      -Dvendorlib=/usr/share/perl5/vendor_perl \
+      -Dvendorarch=/usr/lib/perl5/vendor_perl \
+	  -Dotherlibdirs=/usr/lib/perl5/current:/usr/lib/perl5/site_perl/current \
+	  -Dman1ext=1perl -Dman3ext=3perl -Dcccdlflags='-fPIC'
   else 
     # for i686
-    ./Configure -des -Dprefix=/usr -Dinstallprefix=$startdir/pkg/usr \
-      -Dman1dir=/usr/man/man1 -Dman3dir=/usr/man/man3 -Doptimize="$CFLAGS" \
-      -Dusethreads
+    ./Configure -des -Dusethreads -Doptimize="$CFLAGS" -Dprefix=/usr \
+	  -Dinstallprefix=$startdir/pkg/usr -Dvendorprefix=/usr \
+      -Dman1dir=/usr/man/man1 -Dman3dir=/usr/man/man3 \
+      -Dprivlib=/usr/share/perl5/core_perl \
+	  -Darchlib=/usr/lib/perl5/core_perl \
+      -Dsitelib=/usr/share/perl5/site_perl/$pkgver \
+      -Dsitearch=/usr/lib/perl5/site_perl/$pkgver \
+      -Dvendorlib=/usr/share/perl5/vendor_perl \
+      -Dvendorarch=/usr/lib/perl5/vendor_perl \
+	  -Dotherlibdirs=/usr/lib/perl5/current:/usr/lib/perl5/site_perl/current \
+	  -Dman1ext=1perl -Dman3ext=3perl
   fi
+
   make || return 1
   make install
   (cd $startdir/pkg/usr/bin; mv perl$pkgver perl; ln -sf c2ph pstruct)
   (cd $startdir/pkg/usr/bin; ln -sf s2p psed)
-  (cd $startdir/pkg/usr/lib/perl5; mv $pkgver current)
-  (cd $startdir/pkg/usr/lib/perl5/site_perl; mv $pkgver current)
-  find $startdir/pkg -type f | xargs grep -l "$startdir/pkg" | \
-    xargs -n1 perl -i -p -e "s|$startdir/pkg||g;"
+#  (cd $startdir/pkg/usr/lib/perl5; mv $pkgver current)
+#  (cd $startdir/pkg/usr/lib/perl5/site_perl; mv $pkgver current)
+  grep -Rl "$startdir/pkg" $startdir/pkg/usr | \
+      xargs sed -i "s^$startdir/pkg^^g"
 }
Index: core/base/perl/archlinux-cpan-installdir.patch
diff -u /dev/null core/base/perl/archlinux-cpan-installdir.patch:1.1
--- /dev/null	Fri Nov 30 22:36:20 2007
+++ core/base/perl/archlinux-cpan-installdir.patch	Fri Nov 30 22:36:20 2007
@@ -0,0 +1,17 @@
+Some modules which are included in the perl core set INSTALLDIRS => 'perl'
+explicitly in Makefile.PL.  This makes sense for the normal @INC ordering but
+not for Arch Linux.  Provide a sensible default.
+
+Thanks to Charles Mauch (xterminus) for his work on the initial patch.
+
+--- lib/CPAN/FirstTime.pm.orig	2007-11-04 22:35:31.000000000 -0500
++++ lib/CPAN/FirstTime.pm	2007-11-04 22:37:59.000000000 -0500
+@@ -358,7 +358,7 @@
+ 
+ };
+ 
+-    $default = $CPAN::Config->{makepl_arg} || "";
++    $default = $CPAN::Config->{makepl_arg} || "INSTALLDIRS=site";
+     $CPAN::Config->{makepl_arg} =
+ 	prompt("Parameters for the 'perl Makefile.PL' command?
+ Typical frequently used settings:
Index: core/base/perl/archlinux-inc-order.patch
diff -u /dev/null core/base/perl/archlinux-inc-order.patch:1.1
--- /dev/null	Fri Nov 30 22:36:20 2007
+++ core/base/perl/archlinux-inc-order.patch	Fri Nov 30 22:36:20 2007
@@ -0,0 +1,101 @@
+Tweak @INC so that the ordering is:
+	site (5.8.8)
+	vendor (all)
+	core (5.8.8)
+	obsolete (pre-5.8.8-9) vendor builds
+
+The rationale being that an admin (via site), or module packager (vendor) can
+chose to shadow core modules when there is a newer version than is included in
+core.
+
+Thanks to Charles Mauch (xterminus) for his work on the initial patch.
+
+--- perl.c.orig	2006-01-31 07:34:47.000000000 -0500
++++ perl.c	2007-10-31 22:46:56.000000000 -0400
+@@ -4771,44 +4771,12 @@
+ 
+ /* Use the ~-expanded versions of APPLLIB (undocumented),
+     ARCHLIB PRIVLIB SITEARCH SITELIB VENDORARCH and VENDORLIB
++    Arch Linux: SITEARCH SITELIB VENDORARCH VENDORLIB ARCHLIB PRIVLIB OTHER
+ */
+ #ifdef APPLLIB_EXP
+     incpush(APPLLIB_EXP, TRUE, 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 SITEARCH_EXP
+     /* sitearch is always relative to sitelib on Windows for
+      * DLL-based path intuition to work correctly */
+@@ -4850,6 +4818,40 @@
+     incpush(PERL_VENDORLIB_STEM, FALSE, TRUE, TRUE);
+ #endif
+ 
++/* Arch Linux: core libs after site and vendor libs. */
++#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




More information about the arch-commits mailing list