OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 19-Dec-2007 14:17:37 Branch: HEAD Handle: 2007121913173003 Added files: openpkg-src/perl58 perl58.patch perl58.spec Modified files: openpkg-src/perl perl.patch perl.spec openpkg-src/perl-openpkg perl-openpkg.pl perl-openpkg.spec Log: finally switch from Perl 5.8 to 5.10 Summary: Revision Changes Path 1.20 +1 -1 openpkg-src/perl-openpkg/perl-openpkg.pl 1.33 +2 -2 openpkg-src/perl-openpkg/perl-openpkg.spec 1.25 +49 -231 openpkg-src/perl/perl.patch 1.121 +4 -3 openpkg-src/perl/perl.spec 1.1 +474 -0 openpkg-src/perl58/perl58.patch 1.6 +201 -0 openpkg-src/perl58/perl58.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/perl-openpkg/perl-openpkg.pl ============================================================================ $ cvs diff -u -r1.19 -r1.20 perl-openpkg.pl --- openpkg-src/perl-openpkg/perl-openpkg.pl 1 Jan 2007 17:40:50 -0000 1.19 +++ openpkg-src/perl-openpkg/perl-openpkg.pl 19 Dec 2007 13:17:33 -0000 1.20 @@ -365,7 +365,7 @@ # determine build-time extra arguments # (assuming that they are either work for both Module::Build and # ExtUtils::MakeMaker or the supplier knows what is used by us) - if ([EMAIL PROTECTED]>{perl_args}}} >= 0) { + if ($#{$CF->{perl_args}} >= 0) { my $user_args = join(" ", @{$CF->{perl_args}}); if ($user_args =~ m|#|) { $user_args =~ s|#| $perl_args |; @@ . patch -p0 <<'@@ .' Index: openpkg-src/perl-openpkg/perl-openpkg.spec ============================================================================ $ cvs diff -u -r1.32 -r1.33 perl-openpkg.spec --- openpkg-src/perl-openpkg/perl-openpkg.spec 1 Jan 2007 17:40:50 -0000 1.32 +++ openpkg-src/perl-openpkg/perl-openpkg.spec 19 Dec 2007 13:17:33 -0000 1.33 @@ -23,7 +23,7 @@ ## # package version -%define V_perl 5.8.8 +%define V_perl 5.10.0 # package information Name: perl-openpkg @@ -36,7 +36,7 @@ Group: Perl License: PD Version: %{V_perl} -Release: 20061013 +Release: 20071219 # list of sources Source0: perl-openpkg.pl @@ . patch -p0 <<'@@ .' Index: openpkg-src/perl/perl.patch ============================================================================ $ cvs diff -u -r1.24 -r1.25 perl.patch --- openpkg-src/perl/perl.patch 8 Nov 2007 07:39:35 -0000 1.24 +++ openpkg-src/perl/perl.patch 19 Dec 2007 13:17:30 -0000 1.25 @@ -4,9 +4,9 @@ area is. Index: installperl ---- installperl.orig 2006-01-28 16:35:28 +0100 -+++ installperl 2006-02-01 20:00:56 +0100 -@@ -189,6 +189,8 @@ +--- 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}"; @@ -15,7 +15,7 @@ my $installman1dir = "$destdir$Config{installman1dir}"; my $man1ext = $Config{man1ext}; my $libperl = $Config{libperl}; -@@ -381,6 +383,8 @@ +@@ -403,6 +405,8 @@ mkpath($installarchlib, $verbose, 0777); mkpath($installsitelib, $verbose, 0777) if ($installsitelib); mkpath($installsitearch, $verbose, 0777) if ($installsitearch); @@ -36,19 +36,19 @@ PERL[5]LIB, site, vendor, perl, other". Index: perl.c ---- perl.c.orig 2006-01-31 13:34:47 +0100 -+++ perl.c 2006-02-01 20:00:56 +0100 -@@ -4776,39 +4776,6 @@ - incpush(APPLLIB_EXP, TRUE, TRUE, TRUE); +--- perl.c.orig 2006-08-15 14:37:41 +0200 ++++ perl.c 2006-08-18 21:08:14 +0200 +@@ -4749,39 +4749,6 @@ + incpush(APPLLIB_EXP, TRUE, TRUE, TRUE, TRUE); #endif -#ifdef ARCHLIB_EXP -- incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE); +- incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE, TRUE); -#endif -#ifdef MACOS_TRADITIONAL - { - Stat_t tmpstatbuf; -- SV * privdir = NEWSV(55, 0); +- SV * privdir = newSV(0); - char * macperl = PerlEnv_getenv("MACPERL"); - - if (!macperl) @@ -56,39 +56,39 @@ - - 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); +- 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); +- incpush(SvPVX(privdir), TRUE, FALSE, TRUE, FALSE); - - SvREFCNT_dec(privdir); - } - if (!PL_tainting) -- incpush(":", FALSE, FALSE, TRUE); +- 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); +- incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE, TRUE); -#else -- incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE); +- 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 */ -@@ -4850,6 +4817,39 @@ - incpush(PERL_VENDORLIB_STEM, FALSE, TRUE, TRUE); +@@ -4824,6 +4791,39 @@ + incpush(PERL_VENDORLIB_STEM, FALSE, TRUE, TRUE, TRUE); #endif +#ifdef ARCHLIB_EXP -+ incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE); ++ incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE, TRUE); +#endif +#ifdef MACOS_TRADITIONAL + { + Stat_t tmpstatbuf; -+ SV * privdir = NEWSV(55, 0); ++ SV * privdir = newSV(0); + char * macperl = PerlEnv_getenv("MACPERL"); + + if (!macperl) @@ -96,27 +96,27 @@ + + 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); ++ 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); ++ incpush(SvPVX(privdir), TRUE, FALSE, TRUE, FALSE); + + SvREFCNT_dec(privdir); + } + if (!PL_tainting) -+ incpush(":", FALSE, FALSE, TRUE); ++ 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); ++ incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE, TRUE); +#else -+ incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE); ++ incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE, TRUE); +#endif + #ifdef PERL_OTHERLIBDIRS - incpush(PERL_OTHERLIBDIRS, TRUE, TRUE, TRUE); + incpush(PERL_OTHERLIBDIRS, TRUE, TRUE, TRUE, TRUE); #endif ----------------------------------------------------------------------------- @@ -135,8 +135,8 @@ related to the non-standard "__private_extern__" attribute. Index: hints/darwin.sh ---- hints/darwin.sh.orig 2005-09-18 17:13:41 +0200 -+++ hints/darwin.sh 2006-02-01 20:00:56 +0100 +--- 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 @@ -158,9 +158,9 @@ cat > UU/archname.cbu <<'EOCBU' # This script UU/archname.cbu will get 'called-back' by Configure Index: perlio.c ---- perlio.c.orig 2006-01-06 23:42:20 +0100 -+++ perlio.c 2006-02-01 20:00:56 +0100 -@@ -448,7 +448,14 @@ +--- perlio.c.orig 2006-08-15 14:37:41 +0200 ++++ perlio.c 2006-08-18 21:05:05 +0200 +@@ -461,7 +461,14 @@ #include <unistd.h> #endif #ifdef HAS_MMAP @@ -176,8 +176,8 @@ void Index: ext/DynaLoader/dl_dyld.xs ---- ext/DynaLoader/dl_dyld.xs.orig 2005-04-18 19:04:24 +0200 -+++ ext/DynaLoader/dl_dyld.xs 2006-02-01 20:00:56 +0100 +--- ext/DynaLoader/dl_dyld.xs.orig 2006-08-15 14:37:40 +0200 ++++ ext/DynaLoader/dl_dyld.xs 2006-08-18 21:05:05 +0200 @@ -45,7 +45,13 @@ #undef environ @@ -204,9 +204,9 @@ it works at all. Index: hints/dec_osf.sh ---- hints/dec_osf.sh.orig 2006-01-08 10:53:29 +0100 -+++ hints/dec_osf.sh 2006-02-01 20:00:56 +0100 -@@ -279,15 +279,6 @@ +--- hints/dec_osf.sh.orig 2007-12-18 11:47:07 +0100 ++++ hints/dec_osf.sh 2007-12-19 12:31:37 +0100 +@@ -73,15 +73,6 @@ *) if $test "X$optimize" = "X$undef"; then lddlflags="$lddlflags -msym" else @@ -215,7 +215,7 @@ - # QAR 56761: -O4 + .so may produce broken code, - # fixed in 4.0E or better. - ;; -- *) +- *) - lddlflags="$lddlflags $optimize" - ;; - esac @@ -231,9 +231,9 @@ users to overwrite files via a symlink attack on temporary files. Index: lib/CGI/Cookie.pm ---- lib/CGI/Cookie.pm.orig 2005-12-05 17:30:25 +0100 -+++ lib/CGI/Cookie.pm 2006-02-01 20:00:56 +0100 -@@ -407,7 +407,7 @@ +--- lib/CGI/Cookie.pm.orig 2006-08-15 14:37:41 +0200 ++++ lib/CGI/Cookie.pm 2006-08-18 21:05:05 +0200 +@@ -444,7 +444,7 @@ You may also retrieve cookies that were stored in some external form using the parse() class method: @@ -243,9 +243,9 @@ If you are in a mod_perl environment, you can save some overhead by Index: lib/Shell.pm ---- lib/Shell.pm.orig 2004-06-01 11:42:17 +0200 -+++ lib/Shell.pm 2006-02-01 20:00:56 +0100 -@@ -127,7 +127,7 @@ +--- lib/Shell.pm.orig 2006-08-15 14:37:41 +0200 ++++ lib/Shell.pm 2006-08-18 21:05:05 +0200 +@@ -154,7 +154,7 @@ use Shell qw(cat ps cp); $passwd = cat('</etc/passwd'); @pslines = ps('-ww'), @@ -258,9 +258,9 @@ ----------------------------------------------------------------------------- Index: Configure ---- Configure.orig 2006-01-08 15:51:03 +0100 -+++ Configure 2006-02-01 20:00:56 +0100 -@@ -7663,7 +7663,7 @@ +--- Configure.orig 2006-08-15 14:37:40 +0200 ++++ Configure 2006-08-18 21:05:05 +0200 +@@ -7787,7 +7787,7 @@ ;; linux|irix*|gnu*) dflt='-shared' ;; next) dflt='none' ;; @@ -275,10 +275,10 @@ Security Fix (CVE-2005-3962, OpenPKG-SA-2005.025-perl) Index: sv.c ---- sv.c.orig 2006-01-16 13:22:21 +0100 -+++ sv.c 2006-02-01 20:00:56 +0100 -@@ -8650,7 +8650,10 @@ - if (EXPECT_NUMBER(q, width)) { +--- sv.c.orig 2006-08-15 14:37:41 +0200 ++++ sv.c 2006-08-18 21:05:05 +0200 +@@ -8595,7 +8595,10 @@ + if ( (width = expect_number(&q)) ) { if (*q == '$') { ++q; - efix = width; @@ -290,185 +290,3 @@ goto gotwidth; } ------------------------------------------------------------------------------ - -- Fix syntax error (unterminated quoted string) -- Support GCC 4.2 - -Index: makedepend.SH ---- makedepend.SH.orig 2003-06-05 20:11:10 +0200 -+++ makedepend.SH 2007-05-20 09:32:10 +0200 -@@ -128,7 +128,7 @@ - *.y) filebase=`basename $file .y` ;; - esac - case "$file" in -- */*) finc="-I`echo $file | sed 's#/[^/]*$##`" ;; -+ */*) finc="-I`echo $file | sed 's#/[^/]*$##'`" ;; - *) finc= ;; - esac - $echo "Finding dependencies for $filebase$_o." -@@ -167,6 +167,7 @@ - -e '/^#.*<builtin>/d' \ - -e '/^#.*<built-in>/d' \ - -e '/^#.*<command line>/d' \ -+ -e '/^#.*<command-line>/d' \ - -e '/^#.*"-"/d' \ - -e '/: file path prefix .* never used$/d' \ - -e 's#\.[0-9][0-9]*\.c#'"$file.c#" \ - ------------------------------------------------------------------------------ - -Support FreeBSD >= 7.0 where objformat(8) is gone - -Index: hints/freebsd.sh ---- hints/freebsd.sh.orig Wed Mar 24 22:47:33 2004 -+++ hints/freebsd.sh Mon Feb 19 20:53:50 2007 -@@ -116,17 +122,17 @@ case "$osvers" in - - *) - objformat=`/usr/bin/objformat` -- if [ x$objformat = xelf ]; then -- libpth="/usr/lib /usr/local/lib" -- glibpth="/usr/lib /usr/local/lib" -- ldflags="-Wl,-E " -- lddlflags="-shared " -- else -+ if [ x$objformat = xaout ]; then - if [ -e /usr/lib/aout ]; then - libpth="/usr/lib/aout /usr/local/lib /usr/lib" - glibpth="/usr/lib/aout /usr/local/lib /usr/lib" - fi - lddlflags='-Bshareable' -+ else -+ libpth="/usr/lib /usr/local/lib" -+ glibpth="/usr/lib /usr/local/lib" -+ ldflags="-Wl,-E " -+ lddlflags="-shared " - fi - cccdlflags='-DPIC -fPIC' - ;; - - ------------------------------------------------------------------------------ - -Fix issue when <asm/page.h> is missing from the Linux headers. -See https://bugs.gentoo.org/show_bug.cgi?id=168312 for details. - -Index: ext/IPC/SysV/SysV.xs ---- ext/IPC/SysV/SysV.xs.orig 2001-06-30 14:46:07.000000000 -0400 -+++ ext/IPC/SysV/SysV.xs 2006-06-02 17:37:22.000000000 -0400 -@@ -3,9 +3,6 @@ - #include "XSUB.h" - - #include <sys/types.h> --#ifdef __linux__ --# include <asm/page.h> --#endif - #if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM) - #ifndef HAS_SEM - # include <sys/ipc.h> - ------------------------------------------------------------------------------ - -Security Fix (CVE-2007-5116) - -Fix a possible buffer overflow with ASCII regexes -that really are Unicode regexes. - -Index: regcomp.c ---- regcomp.c.orig 2006-01-08 21:59:27.000000000 +0100 -+++ regcomp.c 2007-11-06 22:48:26.000000000 +0100 -@@ -135,7 +135,10 @@ typedef struct RExC_state_t { - I32 extralen; - I32 seen_zerolen; - I32 seen_evals; -- I32 utf8; -+ I32 utf8; /* whether the pattern is utf8 or not */ -+ I32 orig_utf8; /* whether the pattern was originally in utf8 */ -+ /* XXX use this for future optimisation of case -+ * where pattern must be upgraded to utf8. */ - #if ADD_TO_REGEXEC - char *starttry; /* -Dr: where regtry was called. */ - #define RExC_starttry (pRExC_state->starttry) -@@ -161,6 +164,7 @@ typedef struct RExC_state_t { - #define RExC_seen_zerolen (pRExC_state->seen_zerolen) - #define RExC_seen_evals (pRExC_state->seen_evals) - #define RExC_utf8 (pRExC_state->utf8) -+#define RExC_orig_utf8 (pRExC_state->orig_utf8) - - #define ISMULT1(c) ((c) == '*' || (c) == '+' || (c) == '?') - #define ISMULT2(s) ((*s) == '*' || (*s) == '+' || (*s) == '?' || \ -@@ -1749,15 +1753,16 @@ Perl_pregcomp(pTHX_ char *exp, char *xen - if (exp == NULL) - FAIL("NULL regexp argument"); - -- RExC_utf8 = pm->op_pmdynflags & PMdf_CMP_UTF8; -+ RExC_utf8 = RExC_orig_utf8 = pm->op_pmdynflags & PMdf_CMP_UTF8; - -- RExC_precomp = exp; - DEBUG_r({ - if (!PL_colorset) reginitcolors(); - PerlIO_printf(Perl_debug_log, "%sCompiling REx%s `%s%*s%s'\n", - PL_colors[4],PL_colors[5],PL_colors[0], -- (int)(xend - exp), RExC_precomp, PL_colors[1]); -+ (int)(xend - exp), exp, PL_colors[1]); - }); -+redo_first_pass: -+ RExC_precomp = exp; - RExC_flags = pm->op_pmflags; - RExC_sawback = 0; - -@@ -1783,6 +1788,25 @@ Perl_pregcomp(pTHX_ char *exp, char *xen - RExC_precomp = Nullch; - return(NULL); - } -+ if (RExC_utf8 && !RExC_orig_utf8) { -+ /* It's possible to write a regexp in ascii that represents unicode -+ codepoints outside of the byte range, such as via \x{100}. If we -+ detect such a sequence we have to convert the entire pattern to utf8 -+ and then recompile, as our sizing calculation will have been based -+ on 1 byte == 1 character, but we will need to use utf8 to encode -+ at least some part of the pattern, and therefore must convert the whole -+ thing. -+ XXX: somehow figure out how to make this less expensive... -+ -- dmq */ -+ STRLEN len = xend-exp; -+ DEBUG_r(PerlIO_printf(Perl_debug_log, -+ "UTF8 mismatch! Converting to utf8 for resizing and compile\n")); -+ exp = (char*)Perl_bytes_to_utf8(aTHX_ (U8*)exp, &len); -+ xend = exp + len; -+ RExC_orig_utf8 = RExC_utf8; -+ SAVEFREEPV(exp); -+ goto redo_first_pass; -+ } - DEBUG_r(PerlIO_printf(Perl_debug_log, "size %"IVdf" ", (IV)RExC_size)); - - /* Small enough for pointer-storage convention? -Index: t/op/pat.t ---- t/op/pat.t.orig 2006-01-07 13:53:32.000000000 +0100 -+++ t/op/pat.t 2007-11-06 21:52:30.000000000 +0100 -@@ -6,7 +6,7 @@ - - $| = 1; - --print "1..1187\n"; -+print "1..1189\n"; - - BEGIN { - chdir 't' if -d 't'; -@@ -3395,5 +3395,14 @@ ok(("foba ba$s" =~ qr/(foo|BaSS|bar)/i) - "# assigning to original string should not corrupt match vars"); - } - --# last test 1187 -+{ -+ use warnings; -+ my @w; -+ local $SIG{__WARN__}=sub{push @w,"@_"}; -+ my $c=qq(\x{DF}); -+ ok($c=~/${c}|\x{100}/, "ASCII pattern that really is utf8"); -+ ok(@w==0, "ASCII pattern that really is utf8"); -+} -+ -+# last test 1189 - @@ . patch -p0 <<'@@ .' Index: openpkg-src/perl/perl.spec ============================================================================ $ cvs diff -u -r1.120 -r1.121 perl.spec --- openpkg-src/perl/perl.spec 19 Dec 2007 11:25:16 -0000 1.120 +++ openpkg-src/perl/perl.spec 19 Dec 2007 13:17:30 -0000 1.121 @@ -32,7 +32,7 @@ Class: CORE Group: Perl License: GPL/Artistic -Version: 5.8.8 +Version: 5.10.0 Release: 20071219 # list of sources @@ -57,7 +57,7 @@ prog perl = { version = %{version} url = ftp://ftp.cpan.org/pub/CPAN/src/ - regex = perl-(5\.8\.\d+)\.tar\.gz + regex = perl-(5\.10\.\d+)\.tar\.gz } %prep @@ -107,7 +107,8 @@ -Dglibpth="$libdirs" \ -Dscriptdir="%{l_prefix}/bin" \ -Uinstallusrbinperl \ - -Ui_malloc -Ui_iconv -Ui_db + -Ui_malloc -Ui_iconv -Ui_db \ + -Uusedevel # build the Perl package %{l_make} %{l_mflags} -f Makefile @@ . patch -p0 <<'@@ .' Index: openpkg-src/perl58/perl58.patch ============================================================================ $ cvs diff -u -r0 -r1.1 perl58.patch --- /dev/null 2007-12-19 14:17:10 +0100 +++ perl58.patch 2007-12-19 14:17:32 +0100 @@ -0,0 +1,474 @@ +By default, the "vendor" area is not used, so Perl's installation +procedure forgot to create its top-level paths, too. In OpenPKG we use +the "vendor" area, so make sure it is created the same way the "site" +area is. + +Index: installperl +--- installperl.orig 2006-01-28 16:35:28 +0100 ++++ installperl 2006-02-01 20:00:56 +0100 +@@ -189,6 +189,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}"; + my $man1ext = $Config{man1ext}; + my $libperl = $Config{libperl}; +@@ -381,6 +383,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); + + 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-01-31 13:34:47 +0100 ++++ perl.c 2006-02-01 20:00:56 +0100 +@@ -4776,39 +4776,6 @@ + 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 +4817,39 @@ + 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 + +----------------------------------------------------------------------------- + +Port to [Open]Darwin 6.6.2: + +1. In OpenPKG, Perl does not use the vendor GCC and our GCC does not + understand "-no-cpp-precomp", so remove this build option. + +2. The <sys/mman.h> indirectly includes system specific headers + which in turn have fields named "environ" while Perl uses + a define of "environ" internally. So wrap the inclusion. + +3. Darwin 6 no longer accepts the non-standard "#import" statements, + so replace with "#include" and circumvent some header problem + related to the non-standard "__private_extern__" attribute. + +Index: hints/darwin.sh +--- hints/darwin.sh.orig 2005-09-18 17:13:41 +0200 ++++ hints/darwin.sh 2006-02-01 20:00:56 +0100 +@@ -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 @@ + esac + ldlibpthname='DYLD_LIBRARY_PATH'; + +-# useshrplib=true results in much slower startup times. +-# 'false' is the default value. Use Configure -Duseshrplib to override. ++useshrplib='true' + + cat > UU/archname.cbu <<'EOCBU' + # This script UU/archname.cbu will get 'called-back' by Configure +Index: perlio.c +--- perlio.c.orig 2006-01-06 23:42:20 +0100 ++++ perlio.c 2006-02-01 20:00:56 +0100 +@@ -448,7 +448,14 @@ + #include <unistd.h> + #endif + #ifdef HAS_MMAP ++#ifdef PERL_DARWIN ++#define environ_safe environ ++#undef environ + #include <sys/mman.h> ++#define environ environ_safe ++#else ++#include <sys/mman.h> ++#endif + #endif + + void +Index: ext/DynaLoader/dl_dyld.xs +--- ext/DynaLoader/dl_dyld.xs.orig 2005-04-18 19:04:24 +0200 ++++ ext/DynaLoader/dl_dyld.xs 2006-02-01 20:00:56 +0100 +@@ -45,7 +45,13 @@ + + #undef environ + #undef bool ++#ifdef PERL_DARWIN ++#define __private_extern__ extern ++#include <mach-o/dyld.h> ++#undef __private_extern__ ++#else + #import <mach-o/dyld.h> ++#endif + + static char *dlerror() + { + +----------------------------------------------------------------------------- + +Port to Tru64 5.1: + +Under Tru64 our gcc has to be built without binutils and the system +ld(1) does not accept a "-O" option, so remove the whole passing of +optimization flags to ld(1). Under a brain-dead platform like Tru64 we +really don't need any more optimization because we are already happy if +it works at all. + +Index: hints/dec_osf.sh +--- hints/dec_osf.sh.orig 2006-01-08 10:53:29 +0100 ++++ hints/dec_osf.sh 2006-02-01 20:00:56 +0100 +@@ -279,15 +279,6 @@ + *) if $test "X$optimize" = "X$undef"; then + lddlflags="$lddlflags -msym" + else +- case "$myosvers" in +- *4.0D*) +- # QAR 56761: -O4 + .so may produce broken code, +- # fixed in 4.0E or better. +- ;; +- *) +- lddlflags="$lddlflags $optimize" +- ;; +- esac + # -msym: If using a sufficiently recent /sbin/loader, + # keep the module symbols with the modules. + lddlflags="$lddlflags -msym $_lddlflags_strict_ansi" + +----------------------------------------------------------------------------- + +http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0976 + Multiple scripts in the perl package in Trustix Secure Linux 1.5 + through 2.1, and possibly other operating systems, allows local + users to overwrite files via a symlink attack on temporary files. + +Index: lib/CGI/Cookie.pm +--- lib/CGI/Cookie.pm.orig 2005-12-05 17:30:25 +0100 ++++ lib/CGI/Cookie.pm 2006-02-01 20:00:56 +0100 +@@ -407,7 +407,7 @@ + You may also retrieve cookies that were stored in some external + form using the parse() class method: + +- $COOKIES = `cat /usr/tmp/Cookie_stash`; ++ $COOKIES = `cat /var/run/www/Cookie_stash`; + %cookies = parse CGI::Cookie($COOKIES); + + If you are in a mod_perl environment, you can save some overhead by +Index: lib/Shell.pm +--- lib/Shell.pm.orig 2004-06-01 11:42:17 +0200 ++++ lib/Shell.pm 2006-02-01 20:00:56 +0100 +@@ -127,7 +127,7 @@ + use Shell qw(cat ps cp); + $passwd = cat('</etc/passwd'); + @pslines = ps('-ww'), +- cp("/etc/passwd", "/tmp/passwd"); ++ cp("/etc/passwd", "/etc/passwd.orig"); + + # object oriented + my $sh = Shell->new; + +----------------------------------------------------------------------------- + +Index: Configure +--- Configure.orig 2006-01-08 15:51:03 +0100 ++++ Configure 2006-02-01 20:00:56 +0100 +@@ -7663,7 +7663,7 @@ + ;; + linux|irix*|gnu*) dflt='-shared' ;; + next) dflt='none' ;; +- solaris) dflt='-G' ;; ++ solaris) dflt='-shared' ;; + sunos) dflt='-assert nodefinitions' ;; + svr4*|esix*|nonstopux) dflt="-G $ldflags" ;; + *) dflt='none' ;; + +----------------------------------------------------------------------------- + +Security Fix (CVE-2005-3962, OpenPKG-SA-2005.025-perl) + +Index: sv.c +--- sv.c.orig 2006-01-16 13:22:21 +0100 ++++ sv.c 2006-02-01 20:00:56 +0100 +@@ -8650,7 +8650,10 @@ + if (EXPECT_NUMBER(q, width)) { + if (*q == '$') { + ++q; +- efix = width; ++ if (width > PERL_INT_MAX) ++ efix = PERL_INT_MAX; ++ else ++ efix = width; + } else { + goto gotwidth; + } + +----------------------------------------------------------------------------- + +- Fix syntax error (unterminated quoted string) +- Support GCC 4.2 + +Index: makedepend.SH +--- makedepend.SH.orig 2003-06-05 20:11:10 +0200 ++++ makedepend.SH 2007-05-20 09:32:10 +0200 +@@ -128,7 +128,7 @@ + *.y) filebase=`basename $file .y` ;; + esac + case "$file" in +- */*) finc="-I`echo $file | sed 's#/[^/]*$##`" ;; ++ */*) finc="-I`echo $file | sed 's#/[^/]*$##'`" ;; + *) finc= ;; + esac + $echo "Finding dependencies for $filebase$_o." +@@ -167,6 +167,7 @@ + -e '/^#.*<builtin>/d' \ + -e '/^#.*<built-in>/d' \ + -e '/^#.*<command line>/d' \ ++ -e '/^#.*<command-line>/d' \ + -e '/^#.*"-"/d' \ + -e '/: file path prefix .* never used$/d' \ + -e 's#\.[0-9][0-9]*\.c#'"$file.c#" \ + +----------------------------------------------------------------------------- + +Support FreeBSD >= 7.0 where objformat(8) is gone + +Index: hints/freebsd.sh +--- hints/freebsd.sh.orig Wed Mar 24 22:47:33 2004 ++++ hints/freebsd.sh Mon Feb 19 20:53:50 2007 +@@ -116,17 +122,17 @@ case "$osvers" in + + *) + objformat=`/usr/bin/objformat` +- if [ x$objformat = xelf ]; then +- libpth="/usr/lib /usr/local/lib" +- glibpth="/usr/lib /usr/local/lib" +- ldflags="-Wl,-E " +- lddlflags="-shared " +- else ++ if [ x$objformat = xaout ]; then + if [ -e /usr/lib/aout ]; then + libpth="/usr/lib/aout /usr/local/lib /usr/lib" + glibpth="/usr/lib/aout /usr/local/lib /usr/lib" + fi + lddlflags='-Bshareable' ++ else ++ libpth="/usr/lib /usr/local/lib" ++ glibpth="/usr/lib /usr/local/lib" ++ ldflags="-Wl,-E " ++ lddlflags="-shared " + fi + cccdlflags='-DPIC -fPIC' + ;; + + +----------------------------------------------------------------------------- + +Fix issue when <asm/page.h> is missing from the Linux headers. +See https://bugs.gentoo.org/show_bug.cgi?id=168312 for details. + +Index: ext/IPC/SysV/SysV.xs +--- ext/IPC/SysV/SysV.xs.orig 2001-06-30 14:46:07.000000000 -0400 ++++ ext/IPC/SysV/SysV.xs 2006-06-02 17:37:22.000000000 -0400 +@@ -3,9 +3,6 @@ + #include "XSUB.h" + + #include <sys/types.h> +-#ifdef __linux__ +-# include <asm/page.h> +-#endif + #if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM) + #ifndef HAS_SEM + # include <sys/ipc.h> + +----------------------------------------------------------------------------- + +Security Fix (CVE-2007-5116) + +Fix a possible buffer overflow with ASCII regexes +that really are Unicode regexes. + +Index: regcomp.c +--- regcomp.c.orig 2006-01-08 21:59:27.000000000 +0100 ++++ regcomp.c 2007-11-06 22:48:26.000000000 +0100 +@@ -135,7 +135,10 @@ typedef struct RExC_state_t { + I32 extralen; + I32 seen_zerolen; + I32 seen_evals; +- I32 utf8; ++ I32 utf8; /* whether the pattern is utf8 or not */ ++ I32 orig_utf8; /* whether the pattern was originally in utf8 */ ++ /* XXX use this for future optimisation of case ++ * where pattern must be upgraded to utf8. */ + #if ADD_TO_REGEXEC + char *starttry; /* -Dr: where regtry was called. */ + #define RExC_starttry (pRExC_state->starttry) +@@ -161,6 +164,7 @@ typedef struct RExC_state_t { + #define RExC_seen_zerolen (pRExC_state->seen_zerolen) + #define RExC_seen_evals (pRExC_state->seen_evals) + #define RExC_utf8 (pRExC_state->utf8) ++#define RExC_orig_utf8 (pRExC_state->orig_utf8) + + #define ISMULT1(c) ((c) == '*' || (c) == '+' || (c) == '?') + #define ISMULT2(s) ((*s) == '*' || (*s) == '+' || (*s) == '?' || \ +@@ -1749,15 +1753,16 @@ Perl_pregcomp(pTHX_ char *exp, char *xen + if (exp == NULL) + FAIL("NULL regexp argument"); + +- RExC_utf8 = pm->op_pmdynflags & PMdf_CMP_UTF8; ++ RExC_utf8 = RExC_orig_utf8 = pm->op_pmdynflags & PMdf_CMP_UTF8; + +- RExC_precomp = exp; + DEBUG_r({ + if (!PL_colorset) reginitcolors(); + PerlIO_printf(Perl_debug_log, "%sCompiling REx%s `%s%*s%s'\n", + PL_colors[4],PL_colors[5],PL_colors[0], +- (int)(xend - exp), RExC_precomp, PL_colors[1]); ++ (int)(xend - exp), exp, PL_colors[1]); + }); ++redo_first_pass: ++ RExC_precomp = exp; + RExC_flags = pm->op_pmflags; + RExC_sawback = 0; + +@@ -1783,6 +1788,25 @@ Perl_pregcomp(pTHX_ char *exp, char *xen + RExC_precomp = Nullch; + return(NULL); + } ++ if (RExC_utf8 && !RExC_orig_utf8) { ++ /* It's possible to write a regexp in ascii that represents unicode ++ codepoints outside of the byte range, such as via \x{100}. If we ++ detect such a sequence we have to convert the entire pattern to utf8 ++ and then recompile, as our sizing calculation will have been based ++ on 1 byte == 1 character, but we will need to use utf8 to encode ++ at least some part of the pattern, and therefore must convert the whole ++ thing. ++ XXX: somehow figure out how to make this less expensive... ++ -- dmq */ ++ STRLEN len = xend-exp; ++ DEBUG_r(PerlIO_printf(Perl_debug_log, ++ "UTF8 mismatch! Converting to utf8 for resizing and compile\n")); ++ exp = (char*)Perl_bytes_to_utf8(aTHX_ (U8*)exp, &len); ++ xend = exp + len; ++ RExC_orig_utf8 = RExC_utf8; ++ SAVEFREEPV(exp); ++ goto redo_first_pass; ++ } + DEBUG_r(PerlIO_printf(Perl_debug_log, "size %"IVdf" ", (IV)RExC_size)); + + /* Small enough for pointer-storage convention? +Index: t/op/pat.t +--- t/op/pat.t.orig 2006-01-07 13:53:32.000000000 +0100 ++++ t/op/pat.t 2007-11-06 21:52:30.000000000 +0100 +@@ -6,7 +6,7 @@ + + $| = 1; + +-print "1..1187\n"; ++print "1..1189\n"; + + BEGIN { + chdir 't' if -d 't'; +@@ -3395,5 +3395,14 @@ ok(("foba ba$s" =~ qr/(foo|BaSS|bar)/i) + "# assigning to original string should not corrupt match vars"); + } + +-# last test 1187 ++{ ++ use warnings; ++ my @w; ++ local $SIG{__WARN__}=sub{push @w,"@_"}; ++ my $c=qq(\x{DF}); ++ ok($c=~/${c}|\x{100}/, "ASCII pattern that really is utf8"); ++ ok(@w==0, "ASCII pattern that really is utf8"); ++} ++ ++# last test 1189 + @@ . patch -p0 <<'@@ .' Index: openpkg-src/perl58/perl58.spec ============================================================================ $ cvs diff -u -r0 -r1.6 perl58.spec --- /dev/null 2007-12-19 14:17:10 +0100 +++ perl58.spec 2007-12-19 14:17:32 +0100 @@ -0,0 +1,201 @@ +## +## perl58.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/> +## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/> +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## 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. +## + +# package information +Name: perl58 +Summary: Practical Extraction and Reporting Language +URL: http://www.perl.com/ +Vendor: The Perl Project +Packager: OpenPKG Foundation e.V. +Distribution: OpenPKG Community +Class: EVAL +Group: Perl +License: GPL/Artistic +Version: 5.8.8 +Release: 20071219 + +# package options +%option with_perl no + +# list of sources +Source0: ftp://ftp.cpan.org/pub/CPAN/src/perl-%{version}.tar.gz +Patch0: perl58.patch + +# build information +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20040130, gcc +PreReq: OpenPKG, openpkg >= 20040130 +AutoReq: no +AutoReqProv: no +%if "%{with_perl}" == "yes" +Provides: perl = %{version}-%{release} +%endif + +%description + Perl ("Practical Reporting and Extraction Language") is a very + sophisticated and flexible (but this way also complex) programming + language. This is the original implementation of the Perl 5 + interpreter from Larry Wall and his community. + + ATTENTION: THIS IS THE DEVELOPMENT SERIES OF PERL 5! + IT IS NOT INTENDED FOR PRODUCTION USE. USE IT ON YOUR OWN RISK. + +%track + prog perl58 = { + version = %{version} + url = ftp://ftp.cpan.org/pub/CPAN/src/ + regex = perl-(5\.8\.\d+)\.tar\.gz + } + +%prep + %setup -q -n perl-%{version} + %patch -p0 + chmod -R u+w . + +%build + # configure the Perl package + %{l_shtool} subst \ + -e 's;\(.*for thislib in $libswanted.*\);libswanted=`echo " $libswanted " | sed -e "s/ bind / /g" -e "s/ db / /g" -e "s/ gdbm / /g" -e "s/ iconv / /g"`\; \1;' \ + -e 's;package=perl5;package=perl;' \ + Configure + %{l_shtool} subst \ + -e 's; */usr/local/lib;;' \ + hints/freebsd.sh hints/netbsd.sh + optimize="" + case "%{l_platform -t}" in + amd64-* ) optimize="%{l_cflags}" ;; + *-aix* ) optimize="%{l_cflags}" ;; + *-* ) optimize="%{l_cflags -O}" ;; + esac + if [ ".$optimize" = . ]; then + optimize="-Uoptimize" + else + optimize="-Doptimize=$optimize" + fi + libdirs="" + for dir in %{l_prefix}/lib /lib64 /usr/lib64 /lib /usr/lib /usr/ccs/lib; do + [ -d $dir ] && libdirs="$libdirs $dir" + done + ./Configure \ + -d -e -s \ + -Dcf_by="%{l_openpkg_release}" \ + -Dcf_email="http://www.openpkg.org/" \ + -Dprefix=%{l_prefix} \ + -Dvendorprefix=%{l_prefix} \ + -Dinstallprefix=%{l_prefix} \ + -Dinstallstyle="lib/perl5" \ + -Dman1dir=%{l_prefix}/man/man1 \ + -Dman3dir=%{l_prefix}/man/man3 \ + -Dcc="%{l_prefix}/bin/gcc" "$optimize" \ + -Dlocincpth="%{l_prefix}/include" \ + -Dloclibpth="%{l_prefix}/lib" \ + -Dldflags="%{l_ldflags}" \ + -Dlibpth="$libdirs" \ + -Dglibpth="$libdirs" \ + -Dscriptdir="%{l_prefix}/bin" \ + -Uinstallusrbinperl \ + -Ui_malloc -Ui_iconv -Ui_db \ + -Uusedevel + + # build the Perl package + %{l_make} %{l_mflags} -f Makefile + +%install + rm -rf $RPM_BUILD_ROOT + + # install the Perl package via standard procedure + %{l_make} %{l_mflags} -f Makefile install DESTDIR=$RPM_BUILD_ROOT + + # install Perl versions of system header files + ( case "%{l_platform -t}" in + *-darwin* ) export DYLD_LIBRARY_PATH="`pwd`" ;; + esac + cd /usr/include + PERL5LIB=$RPM_BUILD_ROOT%{l_prefix}/lib/perl + export PERL5LIB + eval `$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installarchlib` + echo *.h sys/*.h |\ + xargs $RPM_BUILD_ROOT%{l_prefix}/bin/perl%{version} \ + $RPM_BUILD_ROOT%{l_prefix}/bin/h2ph%{version} -h -d $RPM_BUILD_ROOT$installarchlib + ) || exit $? + + # post-adjustments to installation tree + rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man3 + for name in \ + libnetcfg perlaix perlamiga perlapollo \ + perlbeos perlbs2000 perlcygwin perldgux perlepoc perlfreebsd perlhpux \ + perlhurd perlirix perlmachten perlmacos perlmacosx perlmint perlmpeix \ + perlnetware perlos2 perlos390 perlos400 perlplan9 perlqnx perlsolaris \ + perlvmesa perlvms perlvos perlwin32; do + rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$name.1 + done + + # re-adjust configuration as mentioned in Perl's INSTALL document + ( case "%{l_platform -t}" in + *-darwin* ) export DYLD_LIBRARY_PATH="`pwd`" ;; + esac + $RPM_BUILD_ROOT%{l_prefix}/bin/perl%{version} -pi.orig \ + -e "s:$RPM_BUILD_ROOT%{l_prefix}:%{l_prefix}:g" \ + $RPM_BUILD_ROOT%{l_prefix}/lib/perl/%{version}/*/Config.pm \ + `find $RPM_BUILD_ROOT%{l_prefix}/lib/perl/%{version}/ \ + -type f -name ".packlist" -print` + find $RPM_BUILD_ROOT%{l_prefix}/lib/perl/ \ + -name "*.orig" -print | xargs rm -f + ) || exit $? + + # strip binary files + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true + + # resolve file conflicts (with perl-locale) + rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/enc2xs \ + $RPM_BUILD_ROOT%{l_prefix}/bin/piconv + + # resolve filename conflicts +%if "%{with_perl}" == "yes" + ( cd $RPM_BUILD_ROOT%{l_prefix}/bin + for file in *; do + [ ".$file" = ".*" ] && continue + mv ${file} `echo ${file} | sed -e 's;%{version}$;;'` + done + ) || exit $? +%else + ln $RPM_BUILD_ROOT%{l_prefix}/bin/perl%{version} \ + $RPM_BUILD_ROOT%{l_prefix}/bin/perl58 + ( cd $RPM_BUILD_ROOT%{l_prefix}/man/man1 + for file in *; do + [ ".$file" = ".*" ] && continue + mv ${file} `echo ${file} | sed -e 's;^\([^.]*\)\(\..*\)$;\1%{version}\2;'` + done + ) || exit $? +%endif + + # determine installed files + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + +%files -f files + +%clean + rm -rf $RPM_BUILD_ROOT + @@ . ______________________________________________________________________ OpenPKG http://openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org