diff -r 71503088f51b -r f880f219c566 openpkg/perl.patch --- a/openpkg/perl.patch Tue Jul 31 12:12:54 2012 +0200 +++ b/openpkg/perl.patch Tue Jul 31 12:23:42 2012 +0200 @@ -4,123 +4,29 @@ area is. Index: installperl ---- installperl.orig 2006-08-15 14:37:41 +0200 -+++ installperl 2006-08-18 21:05:05 +0200 -@@ -211,6 +211,8 @@ - my $installarchlib = "$destdir$Config{installarchlib}"; - my $installsitelib = "$destdir$Config{installsitelib}"; - my $installsitearch = "$destdir$Config{installsitearch}"; -+my $installvendorlib = "$destdir$Config{installvendorlib}"; -+my $installvendorarch = "$destdir$Config{installvendorarch}"; - my $installman1dir = "$destdir$Config{installman1dir}"; +--- installperl.orig 2011-06-09 22:04:29.000000000 +0200 ++++ installperl 2011-06-17 15:20:48.000000000 +0200 +@@ -200,6 +200,8 @@ + my $installarchlib = "$opts{destdir}$Config{installarchlib}"; + my $installsitelib = "$opts{destdir}$Config{installsitelib}"; + my $installsitearch = "$opts{destdir}$Config{installsitearch}"; ++my $installvendorlib = "$opts{destdir}$Config{installvendorlib}"; ++my $installvendorarch = "$opts{destdir}$Config{installvendorarch}"; + my $installman1dir = "$opts{destdir}$Config{installman1dir}"; my $man1ext = $Config{man1ext}; my $libperl = $Config{libperl}; -@@ -372,6 +374,8 @@ - mkpath($installarchlib, $verbose, 0777); - mkpath($installsitelib, $verbose, 0777) if ($installsitelib); - mkpath($installsitearch, $verbose, 0777) if ($installsitearch); -+mkpath($installvendorlib, $verbose, 0777) if ($installvendorlib); -+mkpath($installvendorarch, $verbose, 0777) if ($installvendorarch); +@@ -349,6 +351,8 @@ + mkpath($installarchlib, $opts{verbose}, 0777); + mkpath($installsitelib, $opts{verbose}, 0777) if ($installsitelib); + mkpath($installsitearch, $opts{verbose}, 0777) if ($installsitearch); ++mkpath($installvendorlib, $opts{verbose}, 0777) if ($installvendorlib); ++mkpath($installvendorarch, $opts{verbose}, 0777) if ($installvendorarch); if (chdir "lib") { $do_installarchlib = ! samepath($installarchlib, '.'); ----------------------------------------------------------------------------- -By default, the Perl module search order is "use lib, -I, PERL[5]LIB, -perl, site, vendor, other". This means that in OpenPKG both the modules -installed via CPAN shell (in "site" area) and the "perl-xxx" packages -(in "vendor" area) cannot override the (sometimes obsoleted) module -versions distributed with Perl (in "perl" area). Hence, we change -the search order to a more reasonable one for OpenPKG: "use lib, -I, -PERL[5]LIB, site, vendor, perl, other". - -Index: perl.c ---- perl.c.orig 2006-08-15 14:37:41 +0200 -+++ perl.c 2006-08-18 21:08:14 +0200 -@@ -4753,39 +4753,6 @@ - incpush(APPLLIB_EXP, TRUE, TRUE, TRUE, TRUE); - #endif - --#ifdef ARCHLIB_EXP -- incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE, TRUE); --#endif --#ifdef MACOS_TRADITIONAL -- { -- Stat_t tmpstatbuf; -- SV * privdir = newSV(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, FALSE); -- 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, FALSE); -- -- SvREFCNT_dec(privdir); -- } -- if (!PL_tainting) -- incpush(":", FALSE, FALSE, TRUE, FALSE); --#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, TRUE); --#else -- incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE, TRUE); --#endif -- - #ifdef SITEARCH_EXP - /* sitearch is always relative to sitelib on Windows for - * DLL-based path intuition to work correctly */ -@@ -4828,6 +4795,39 @@ - incpush(PERL_VENDORLIB_STEM, FALSE, TRUE, TRUE, TRUE); - #endif - -+#ifdef ARCHLIB_EXP -+ incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE, TRUE); -+#endif -+#ifdef MACOS_TRADITIONAL -+ { -+ Stat_t tmpstatbuf; -+ SV * privdir = newSV(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, FALSE); -+ 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, FALSE); -+ -+ SvREFCNT_dec(privdir); -+ } -+ if (!PL_tainting) -+ incpush(":", FALSE, FALSE, TRUE, FALSE); -+#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, TRUE); -+#else -+ incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE, TRUE); -+#endif -+ - #ifdef PERL_OTHERLIBDIRS - incpush(PERL_OTHERLIBDIRS, TRUE, TRUE, TRUE, TRUE); - #endif - ------------------------------------------------------------------------------ - Port to [Open]Darwin 6.6.2: 1. In OpenPKG, Perl does not use the vendor GCC and our GCC does not @@ -135,19 +41,30 @@ related to the non-standard "__private_extern__" attribute. Index: hints/darwin.sh ---- hints/darwin.sh.orig 2006-08-15 14:37:41 +0200 -+++ hints/darwin.sh 2006-08-18 21:05:05 +0200 -@@ -120,9 +120,6 @@ - *-2147483648) ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN" ;; - esac - --# Avoid Apple's cpp precompiler, better for extensions --cppflags="${cppflags} -no-cpp-precomp" -- - # This is necessary because perl's build system doesn't - # apply cppflags to cc compile lines as it should. - ccflags="${ccflags} ${cppflags}" -@@ -182,8 +179,7 @@ +--- hints/darwin.sh.orig 2011-09-19 15:18:22.000000000 +0200 ++++ hints/darwin.sh 2011-12-24 12:00:58.000000000 +0100 +@@ -181,6 +181,20 @@ + ldflags="${ldflags} -flat_namespace" + lddlflags="${ldflags} -bundle -undefined suppress" + ;; ++9.*) ++ lddlflags="${ldflags} -bundle -undefined dynamic_lookup" ++ case "$ld" in ++ *MACOSX_DEVELOPMENT_TARGET*) ;; ++ *) ld="env MACOSX_DEPLOYMENT_TARGET=10.5 ${ld}" ;; ++ esac ++ ;; ++10.*) ++ lddlflags="${ldflags} -bundle -undefined dynamic_lookup" ++ case "$ld" in ++ *MACOSX_DEVELOPMENT_TARGET*) ;; ++ *) ld="env MACOSX_DEPLOYMENT_TARGET=10.6 ${ld}" ;; ++ esac ++ ;; + *) + lddlflags="${ldflags} -bundle -undefined dynamic_lookup" + case "$ld" in +@@ -191,8 +205,7 @@ esac ldlibpthname='DYLD_LIBRARY_PATH'; @@ -157,24 +74,13 @@ cat > UU/archname.cbu <<'EOCBU' # This script UU/archname.cbu will get 'called-back' by Configure -Index: perlio.c ---- perlio.c.orig 2006-08-15 14:37:41 +0200 -+++ perlio.c 2006-08-18 21:05:05 +0200 -@@ -472,7 +472,14 @@ - #include - #endif - #ifdef HAS_MMAP -+#ifdef PERL_DARWIN -+#define environ_safe environ -+#undef environ - #include -+#define environ environ_safe -+#else -+#include -+#endif - #endif - - void +@@ -326,3 +339,6 @@ + # makefile in the same place. Since Darwin uses GNU make, this dodges + # the problem. + firstmakefile=GNUmakefile; ++ ++usenm='false' ++ ----------------------------------------------------------------------------- @@ -187,8 +93,8 @@ it works at all. Index: hints/dec_osf.sh ---- hints/dec_osf.sh.orig 2007-12-18 11:47:07 +0100 -+++ hints/dec_osf.sh 2007-12-19 12:31:37 +0100 +--- hints/dec_osf.sh.orig 2011-06-17 02:06:09.000000000 +0200 ++++ hints/dec_osf.sh 2011-06-17 15:20:48.000000000 +0200 @@ -73,15 +73,6 @@ *) if $test "X$optimize" = "X$undef"; then lddlflags="$lddlflags -msym" @@ -208,27 +114,32 @@ ----------------------------------------------------------------------------- +Linker flag change for Solaris. + Index: Configure ---- Configure.orig 2006-08-15 14:37:40 +0200 -+++ Configure 2006-08-18 21:05:05 +0200 -@@ -7871,7 +7871,7 @@ +--- Configure.orig 2011-06-09 22:04:29.000000000 +0200 ++++ Configure 2011-06-17 15:20:48.000000000 +0200 +@@ -8078,9 +8058,9 @@ ;; linux|irix*|gnu*) dflt="-shared $optimize" ;; next) dflt='none' ;; - solaris) dflt='-G' ;; + solaris) dflt='-shared' ;; sunos) dflt='-assert nodefinitions' ;; - svr4*|esix*|nonstopux) dflt="-G $ldflags" ;; +- svr4*|esix*|nonstopux) dflt="-G $ldflags" ;; ++ svr4*|esix*|nonstopux) dflt="-shared $ldflags" ;; *) dflt='none' ;; + esac + ;; ----------------------------------------------------------------------------- Security Fix (CVE-2005-3962, OpenPKG-SA-2005.025-perl) Index: sv.c ---- sv.c.orig 2006-08-15 14:37:41 +0200 -+++ sv.c 2006-08-18 21:05:05 +0200 -@@ -8667,7 +8667,10 @@ +--- sv.c.orig 2011-06-17 02:06:09.000000000 +0200 ++++ sv.c 2011-06-17 15:20:48.000000000 +0200 +@@ -10198,7 +10198,10 @@ if ( (width = expect_number(&q)) ) { if (*q == '$') { ++q; @@ -243,17 +154,106 @@ ----------------------------------------------------------------------------- -Corrections for Solaris 11: +Do not use -fstack-protector as it causes too much portability issues. -Index: perl.h -diff -Nau perl.h.orig perl.h ---- perl.h.orig 2007-12-18 11:47:08.000000000 +0100 -+++ perl.h 2009-01-06 15:28:45.843276063 +0100 -@@ -1393,6 +1393,7 @@ - */ +Index: Configure +--- Configure.orig 2011-06-09 22:04:29.000000000 +0200 ++++ Configure 2011-06-17 15:20:48.000000000 +0200 +@@ -5158,17 +5158,6 @@ + ;; + esac - #if defined(I_SYSMODE) && !defined(PERL_MICRO) -+#include - #include - #endif +- # on x86_64 (at least) we require an extra library (libssp) in the +- # link command line. This library is not named, so I infer that it is +- # an implementation detail that may change. Hence the safest approach +- # is to add the flag to the flags passed to the compiler at link time, +- # as that way the compiler can do the right implementation dependant +- # thing. (NWC) +- case "$gccversion" in +- ?*) set stack-protector -fstack-protector +- eval $checkccflag +- ;; +- esac + ;; + esac +@@ -5307,15 +5296,6 @@ + ;; + *) dflt="$ldflags";; + esac +-# See note above about -fstack-protector +-case "$ccflags" in +-*-fstack-protector*) +- case "$dflt" in +- *-fstack-protector*) ;; # Don't add it again +- *) dflt="$dflt -fstack-protector" ;; +- esac +- ;; +-esac + + : Try to guess additional flags to pick up local libraries. + for thislibdir in $libpth; do +@@ -8107,14 +8087,6 @@ + ''|' ') dflt='none' ;; + esac + +- case "$ldflags" in +- *-fstack-protector*) +- case "$dflt" in +- *-fstack-protector*) ;; # Don't add it again +- *) dflt="$dflt -fstack-protector" ;; +- esac +- ;; +- esac + + + rp="Any special flags to pass to $ld to create a dynamically loaded library?" + +----------------------------------------------------------------------------- + +Make sure we install into /lib/perl/ and not /lib/perl5/ + +Index: Configure +--- Configure.orig 2009-08-24 18:33:49 +0200 ++++ Configure 2009-08-24 18:44:39 +0200 +@@ -1769,7 +1769,7 @@ + touch posthint.sh + + : set package name +-package='perl5' ++package='perl' + first=`echo $package | sed -e 's/^\(.\).*/\1/'` + last=`echo $package | sed -e 's/^.\(.*\)/\1/'` + case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in + +----------------------------------------------------------------------------- + +Linking against just libgdbm_compat under at least SUSE fails +because it also needs libgdbm (which Perl doesn't pick up, too) + +Index: hints/linux.sh +--- hints/linux.sh.orig 2011-06-09 22:04:29.000000000 +0200 ++++ hints/linux.sh 2011-06-17 15:20:48.000000000 +0200 +@@ -55,7 +55,9 @@ + libswanted="$*" + + # Debian 4.0 puts ndbm in the -lgdbm_compat library. +-libswanted="$libswanted gdbm_compat" ++if [ -f /etc/debian_version -o -f /etc/ubuntu_version ]; then ++ libswanted="$libswanted gdbm_compat" ++fi + + # If you have glibc, then report the version for ./myconfig bug reporting. + # (Configure doesn't need to know the specific version since it just uses + +Index: Configure +--- Configure.orig 2012-05-31 14:59:16.000000000 +0200 ++++ Configure 2012-05-31 15:04:27.000000000 +0200 +@@ -22206,6 +22206,7 @@ + for xxx in *; do + case "$xxx" in + DynaLoader|dynaload) ;; ++ \* ) ;; + *) + this_ext=`echo $xxx | $sed -e s/-/\\\//g`; + leaf=`echo $xxx | $sed -e s/.*-//`;