michael@13: By default, the "vendor" area is not used, so Perl's installation michael@13: procedure forgot to create its top-level paths, too. In OpenPKG we use michael@13: the "vendor" area, so make sure it is created the same way the "site" michael@13: area is. michael@13: michael@13: Index: installperl michael@13: --- installperl.orig 2006-08-15 14:37:41 +0200 michael@13: +++ installperl 2006-08-18 21:05:05 +0200 michael@13: @@ -211,6 +211,8 @@ michael@13: my $installarchlib = "$destdir$Config{installarchlib}"; michael@13: my $installsitelib = "$destdir$Config{installsitelib}"; michael@13: my $installsitearch = "$destdir$Config{installsitearch}"; michael@13: +my $installvendorlib = "$destdir$Config{installvendorlib}"; michael@13: +my $installvendorarch = "$destdir$Config{installvendorarch}"; michael@13: my $installman1dir = "$destdir$Config{installman1dir}"; michael@13: my $man1ext = $Config{man1ext}; michael@13: my $libperl = $Config{libperl}; michael@13: @@ -403,6 +405,8 @@ michael@13: mkpath($installarchlib, $verbose, 0777); michael@13: mkpath($installsitelib, $verbose, 0777) if ($installsitelib); michael@13: mkpath($installsitearch, $verbose, 0777) if ($installsitearch); michael@13: +mkpath($installvendorlib, $verbose, 0777) if ($installvendorlib); michael@13: +mkpath($installvendorarch, $verbose, 0777) if ($installvendorarch); michael@13: michael@13: if (chdir "lib") { michael@13: $do_installarchlib = ! samepath($installarchlib, '.'); michael@13: michael@13: ----------------------------------------------------------------------------- michael@13: michael@13: By default, the Perl module search order is "use lib, -I, PERL[5]LIB, michael@13: perl, site, vendor, other". This means that in OpenPKG both the modules michael@13: installed via CPAN shell (in "site" area) and the "perl-xxx" packages michael@13: (in "vendor" area) cannot override the (sometimes obsoleted) module michael@13: versions distributed with Perl (in "perl" area). Hence, we change michael@13: the search order to a more reasonable one for OpenPKG: "use lib, -I, michael@13: PERL[5]LIB, site, vendor, perl, other". michael@13: michael@13: Index: perl.c michael@13: --- perl.c.orig 2006-08-15 14:37:41 +0200 michael@13: +++ perl.c 2006-08-18 21:08:14 +0200 michael@13: @@ -4749,39 +4749,6 @@ michael@13: incpush(APPLLIB_EXP, TRUE, TRUE, TRUE, TRUE); michael@13: #endif michael@13: michael@13: -#ifdef ARCHLIB_EXP michael@13: - incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE, TRUE); michael@13: -#endif michael@13: -#ifdef MACOS_TRADITIONAL michael@13: - { michael@13: - Stat_t tmpstatbuf; michael@13: - SV * privdir = newSV(0); michael@13: - char * macperl = PerlEnv_getenv("MACPERL"); michael@13: - michael@13: - if (!macperl) michael@13: - macperl = ""; michael@13: - michael@13: - Perl_sv_setpvf(aTHX_ privdir, "%slib:", macperl); michael@13: - if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) michael@13: - incpush(SvPVX(privdir), TRUE, FALSE, TRUE, FALSE); michael@13: - Perl_sv_setpvf(aTHX_ privdir, "%ssite_perl:", macperl); michael@13: - if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) michael@13: - incpush(SvPVX(privdir), TRUE, FALSE, TRUE, FALSE); michael@13: - michael@13: - SvREFCNT_dec(privdir); michael@13: - } michael@13: - if (!PL_tainting) michael@13: - incpush(":", FALSE, FALSE, TRUE, FALSE); michael@13: -#else michael@13: -#ifndef PRIVLIB_EXP michael@13: -# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl" michael@13: -#endif michael@13: -#if defined(WIN32) michael@13: - incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE, TRUE); michael@13: -#else michael@13: - incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE, TRUE); michael@13: -#endif michael@13: - michael@13: #ifdef SITEARCH_EXP michael@13: /* sitearch is always relative to sitelib on Windows for michael@13: * DLL-based path intuition to work correctly */ michael@13: @@ -4824,6 +4791,39 @@ michael@13: incpush(PERL_VENDORLIB_STEM, FALSE, TRUE, TRUE, TRUE); michael@13: #endif michael@13: michael@13: +#ifdef ARCHLIB_EXP michael@13: + incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE, TRUE); michael@13: +#endif michael@13: +#ifdef MACOS_TRADITIONAL michael@13: + { michael@13: + Stat_t tmpstatbuf; michael@13: + SV * privdir = newSV(0); michael@13: + char * macperl = PerlEnv_getenv("MACPERL"); michael@13: + michael@13: + if (!macperl) michael@13: + macperl = ""; michael@13: + michael@13: + Perl_sv_setpvf(aTHX_ privdir, "%slib:", macperl); michael@13: + if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) michael@13: + incpush(SvPVX(privdir), TRUE, FALSE, TRUE, FALSE); michael@13: + Perl_sv_setpvf(aTHX_ privdir, "%ssite_perl:", macperl); michael@13: + if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) michael@13: + incpush(SvPVX(privdir), TRUE, FALSE, TRUE, FALSE); michael@13: + michael@13: + SvREFCNT_dec(privdir); michael@13: + } michael@13: + if (!PL_tainting) michael@13: + incpush(":", FALSE, FALSE, TRUE, FALSE); michael@13: +#else michael@13: +#ifndef PRIVLIB_EXP michael@13: +# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl" michael@13: +#endif michael@13: +#if defined(WIN32) michael@13: + incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE, TRUE); michael@13: +#else michael@13: + incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE, TRUE); michael@13: +#endif michael@13: + michael@13: #ifdef PERL_OTHERLIBDIRS michael@13: incpush(PERL_OTHERLIBDIRS, TRUE, TRUE, TRUE, TRUE); michael@13: #endif michael@13: michael@13: ----------------------------------------------------------------------------- michael@13: michael@13: Port to [Open]Darwin 6.6.2: michael@13: michael@13: 1. In OpenPKG, Perl does not use the vendor GCC and our GCC does not michael@13: understand "-no-cpp-precomp", so remove this build option. michael@13: michael@13: 2. The indirectly includes system specific headers michael@13: which in turn have fields named "environ" while Perl uses michael@13: a define of "environ" internally. So wrap the inclusion. michael@13: michael@13: 3. Darwin 6 no longer accepts the non-standard "#import" statements, michael@13: so replace with "#include" and circumvent some header problem michael@13: related to the non-standard "__private_extern__" attribute. michael@13: michael@13: Index: hints/darwin.sh michael@13: --- hints/darwin.sh.orig 2006-08-15 14:37:41 +0200 michael@13: +++ hints/darwin.sh 2006-08-18 21:05:05 +0200 michael@13: @@ -120,9 +120,6 @@ michael@13: *-2147483648) ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN" ;; michael@13: esac michael@13: michael@13: -# Avoid Apple's cpp precompiler, better for extensions michael@13: -cppflags="${cppflags} -no-cpp-precomp" michael@13: - michael@13: # This is necessary because perl's build system doesn't michael@13: # apply cppflags to cc compile lines as it should. michael@13: ccflags="${ccflags} ${cppflags}" michael@13: @@ -182,8 +179,7 @@ michael@13: esac michael@13: ldlibpthname='DYLD_LIBRARY_PATH'; michael@13: michael@13: -# useshrplib=true results in much slower startup times. michael@13: -# 'false' is the default value. Use Configure -Duseshrplib to override. michael@13: +useshrplib='true' michael@13: michael@13: cat > UU/archname.cbu <<'EOCBU' michael@13: # This script UU/archname.cbu will get 'called-back' by Configure michael@13: Index: perlio.c michael@13: --- perlio.c.orig 2006-08-15 14:37:41 +0200 michael@13: +++ perlio.c 2006-08-18 21:05:05 +0200 michael@13: @@ -461,7 +461,14 @@ michael@13: #include michael@13: #endif michael@13: #ifdef HAS_MMAP michael@13: +#ifdef PERL_DARWIN michael@13: +#define environ_safe environ michael@13: +#undef environ michael@13: #include michael@13: +#define environ environ_safe michael@13: +#else michael@13: +#include michael@13: +#endif michael@13: #endif michael@13: michael@13: void michael@13: michael@13: ----------------------------------------------------------------------------- michael@13: michael@13: Port to Tru64 5.1: michael@13: michael@13: Under Tru64 our gcc has to be built without binutils and the system michael@13: ld(1) does not accept a "-O" option, so remove the whole passing of michael@13: optimization flags to ld(1). Under a brain-dead platform like Tru64 we michael@13: really don't need any more optimization because we are already happy if michael@13: it works at all. michael@13: michael@13: Index: hints/dec_osf.sh michael@13: --- hints/dec_osf.sh.orig 2007-12-18 11:47:07 +0100 michael@13: +++ hints/dec_osf.sh 2007-12-19 12:31:37 +0100 michael@13: @@ -73,15 +73,6 @@ michael@13: *) if $test "X$optimize" = "X$undef"; then michael@13: lddlflags="$lddlflags -msym" michael@13: else michael@13: - case "$myosvers" in michael@13: - *4.0D*) michael@13: - # QAR 56761: -O4 + .so may produce broken code, michael@13: - # fixed in 4.0E or better. michael@13: - ;; michael@13: - *) michael@13: - lddlflags="$lddlflags $optimize" michael@13: - ;; michael@13: - esac michael@13: # -msym: If using a sufficiently recent /sbin/loader, michael@13: # keep the module symbols with the modules. michael@13: lddlflags="$lddlflags -msym $_lddlflags_strict_ansi" michael@13: michael@13: ----------------------------------------------------------------------------- michael@13: michael@13: Index: Configure michael@13: --- Configure.orig 2006-08-15 14:37:40 +0200 michael@13: +++ Configure 2006-08-18 21:05:05 +0200 michael@13: @@ -7787,7 +7787,7 @@ michael@13: ;; michael@13: linux|irix*|gnu*) dflt='-shared' ;; michael@13: next) dflt='none' ;; michael@13: - solaris) dflt='-G' ;; michael@13: + solaris) dflt='-shared' ;; michael@13: sunos) dflt='-assert nodefinitions' ;; michael@13: svr4*|esix*|nonstopux) dflt="-G $ldflags" ;; michael@13: *) dflt='none' ;; michael@13: michael@13: ----------------------------------------------------------------------------- michael@13: michael@13: Security Fix (CVE-2005-3962, OpenPKG-SA-2005.025-perl) michael@13: michael@13: Index: sv.c michael@13: --- sv.c.orig 2006-08-15 14:37:41 +0200 michael@13: +++ sv.c 2006-08-18 21:05:05 +0200 michael@13: @@ -8595,7 +8595,10 @@ michael@13: if ( (width = expect_number(&q)) ) { michael@13: if (*q == '$') { michael@13: ++q; michael@13: - efix = width; michael@13: + if (width > PERL_INT_MAX) michael@13: + efix = PERL_INT_MAX; michael@13: + else michael@13: + efix = width; michael@13: } else { michael@13: goto gotwidth; michael@13: } michael@13: