From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SEKsr-0000Q0-95 for garchives@archives.gentoo.org; Sun, 01 Apr 2012 13:31:53 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 720C9E0B6E; Sun, 1 Apr 2012 13:31:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 07922E0B6E for ; Sun, 1 Apr 2012 13:31:45 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 427481B401B for ; Sun, 1 Apr 2012 13:31:45 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 12EB2E542C for ; Sun, 1 Apr 2012 13:31:44 +0000 (UTC) From: "Torsten Veller" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Torsten Veller" Message-ID: <1333286731.7ac9a460307a4efe370689379f79a54f2edd28fa.tove@gentoo> Subject: [gentoo-commits] proj/perl-overlay:master commit in: dev-lang/perl/files/, dev-lang/perl/ X-VCS-Repository: proj/perl-overlay X-VCS-Files: dev-lang/perl/files/perl-5.10.1-hpux.patch dev-lang/perl/files/perl-5.12.3-aix-soname.patch dev-lang/perl/files/perl-5.12.3-interix.patch dev-lang/perl/files/perl-5.12.3-mint.patch dev-lang/perl/files/perl-5.14.1-cleanup-paths.patch dev-lang/perl/files/perl-5.8.8-darwin-cc-ld.patch dev-lang/perl/files/perl-5.8.8-solaris-relocation.patch dev-lang/perl/files/perl-5.8.8-solaris11.patch dev-lang/perl/files/perl-5.8.8-usr-local.patch dev-lang/perl/metadata.xml dev-lang/perl/perl-5.14.2.ebuild X-VCS-Directories: dev-lang/perl/files/ dev-lang/perl/ X-VCS-Committer: tove X-VCS-Committer-Name: Torsten Veller X-VCS-Revision: 7ac9a460307a4efe370689379f79a54f2edd28fa X-VCS-Branch: master Date: Sun, 1 Apr 2012 13:31:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: f1cb72e1-51aa-42d8-96d8-09a00c23b8b3 X-Archives-Hash: f2ec051945cbb32ba33d4d3fa10b349e commit: 7ac9a460307a4efe370689379f79a54f2edd28fa Author: Torsten Veller gentoo org> AuthorDate: Sun Apr 1 13:24:49 2012 +0000 Commit: Torsten Veller gentoo org> CommitDate: Sun Apr 1 13:25:31 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/perl-overlay.= git;a=3Dcommit;h=3D7ac9a460 [add] dev-lang/perl-5.14.2 from ::gentoo (Portage version: 2.2.0_alpha96/git/Linux x86_64, signed Manifest commit = with key 0x4E046AEC) --- dev-lang/perl/files/perl-5.10.1-hpux.patch | 40 ++ dev-lang/perl/files/perl-5.12.3-aix-soname.patch | 70 ++ dev-lang/perl/files/perl-5.12.3-interix.patch | 21 + dev-lang/perl/files/perl-5.12.3-mint.patch | 321 +++++++++ .../perl/files/perl-5.14.1-cleanup-paths.patch | 100 +++ dev-lang/perl/files/perl-5.8.8-darwin-cc-ld.patch | 22 + .../perl/files/perl-5.8.8-solaris-relocation.patch | 21 + dev-lang/perl/files/perl-5.8.8-solaris11.patch | 14 + dev-lang/perl/files/perl-5.8.8-usr-local.patch | 25 + dev-lang/perl/metadata.xml | 12 + dev-lang/perl/perl-5.14.2.ebuild | 715 ++++++++++++++= ++++++ 11 files changed, 1361 insertions(+), 0 deletions(-) diff --git a/dev-lang/perl/files/perl-5.10.1-hpux.patch b/dev-lang/perl/f= iles/perl-5.10.1-hpux.patch new file mode 100644 index 0000000..ca4ee52 --- /dev/null +++ b/dev-lang/perl/files/perl-5.10.1-hpux.patch @@ -0,0 +1,40 @@ +# do not assume '.' being in PATH on hpux, +# use 'gcc' as linker, link with '-lm'. + +--- hints/hpux.sh ++++ hints/hpux.sh +@@ -190,7 +190,7 @@ + $define|true|[Yy]) + echo '#include \nint main(){long l;printf("%d\\n",sizeof(l));= }'>try.c + $cc -o try $ccflags $ldflags try.c +- if [ "`try`" =3D "8" ]; then ++ if [ "`./try`" =3D "8" ]; then + case "$use64bitall" in + $define|true|[Yy]) ;; + *) cat <&4 +@@ -338,7 +338,7 @@ + } /* main */ + EOF + $cc -o try $ccflags $ldflags try.c +- maxdsiz=3D`try` ++ maxdsiz=3D`./try` + rm -f try try.c core + if [ $maxdsiz -le 64 ]; then + # 64 Mb is probably not enough to optimize toke.c +@@ -363,11 +363,12 @@ + "") optimize=3D"-g -O" ;; + *O[3456789]*) optimize=3D`echo "$optimize" | sed -e 's/O[3-9]/O2/'= ` ;; + esac +- #ld=3D"$cc" +- ld=3D/usr/bin/ld ++ ld=3D"$cc" ++ #ld=3D/usr/bin/ld + cccdlflags=3D'-fPIC' +- #lddlflags=3D'-shared' +- lddlflags=3D'-b' ++ lddlflags=3D'-shared' ++ #lddlflags=3D'-b' ++ libs=3D'-lm' + case "$optimize" in + *-g*-O*|*-O*-g*) + # gcc without gas will not accept -g diff --git a/dev-lang/perl/files/perl-5.12.3-aix-soname.patch b/dev-lang/= perl/files/perl-5.12.3-aix-soname.patch new file mode 100644 index 0000000..70fe5fa --- /dev/null +++ b/dev-lang/perl/files/perl-5.12.3-aix-soname.patch @@ -0,0 +1,70 @@ +1) Match "powerpc-ibm-aix5.3.0.0-gcc" as gcc too. + +2) Creating shared library on aix with full soname support, following +http://lists.gnu.org/archive/html/libtool/2011-01/msg00023.html +http://lists.gnu.org/archive/html/libtool/2011-02/msg00000.html + +Once there is an agreement on that, this patch basically is designed +for upstream perl to be applied when their soname would change anyway. +However, there is 'strip' being used, and I don't know yet what to +use instead in cross-aix setups with recent binutils. + +--- Makefile.SH ++++ Makefile.SH +@@ -92,12 +92,12 @@ + ;; + aix*) + case "$cc" in +- gcc*) +- shrpldflags=3D"-shared -Wl,-H512 -Wl,-T512 -Wl,-bhalt:4 -Wl,-bM:SRE = -Wl,-bE:perl.exp" ++ *gcc*) ++ shrpldflags=3D"-shared -Wl,-H512 -Wl,-T512 -Wl,-bhalt:4 -Wl,-bE:perl= .exp" + case "$osvers" in +- 3*) shrpldflags=3D"$shrpldflags -e _nostart" ++ 3*) shrpldflags=3D"$shrpldflags -Wl,-bM:SRE -e _nostart" + ;; +- *) shrpldflags=3D"$shrpldflags -Wl,-bnoentry" ++ *) shrpldflags=3D"$shrpldflags -Wl,-G -Wl,-bernotok -Wl,-bnoentry" + ;; + esac + shrpldflags=3D"$shrpldflags $ldflags $perllibs $cryptlib" +@@ -105,11 +105,11 @@ + linklibperl_nonshr=3D'-lperl_nonshr' + ;; + *) +- shrpldflags=3D"-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp" ++ shrpldflags=3D"-H512 -T512 -bhalt:4 -bE:perl.exp" + case "$osvers" in +- 3*) shrpldflags=3D"$shrpldflags -e _nostart" ++ 3*) shrpldflags=3D"$shrpldflags -bM:SRE -e _nostart" + ;; +- *) shrpldflags=3D"$shrpldflags -b noentry" ++ *) shrpldflags=3D"$shrpldflags -G -bernotok -b noentry" + ;; + esac + shrpldflags=3D"$shrpldflags $ldflags $perllibs $cryptlib" +@@ -763,11 +763,19 @@ + !NO!SUBS! + case "$osname" in + aix) +- $spitshell >>$Makefile <<'!NO!SUBS!' +- rm -f libperl$(OBJ_EXT) +- mv $@ libperl$(OBJ_EXT) +- $(AR) qv $(LIBPERL) libperl$(OBJ_EXT) +-!NO!SUBS! ++ bits=3D32 ++ if test X"$use64bitall" =3D Xdefine; then bits=3D64; fi ++ $spitshell >>$Makefile < shr.imp ++ \$(AR) qv \$@ shr.imp shr.o ++ rm -f shr.imp shr.o ++!GROK!THIS! + ;; + esac + ;; diff --git a/dev-lang/perl/files/perl-5.12.3-interix.patch b/dev-lang/per= l/files/perl-5.12.3-interix.patch new file mode 100644 index 0000000..5e875b2 --- /dev/null +++ b/dev-lang/perl/files/perl-5.12.3-interix.patch @@ -0,0 +1,21 @@ +reported: http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2011-04= /msg01014.html + +diff -ru perl-5.12.3.orig/hints/interix.sh perl-5.12.3/hints/interix.sh +--- perl-5.12.3.orig/hints/interix.sh 2011-04-27 08:34:00 +0200 ++++ perl-5.12.3/hints/interix.sh 2011-04-27 08:53:46 +0200 +@@ -6,14 +6,13 @@ + cc=3D'gcc' + cccdlflags=3D"-DPIC $cccdlflags" + ccdlflags=3D'-Wl,-E' +-ccflags=3D"-D_ALL_SOURCE $ccflags" +-d_poll=3D"$undef" + ld=3D'gcc' + lddlflags=3D"-shared $lddlflags" + rpathflag=3D'-Wl,-R' + sharpbang=3D'#!' + usemymalloc=3D'false' + usenm=3D'false' ++firstmakefile=3DGNUmakefile +=20 + # This script UU/usethreads.cbu will get 'called-back' by Configure=20 + # after it has prompted the user for whether to use threads.=20 diff --git a/dev-lang/perl/files/perl-5.12.3-mint.patch b/dev-lang/perl/f= iles/perl-5.12.3-mint.patch new file mode 100644 index 0000000..4c6c108 --- /dev/null +++ b/dev-lang/perl/files/perl-5.12.3-mint.patch @@ -0,0 +1,321 @@ +http://rt.perl.org/rt3/Ticket/Display.html?id=3D89502 + +--- perl-5.12.3/Configure 2011-02-21 09:18:09.000000000 +0000 ++++ perl-5.12.3/Configure 2011-02-21 09:38:49.000000000 +0000 +@@ -1275,6 +1275,9 @@=20 + elif test -n "$DJGPP"; then + : DOS DJGPP + _exe=3D".exe" ++elif test -f "/kern/cookiejar"; then ++: MiNT ++ _exe=3D"" + elif test -d c:/. -o -n "$is_os2" ; then + : OS/2 or cygwin + _exe=3D".exe" +@@ -1402,7 +1405,7 @@=20 + xcat=3D/bin/cat + test -f $xcat$_exe || xcat=3D/usr/bin/cat + if test ! -f $xcat$_exe; then +- for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do ++ for p in `echo $PATH | sed -e 's/$p_/ /g'` $paths; do + if test -f $p/cat$_exe; then + xcat=3D$p/cat + break +--- perl-5.12.3/ext/DynaLoader/dl_dld.xs 2010-11-21 21:40:55.000000000 += 0000 ++++ perl-5.12.3/ext/DynaLoader/dl_dld.xs 2011-02-21 09:38:51.000000000 += 0000 +@@ -116,6 +116,18 @@=20 + goto haverror; + } +=20 ++ DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dld_link(libm.a)\n")); ++ if (dlderr =3D dld_link("/usr/lib/libm.a")) { ++ SaveError(aTHX_ "dld_link(libm.a): %s", dld_strerror(dlderr)); ++ goto haverror; ++ } ++ ++ DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dld_link(libc.a)\n")); ++ if (dlderr =3D dld_link("/usr/lib/libc.a")) { ++ SaveError(aTHX_ "dld_link(libc.a): %s", dld_strerror(dlderr)); ++ goto haverror; ++ } ++ + max =3D AvFILL(dl_resolve_using); + for (x =3D 0; x <=3D max; x++) { + char *sym =3D SvPVX(*av_fetch(dl_resolve_using, x, 0)); +--- perl-5.12.3/malloc.c 2011-01-09 20:20:57.000000000 +0000 ++++ perl-5.12.3/malloc.c 2011-02-21 09:38:51.000000000 +0000 +@@ -264,7 +264,7 @@=20 + #define MIN_BUC_POW2 (sizeof(void*) > 4 ? 3 : 2) /* Allow for 4-byte ar= ena. */ + #define MIN_BUCKET (MIN_BUC_POW2 * BUCKETS_PER_POW2) +=20 +-#if !(defined(I286) || defined(atarist)) ++#if !defined(I286) + /* take 2k unless the block is bigger than that */ + # define LOG_OF_MIN_ARENA 11 + #else +@@ -551,8 +551,8 @@=20 + */ + #define u_short unsigned short +=20 +-/* 286 and atarist like big chunks, which gives too much overhead. */ +-#if (defined(RCHECK) || defined(I286) || defined(atarist)) && defined(P= ACK_MALLOC) ++/* 286 like big chunks, which gives too much overhead. */ ++#if (defined(RCHECK) || defined(I286)) && defined(PACK_MALLOC) + # undef PACK_MALLOC + #endif=20 +=20 +@@ -1734,16 +1734,14 @@=20 + /* Second, check alignment. */ + slack =3D 0; +=20 +-#if !defined(atarist) /* on the atari we dont have to worry about this = */ +-# ifndef I286 /* The sbrk(0) call on the I286 always returns the next= segment */ ++#ifndef I286 /* The sbrk(0) call on the I286 always returns the next s= egment */ + /* WANTED_ALIGNMENT may be more than NEEDED_ALIGNMENT, but this may + improve performance of memory access. */ + if (PTR2UV(cp) & (WANTED_ALIGNMENT - 1)) { /* Not aligned. */ + slack =3D WANTED_ALIGNMENT - (PTR2UV(cp) & (WANTED_ALIGNMENT - 1))= ; + add +=3D slack; + } +-# endif +-#endif /* !atarist */ ++#endif + =09 + if (add) { + DEBUG_m(PerlIO_printf(Perl_debug_log,=20 +--- perl-5.12.3/miniperlmain.c 2011-01-09 20:20:57.000000000 +0000 ++++ perl-5.12.3/miniperlmain.c 2011-02-21 09:38:49.000000000 +0000 +@@ -45,7 +45,7 @@=20 + #if defined (atarist) + /* The Atari operating system doesn't have a dynamic stack. The + stack size is determined from this value. */ +-long _stksize =3D 64 * 1024; ++long _stksize =3D 256 * 1024; + #endif +=20 + #if defined(PERL_GLOBAL_STRUCT_PRIVATE) +--- perl-5.12.3/os2/perlrexx.c 2010-11-21 21:40:56.000000000 +0000 ++++ perl-5.12.3/os2/perlrexx.c 2011-02-21 09:42:49.000000000 +0000 +@@ -38,7 +38,7 @@=20 + #if defined (atarist) + /* The Atari operating system doesn't have a dynamic stack. The + stack size is determined from this value. */ +-long _stksize =3D 64 * 1024; ++long _stksize =3D 256 * 1024; + #endif +=20 + /* Register any extra external extensions */ +--- perl-5.12.3/perl.c 2011-02-21 09:17:19.000000000 +0000 ++++ perl-5.12.3/perl.c 2011-02-21 09:38:50.000000000 +0000 +@@ -3272,10 +3272,6 @@=20 + "\n\nOS/2 port Copyright (c) 1990, 1991, Raymond Chen, Kai Uwe = Rommel\n" + "Version 5 port Copyright (c) 1994-2002, Andreas Kaiser, Ilya Z= akharevich\n"); + #endif +-#ifdef atarist +- PerlIO_printf(PerlIO_stdout(), +- "atariST series port, ++jrb bammi@cadence.com\n"); +-#endif + #ifdef __BEOS__ + PerlIO_printf(PerlIO_stdout(), + "BeOS port Copyright Tom Spindler, 1997-1999\n"); +--- perl-5.12.3/perl.h 2011-01-09 20:20:57.000000000 +0000 ++++ perl-5.12.3/perl.h 2011-02-21 09:38:50.000000000 +0000 +@@ -497,7 +497,7 @@=20 + */ +=20 + /* define this once if either system, instead of cluttering up the src = */ +-#if defined(MSDOS) || defined(atarist) || defined(WIN32) || defined(NET= WARE) ++#if defined(MSDOS) || defined(WIN32) || defined(NETWARE) + #define DOSISH 1 + #endif +=20 +--- perl-5.12.3/perlio.c 2009-04-14 23:47:25.000000000 +0000 ++++ perl-5.12.3/perlio.c 2010-03-23 18:36:15.000000000 +0000 +@@ -135,17 +135,6 @@=20 + * This used to be contents of do_binmode in doio.c + */ + #ifdef DOSISH +-# if defined(atarist) +- PERL_UNUSED_ARG(iotype); +- if (!fflush(fp)) { +- if (mode & O_BINARY) +- ((FILE *) fp)->_flag |=3D _IOBIN; +- else +- ((FILE *) fp)->_flag &=3D ~_IOBIN; +- return 1; +- } +- return 0; +-# else + dTHX; + PERL_UNUSED_ARG(iotype); + #ifdef NETWARE +@@ -153,7 +142,7 @@=20 + #else + if (PerlLIO_setmode(fileno(fp), mode) !=3D -1) { + #endif +-# if defined(WIN32) && defined(__BORLANDC__) ++# if defined(WIN32) && defined(__BORLANDC__) + /* + * The translation mode of the stream is maintained independent= =20 + of +@@ -169,12 +158,11 @@=20 + fp->flags |=3D _F_BIN; + else + fp->flags &=3D ~_F_BIN; +-# endif ++# endif + return 1; + } + else + return 0; +-# endif + #else + # if defined(USEMYBINMODE) + dTHX; +--- perl-5.12.3/pp_sys.c 2011-01-09 20:20:58.000000000 +0000 ++++ perl-5.12.3/pp_sys.c 2011-02-21 09:38:50.000000000 +0000 +@@ -3308,14 +3308,6 @@=20 + RETPUSHNO; + } +=20 +-#if defined(atarist) /* this will work with atariST. Configure will +- make guesses for other systems. */ +-# define FILE_base(f) ((f)->_base) +-# define FILE_ptr(f) ((f)->_ptr) +-# define FILE_cnt(f) ((f)->_cnt) +-# define FILE_bufsiz(f) ((f)->_cnt + ((f)->_ptr - (f)->_base)) +-#endif +- + PP(pp_fttext) + { + dVAR; +@@ -5567,30 +5559,6 @@=20 + case 8: + retval =3D syscall(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]); + break; +-#ifdef atarist +- case 9: +- retval =3D syscall(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]); +- break; +- case 10: +- retval =3D syscall(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]); +- break; +- case 11: +- retval =3D syscall(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9], +- a[10]); +- break; +- case 12: +- retval =3D syscall(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9], +- a[10],a[11]); +- break; +- case 13: +- retval =3D syscall(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9], +- a[10],a[11],a[12]); +- break; +- case 14: +- retval =3D syscall(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9], +- a[10],a[11],a[12],a[13]); +- break; +-#endif /* atarist */ + } + SP =3D ORIGMARK; + PUSHi(retval); +--- perl-5.12.3/util.c 2011-01-09 20:20:58.000000000 +0000 ++++ perl-5.12.3/util.c 2011-02-21 09:38:51.000000000 +0000 +@@ -2545,7 +2545,7 @@=20 + return PerlIO_fdopen(p[This], mode); + } + #else +-#if defined(atarist) || defined(EPOC) ++#if defined(EPOC) + FILE *popen(); + PerlIO * + Perl_my_popen(pTHX_ const char *cmd, const char *mode) +@@ -2994,7 +2994,7 @@=20 + } + #endif +=20 +-#if defined(atarist) || defined(OS2) || defined(EPOC) ++#if defined(OS2) || defined(EPOC) + int pclose(); + #ifdef HAS_FORK + int /* Cannot prototype with I32 +@@ -3111,7 +3111,7 @@=20 + I32 len =3D 0; + int retval; + char *bufend; +-#if defined(DOSISH) && !defined(OS2) && !defined(atarist) ++#if defined(DOSISH) && !defined(OS2) + # define SEARCH_EXTS ".bat", ".cmd", NULL + # define MAX_EXT_LEN 4 + #endif +@@ -3234,28 +3234,25 @@=20 +=20 + bufend =3D s + strlen(s); + while (s < bufend) { +-#if defined(atarist) || defined(DOSISH) ++#if defined(DOSISH) + for (len =3D 0; *s +-# ifdef atarist +- && *s !=3D ',' +-# endif + && *s !=3D ';'; len++, s++) { + if (len < sizeof tmpbuf) + tmpbuf[len] =3D *s; + } + if (len < sizeof tmpbuf) + tmpbuf[len] =3D '\0'; +-#else /* ! (atarist || DOSISH) */ ++#else /* ! (DOSISH) */ + s =3D delimcpy(tmpbuf, tmpbuf + sizeof tmpbuf, s, bufend, + ':', + &len); +-#endif /* ! (atarist || DOSISH) */ ++#endif /* ! (DOSISH) */ + if (s < bufend) + s++; + if (len + 1 + strlen(scriptname) + MAX_EXT_LEN >=3D sizeof tmpbuf) + continue; /* don't search dir with too-long name */ + if (len +-# if defined(atarist) || defined(DOSISH) ++# if defined(DOSISH) + && tmpbuf[len - 1] !=3D '/' + && tmpbuf[len - 1] !=3D '\\' + # endif +--- perl-5.12.3/hints/freemint.sh 2011-01-09 20:20:58.000000000 +0000 ++++ perl-5.12.3/hints/freemint.sh 2011-02-21 09:38:51.000000000 +0000 +@@ -0,0 +1,34 @@=20 ++# hints/freemint.sh ++# ++# talk to guido@freemint.de if you want to change this file. ++# Please read the README.mint file. ++# ++# misc stuff ++ ++archname=3D"m68k-freemint" ++ ++cccdlflags=3D' '; # avoid -fPIC ++ccdlflags=3D"-Wl,-whole-archive -lgcc -lpthread -Wl,-no-whole-archive" ++ ++# libs ++libpth=3D"$prefix/lib /usr/local/lib /usr/lib" ++glibpth=3D"$libpth" ++xlibpth=3D"$libpth" ++ ++ccflags=3D"$ccflags -D_GNU_SOURCE" ++libswanted=3D'm dld' ++dl_src=3D'dl_dld.xs' ++dlext=3D'o' ++lddlflags=3D'-r' ++ldflags=3D'-static' ++so=3D'none' ++useshrplib=3D'false' ++ ++#sbrk() returns -1 (failure) somewhere in lib/unicore/mktables at ++#around 14M, so we need to use system malloc() as our sbrk() ++malloc_cflags=3D'ccflags=3D"-DUSE_PERL_SBRK -DPERL_SBRK_VIA_MALLOC $ccf= lags"' ++ ++# Locales aren't feeling well. We crash if -Ox used. ++locale_cflags=3D'optimize=3D"-O0"' ++LC_ALL=3DC; export LC_ALL; ++LANG=3DC; export LANG; diff --git a/dev-lang/perl/files/perl-5.14.1-cleanup-paths.patch b/dev-la= ng/perl/files/perl-5.14.1-cleanup-paths.patch new file mode 100644 index 0000000..c199041 --- /dev/null +++ b/dev-lang/perl/files/perl-5.14.1-cleanup-paths.patch @@ -0,0 +1,100 @@ +cut the crap of inventing paths, or adding search paths that we don't us= e + +--- Configure ++++ Configure +@@ -105,28 +105,6 @@ + fi + fi +=20 +-: Proper PATH setting +-paths=3D'/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin' +-paths=3D"$paths /opt/bin /opt/local/bin /opt/local /opt/lbin" +-paths=3D"$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/= nbin" +-paths=3D"$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin" +-paths=3D"$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb= " +-paths=3D"$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr= /ccs/bin" +-paths=3D"$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib" +-paths=3D"$paths /sbin /usr/sbin /usr/libexec" +-paths=3D"$paths /system/gnu_library/bin" +- +-for p in $paths +-do +- case "$p_$PATH$p_" in +- *$p_$p$p_*) ;; +- *) test -d $p && PATH=3D$PATH$p_$p ;; +- esac +-done +- +-PATH=3D.$p_$PATH +-export PATH +- + : shall we be using ksh? + inksh=3D'' + needksh=3D'' +@@ -8287,66 +8265,6 @@ + ;; + esac +=20 +-# How will the perl executable find the installed shared $libperl? +-# Add $xxx to ccdlflags. +-# If we can't figure out a command-line option, use $shrpenv to +-# set env LD_RUN_PATH. The main perl makefile uses this. +-shrpdir=3D$archlibexp/CORE +-xxx=3D'' +-tmp_shrpenv=3D'' +-if "$useshrplib"; then +- case "$osname" in +- aix) +- # We'll set it in Makefile.SH... +- ;; +- solaris) +- xxx=3D"-R $shrpdir" +- ;; +- freebsd|mirbsd|netbsd|openbsd|interix|dragonfly) +- xxx=3D"-Wl,-R$shrpdir" +- ;; +- bsdos|linux|irix*|dec_osf|gnu*) +- xxx=3D"-Wl,-rpath,$shrpdir" +- ;; +- next) +- # next doesn't like the default... +- ;; +- beos) +- # beos doesn't like the default, either. +- ;; +- haiku) +- # Haiku doesn't like the default, either. +- ;; +- hpux*) +- # hpux doesn't like the default, either. +- tmp_shrpenv=3D"env LDOPTS=3D\"+s +b${shrpdir}\"" +- ;; +- cygwin) +- # cygwin needs only ldlibpth +- ;; +- *) +- tmp_shrpenv=3D"env LD_RUN_PATH=3D$shrpdir" +- ;; +- esac +- case "$xxx" in +- '') ;; +- *) +- # Only add $xxx if it isn't already in ccdlflags. +- case " $ccdlflags " in +- *" $xxx "*) ;; +- *) ccdlflags=3D"$ccdlflags $xxx" +- cat <&4 +- +-Adding $xxx to the flags +-passed to $ld so that the perl executable will find the +-installed shared $libperl. +- +-EOM +- ;; +- esac +- ;; +- esac +-fi + # Fix ccdlflags in AIX for building external extensions. + # (For building Perl itself bare -bE:perl.exp is needed, + # Makefile.SH takes care of this.) diff --git a/dev-lang/perl/files/perl-5.8.8-darwin-cc-ld.patch b/dev-lang= /perl/files/perl-5.8.8-darwin-cc-ld.patch new file mode 100644 index 0000000..b96eea8 --- /dev/null +++ b/dev-lang/perl/files/perl-5.8.8-darwin-cc-ld.patch @@ -0,0 +1,22 @@ +Use $CC to link (and check for broken compilers), such that we don't get +linked modules of a different bitness. +http://bugs.gentoo.org/show_bug.cgi?id=3D297751 + +--- hints/darwin.sh ++++ hints/darwin.sh +@@ -128,13 +128,13 @@ + ccflags=3D"${ccflags} ${cppflags}" +=20 + # Known optimizer problems. +-case "`cc -v 2>&1`" in ++case "`${cc:-gcc} -v 2>&1`" in + *"3.1 20020105"*) toke_cflags=3D'optimize=3D""' ;; + esac +=20 + # Shared library extension is .dylib. + # Bundle extension is .bundle. +-ld=3D'cc'; ++ld=3D"${cc:-gcc}"; + so=3D'dylib'; + dlext=3D'bundle'; + usedl=3D'define'; diff --git a/dev-lang/perl/files/perl-5.8.8-solaris-relocation.patch b/de= v-lang/perl/files/perl-5.8.8-solaris-relocation.patch new file mode 100644 index 0000000..f2df825 --- /dev/null +++ b/dev-lang/perl/files/perl-5.8.8-solaris-relocation.patch @@ -0,0 +1,21 @@ +http://sourceware.org/ml/binutils/2005-12/msg00008.html +--- hints/solaris_2.sh ++++ hints/solaris_2.sh +@@ -289,7 +289,7 @@ +=20 + END + ccdlflags=3D"$ccdlflags -Wl,-E" +- lddlflags=3D"$lddlflags -Wl,-E -G" ++ lddlflags=3D"$lddlflags -shared" + fi + fi +=20 +@@ -555,7 +555,7 @@ + : #ccflags=3D"$ccflags -Wa,`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev= /null`" + fi + ldflags=3D"$ldflags -m64" +- lddlflags=3D"$lddlflags -G -m64" ++ lddlflags=3D"$lddlflags -m64" + ;; + *) + ccflags=3D"$ccflags `getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`" diff --git a/dev-lang/perl/files/perl-5.8.8-solaris11.patch b/dev-lang/pe= rl/files/perl-5.8.8-solaris11.patch new file mode 100644 index 0000000..6ba72e0 --- /dev/null +++ b/dev-lang/perl/files/perl-5.8.8-solaris11.patch @@ -0,0 +1,14 @@ +Thanks to the nice OpenSolaris guys, I finally figured out that on +OpenSolaris 11, the header dependencies have changed. + +--- perl.h ++++ perl.h +@@ -1192,6 +1192,8 @@ + */ +=20 + #if defined(I_SYSMODE) && !defined(PERL_MICRO) ++#include ++#include + #include + #endif +=20 diff --git a/dev-lang/perl/files/perl-5.8.8-usr-local.patch b/dev-lang/pe= rl/files/perl-5.8.8-usr-local.patch new file mode 100644 index 0000000..c44b786 --- /dev/null +++ b/dev-lang/perl/files/perl-5.8.8-usr-local.patch @@ -0,0 +1,25 @@ +# remove /usr/local paths from all stuff thats used +# in Configure script, locincpth, loclibpth and glibpth are sedded +# afterwards not to conflict with the lib32 and lib64 patches + +diff -rubB perl-5.8.8.orig/Configure perl-5.8.8/Configure +--- perl-5.8.8.orig/Configure Tue Jan 15 10:41:29 2008 ++++ perl-5.8.8/Configure Tue Jan 15 10:44:59 2008 +@@ -4424,7 +4422,7 @@ + : Set private lib path + case "$plibpth" in + '') if ./mips; then +- plibpth=3D"$incpath/usr/lib /usr/local/lib /usr/ccs/lib" ++ plibpth=3D"$incpath/usr/lib /usr/ccs/lib" + fi;; + esac + case "$libpth" in +@@ -19144,7 +19142,7 @@ + case "$ranlib" in + :) ranlib=3D'';; + '') +- ranlib=3D`./loc ranlib X /usr/bin /bin /usr/local/bin` ++ ranlib=3D`./loc ranlib X /usr/bin /bin` + $test -f $ranlib || ranlib=3D'' + ;; + esac diff --git a/dev-lang/perl/metadata.xml b/dev-lang/perl/metadata.xml new file mode 100644 index 0000000..a6186e4 --- /dev/null +++ b/dev-lang/perl/metadata.xml @@ -0,0 +1,12 @@ + + + + perl + + perl@gentoo.org + Primary Maintainer + + + Enable Perl threads, has some compatibility pr= oblems + + diff --git a/dev-lang/perl/perl-5.14.2.ebuild b/dev-lang/perl/perl-5.14.2= .ebuild new file mode 100644 index 0000000..a325acb --- /dev/null +++ b/dev-lang/perl/perl-5.14.2.ebuild @@ -0,0 +1,715 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/perl-5.14.2.ebuild,v 1.= 4 2012/03/03 12:29:38 grobian Exp $ + +EAPI=3D4 + +inherit eutils alternatives flag-o-matic toolchain-funcs multilib + +PATCH_VER=3D1 + +PERL_OLDVERSEN=3D"5.14.0 5.14.1" +MODULE_AUTHOR=3DFLORA + +SHORT_PV=3D"${PV%.*}" +MY_P=3D"perl-${PV/_rc/-RC}" +MY_PV=3D"${PV%_rc*}" + +DESCRIPTION=3D"Larry Wall's Practical Extraction and Report Language" + +SRC_URI=3D" + mirror://cpan/src/${MY_P}.tar.bz2 + mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MO= DULE_AUTHOR}/${MY_P}.tar.bz2 + mirror://gentoo/${MY_P}-${PATCH_VER}.tar.bz2 + http://dev.gentoo.org/~tove/distfiles/${CATEGORY}/${PN}/${MY_P}-${PATCH= _VER}.tar.bz2" +# mirror://cpan/src/${MY_P}.tar.bz2 +# mirror://gentoo/${MY_P}-${PATCH_VER}.tar.bz2 +HOMEPAGE=3D"http://www.perl.org/" + +LICENSE=3D"|| ( Artistic GPL-1 GPL-2 GPL-3 )" +SLOT=3D"0" +KEYWORDS=3D"~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390= ~sh ~sparc ~x86 ~x86-fbsd ~ppc-aix ~x64-freebsd ~x86-freebsd ~hppa-hpux = ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x= 64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solar= is ~x86-solaris" +IUSE=3D"berkdb build debug doc gdbm ithreads" + +COMMON_DEPEND=3D" + berkdb? ( sys-libs/db ) + gdbm? ( >=3Dsys-libs/gdbm-1.8.3 ) + app-arch/bzip2 + sys-libs/zlib +" +DEPEND=3D"${COMMON_DEPEND} + !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) ) +" +RDEPEND=3D"${COMMON_DEPEND} +" +PDEPEND=3D">=3Dapp-admin/perl-cleaner-2.5" + +S=3D"${WORKDIR}/${MY_P}" + +dual_scripts() { + src_remove_dual perl-core/Archive-Tar 1.760.0 ptar pta= rdiff ptargrep + src_remove_dual perl-core/Digest-SHA 5.610.0 shasum + src_remove_dual perl-core/CPAN 1.960.1_rc cpan + src_remove_dual perl-core/CPANPLUS 0.910.300 cpanp cp= an2dist + src_remove_dual_file perl-core/CPANPLUS 0.910.300 /usr/bin= /cpanp-run-perl + src_remove_dual perl-core/Encode 2.420.100_rc enc2xs p= iconv + src_remove_dual perl-core/ExtUtils-MakeMaker 6.570.500_rc instmods= h + src_remove_dual perl-core/ExtUtils-ParseXS 2.221.0 xsubpp + src_remove_dual perl-core/JSON-PP 2.271.50 json_pp + src_remove_dual perl-core/Module-Build 0.380.0 config_d= ata + src_remove_dual perl-core/Module-CoreList 2.490.200_rc corelist + src_remove_dual perl-core/PodParser 1.370.0 pod2usag= e podchecker podselect + src_remove_dual perl-core/Test-Harness 3.230.0 prove + src_remove_dual perl-core/podlators 2.4.0 pod2man = pod2text + src_remove_dual_man perl-core/podlators 2.4.0 /usr/sha= re/man/man1/perlpodstyle.1 +} + +pkg_pretend() { + check_rebuild +} + +pkg_setup() { + case ${CHOST} in + *-freebsd*) osname=3D"freebsd" ;; + *-dragonfly*) osname=3D"dragonfly" ;; + *-netbsd*) osname=3D"netbsd" ;; + *-openbsd*) osname=3D"openbsd" ;; + *-darwin*) osname=3D"darwin" ;; + *-interix*) osname=3D"interix" ;; + *) osname=3D"linux" ;; + esac + + if use ithreads ; then + mythreading=3D"-multi" + myarch=3D"${CHOST%%-*}-${osname}-thread" + else + myarch=3D"${CHOST%%-*}-${osname}" + fi + if use debug ; then + myarch=3D"${myarch}-debug" + fi + + LIBPERL=3D"libperl$(get_libname ${MY_PV} )" + PRIV_LIB=3D"/usr/$(get_libdir)/perl5/${MY_PV}" + ARCH_LIB=3D"/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}" + SITE_LIB=3D"/usr/local/$(get_libdir)/perl5/${MY_PV}" + SITE_ARCH=3D"/usr/local/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythrea= ding}" + VENDOR_LIB=3D"/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}" + VENDOR_ARCH=3D"/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}/${myarch}$= {mythreading}" + + if use ithreads ; then + echo "" + ewarn "THREADS WARNING:" + ewarn "PLEASE NOTE: You are compiling ${MY_P} with" + ewarn "interpreter-level threading enabled." + ewarn "Threading is not supported by all applications " + ewarn "that compile against perl. You use threading at " + ewarn "your own discretion. " + fi + check_rebuild + dual_scripts +} + +check_rebuild() { + if has_version " "${S}/cpan/Compress-Raw-Zlib/config.in" + BUILD_ZLIB =3D False + INCLUDE =3D ${EPREFIX}/usr/include + LIB =3D ${EPREFIX}/usr/$(get_libdir) + + OLD_ZLIB =3D False + GZIP_OS_CODE =3D AUTO_DETECT + EOF + + # allow either gdbm to provide ndbm (in ) or db1 + + myndbm=3D'U' + mygdbm=3D'U' + mydb=3D'U' + + if use gdbm ; then + mygdbm=3D'D' + myndbm=3D'D' + fi + if use berkdb ; then + mydb=3D'D' + has_version '=3Dsys-libs/db-1*' && myndbm=3D'D' + fi + + myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db" + + if use alpha && [[ "$(tc-getCC)" =3D "ccc" ]] ; then + ewarn "Perl will not be built with berkdb support, use gcc if you need= ed it..." + myconf -Ui_db -Ui_ndbm + fi + + use ithreads && myconf -Dusethreads + + if use debug ; then + append-cflags "-g" + myconf -DDEBUGGING + elif [[ ${CFLAGS} =3D=3D *-g* ]] ; then + myconf -DDEBUGGING=3D-g + else + myconf -DDEBUGGING=3Dnone + fi + + if [[ -n ${PERL_OLDVERSEN} ]] ; then + local inclist=3D$(for v in ${PERL_OLDVERSEN}; do echo -n "${v}/${myarc= h}${mythreading} ${v} "; done ) + myconf -Dinc_version_list=3D"${inclist}" + fi + + [[ ${ELIBC} =3D=3D "FreeBSD" ]] && myconf "-Dlibc=3D/usr/$(get_libdir)/= libc.a" + + # Prefix: the host system needs not to follow Gentoo multilib stuff, an= d in + # Prefix itself we don't do multilib either, so make sure perl can find + # something compatible. + if use prefix ; then + local ldir + local llib + local paths=3D"" + echo "int main() {}" > "${T}"/t.c + # need to ensure dirs contain compatible libs, bug #358875 + for ldir in /lib /usr/lib /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32= /usr/lib32 ; do + [[ -d ${ldir} ]] || continue + # find a random lib from here + llib=3D( ${ldir}/*$(get_libname) ) + [[ -e ${llib[0]} ]] || continue + $(tc-getCC) -o "${T}"/t "${T}"/t.c ${llib[0]} >& /dev/null \ + && paths=3D"${paths} ${ldir}" + done + myconf "-Dlibpth=3D${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdi= r) ${paths}" + elif [[ $(get_libdir) !=3D "lib" ]] ; then + # We need to use " and not ', as the written config.sh use ' ... + myconf "-Dlibpth=3D/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_= libdir)" + fi + + # don't try building ODBM, bug #354453 + myconf -Dnoextensions=3DODBM_File + + sh Configure \ + -des \ + -Duseshrplib \ + -Darchname=3D"${myarch}" \ + -Dcc=3D"$(tc-getCC)" \ + -Doptimize=3D"${CFLAGS}" \ + -Dldflags=3D"${LDFLAGS}" \ + -Dprefix=3D"${EPREFIX}"'/usr' \ + -Dinstallprefix=3D"${EPREFIX}"'/usr' \ + -Dsiteprefix=3D"${EPREFIX}"'/usr' \ + -Dvendorprefix=3D"${EPREFIX}"'/usr' \ + -Dscriptdir=3D"${EPREFIX}"'/usr/bin' \ + -Dprivlib=3D"${EPREFIX}${PRIV_LIB}" \ + -Darchlib=3D"${EPREFIX}${ARCH_LIB}" \ + -Dsitelib=3D"${EPREFIX}${SITE_LIB}" \ + -Dsitearch=3D"${EPREFIX}${SITE_ARCH}" \ + -Dvendorlib=3D"${EPREFIX}${VENDOR_LIB}" \ + -Dvendorarch=3D"${EPREFIX}${VENDOR_ARCH}" \ + -Dman1dir=3D"${EPREFIX}"/usr/share/man/man1 \ + -Dman3dir=3D"${EPREFIX}"/usr/share/man/man3 \ + -Dsiteman1dir=3D"${EPREFIX}"/usr/share/man/man1 \ + -Dsiteman3dir=3D"${EPREFIX}"/usr/share/man/man3 \ + -Dvendorman1dir=3D"${EPREFIX}"/usr/share/man/man1 \ + -Dvendorman3dir=3D"${EPREFIX}"/usr/share/man/man3 \ + -Dman1ext=3D'1' \ + -Dman3ext=3D'3pm' \ + -Dlibperl=3D"${LIBPERL}" \ + -Dlocincpth=3D"${EPREFIX}"'/usr/include ' \ + -Dglibpth=3D"${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' '= \ + -Duselargefiles \ + -Dd_semctl_semun \ + -Dcf_by=3D'Gentoo' \ + -Dmyhostname=3D'localhost' \ + -Dperladmin=3D'root@localhost' \ + -Dinstallusrbinperl=3D'n' \ + -Ud_csh \ + -Uusenm \ + "${myconf[@]}" || die "Unable to configure" +} + +src_test() { + if [[ ${EUID} =3D=3D 0 ]] ; then + ewarn "Test fails with a sandbox error (#328793) if run as root. Skipp= ing tests..." + return 0 + fi + use elibc_uclibc && export MAKEOPTS+=3D" -j1" + TEST_JOBS=3D$(echo -j1 ${MAKEOPTS} | sed -r 's/.*(-j[[:space:]]*|--jobs= =3D)([[:digit:]]+).*/\2/' ) \ + make test_harness || die "test failed" +} + +src_install() { + local i + local coredir=3D"${ARCH_LIB}/CORE" + + local installtarget=3Dinstall + if use build ; then + installtarget=3Dinstall.perl + fi + emake DESTDIR=3D"${D}" ${installtarget} + + rm -f "${ED}"/usr/bin/perl + ln -s perl${MY_PV} "${ED}"/usr/bin/perl || die + + if ! tc-is-static-only ; then + dolib.so "${ED}"${coredir}/${LIBPERL} + rm -f "${ED}"${coredir}/${LIBPERL} + ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHO= RT_PV}) || die + ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || d= ie + ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/${LIB= PERL} || die + ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libpe= rl$(get_libname ${SHORT_PV}) || die + ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libpe= rl$(get_libname) || die + fi + + rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man p= ages" + +# # A poor fix for the miniperl issues +# dosed 's:./miniperl:/usr/bin/perl:' /usr/$(get_libdir)/perl5/${MY_PV}/= ExtUtils/xsubpp +# fperms 0444 /usr/$(get_libdir)/perl5/${MY_PV}/ExtUtils/xsubpp +# dosed 's:./miniperl:/usr/bin/perl:' /usr/bin/xsubpp +# fperms 0755 /usr/bin/xsubpp + + # This removes ${D} from Config.pm + for i in $(find "${D}" -iname "Config.pm" ) ; do + einfo "Removing ${D} from ${i}..." + sed -i -e "s:${D}::" "${i}" || die "Sed failed" + done + + find "${ED}" -type f -name .packlist -delete || die + + # Note: find out from psm why we would need/want this. + # ( use berkdb && has_version '=3Dsys-libs/db-1*' ) || + # find "${ED}" -name "*NDBM*" | xargs rm -f + + dodoc Changes* README AUTHORS + + if use doc ; then + # HTML Documentation + # We expect errors, warnings, and such with the following. + + dodir /usr/share/doc/${PF}/html + LD_LIBRARY_PATH=3D. ./perl installhtml \ + --podroot=3D'.' \ + --podpath=3D'lib:ext:pod:vms' \ + --recurse \ + --htmldir=3D"${ED}/usr/share/doc/${PF}/html" \ + --libpods=3D'perlfunc:perlguts:perlvar:perlrun:perlop' + fi + + if use build ; then + src_remove_extra_files + fi + + dual_scripts +} + +pkg_postinst() { + dual_scripts + + if [[ "${ROOT}" =3D "/" ]] ; then + local INC DIR file + INC=3D$(perl -e 'for $line (@INC) { next if $line eq "."; next if $lin= e =3D~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }') + einfo "Removing old .ph files" + for DIR in ${INC} ; do + if [[ -d "${DIR}" ]] ; then + for file in $(find "${DIR}" -name "*.ph" -type f ) ; do + rm -f "${file}" + einfo "<< ${file}" + done + fi + done + # Silently remove the now empty dirs + for DIR in ${INC} ; do + if [[ -d "${DIR}" ]] ; then + find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/nul= l + fi + done +# if ! use build ; then +# ebegin "Generating ConfigLocal.pm (ignore any error)" +# enc2xs -C +# fi + + einfo "Converting C header files to the corresponding Perl format (ign= ore any error)" + # Prefix note: unprefixed as this is all kernel/libc stuff that we nev= er provide + pushd /usr/include >/dev/null + h2ph -Q -a -d "${EPREFIX}"${ARCH_LIB} \ + asm/termios.h syscall.h syslimits.h syslog.h sys/ioctl.h \ + sys/socket.h sys/time.h wait.h sysexits.h + popd >/dev/null + +# This has been moved into a function because rumor has it that a future= release +# of portage will allow us to check what version was just removed - whic= h means +# we will be able to invoke this only as needed :) + # Tried doing this via -z, but $INC is too big... + #if [[ "${INC}x" !=3D "x" ]]; then + # cleaner_msg + #fi + fi +} + +pkg_postrm(){ + dual_scripts + +# if [[ -e ${ARCH_LIB}/Encode/ConfigLocal.pm ]] ; then +# ebegin "Removing ConfigLocal.pm" +# rm "${ARCH_LIB}/Encode/ConfigLocal.pm" +# fi +} + +cleaner_msg() { + eerror "You have had multiple versions of perl. It is recommended" + eerror "that you run perl-cleaner now. perl-cleaner will" + eerror "assist with this transition. This script is capable" + eerror "of cleaning out old .ph files, rebuilding modules for " + eerror "your new version of perl, as well as re-emerging" + eerror "applications that compiled against your old libperl$(get_libnam= e)" + eerror + eerror "PLEASE DO NOT INTERRUPT THE RUNNING OF THIS SCRIPT." + eerror "Part of the rebuilding of applications compiled against " + eerror "your old libperl involves temporarily unmerging" + eerror "them - interruptions could leave you with unmerged" + eerror "packages before they can be remerged." + eerror "" + eerror "If you have run perl-cleaner and a package still gives" + eerror "you trouble, and re-emerging it fails to correct" + eerror "the problem, please check http://bugs.gentoo.org/" + eerror "for more information or to report a bug." + eerror "" +} + +src_remove_dual_file() { + local i pkg ver + pkg=3D"$1" + ver=3D"$2" + shift 2 + case "${EBUILD_PHASE:-none}" in + postinst|postrm) + for i in "$@" ; do + alternatives_auto_makesym "${i}" "${i}-[0-9]*" + done + ;; + setup) + for i in "$@" ; do + if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then + has_version ${pkg} && ewarn "You must reinstall ${pkg} !" + break + fi + done + ;; + install) + for i in "$@" ; do + if ! [[ -f "${ED}"${i} ]] ; then + use build || ewarn "${i} does not exist!" + continue + fi + mv "${ED}"${i}{,-${ver}-${P}} || die + done + ;; + esac +} + +src_remove_dual_man() { + local i pkg ver ff + pkg=3D"$1" + ver=3D"$2" + shift 2 + case "${EBUILD_PHASE:-none}" in + postinst|postrm) + for i in "$@" ; do + ff=3D`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*` + ff=3D${ff##*${i#${i%.[0-9]}}} + alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*" + done + ;; + install) + for i in "$@" ; do + if ! [[ -f "${ED}"${i} ]] ; then + use build || ewarn "${i} does not exist!" + continue + fi + mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die + done + ;; + esac +} + +src_remove_dual() { + local i pkg ver + pkg=3D"$1" + ver=3D"$2" + shift 2 + for i in "$@" ; do + src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}" + src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1" + done +} + +src_remove_extra_files() { + local prefix=3D"./usr" # ./ is important + local bindir=3D"${prefix}/bin" + local libdir=3D"${prefix}/$(get_libdir)" + + # I made this list from the Mandr*, Debian and ex-Connectiva perl-base = list + # Then, I added several files to get GNU autotools running + # FIXME: should this be in a separated file to be sourced? + local MINIMAL_PERL_INSTALL=3D" + ${bindir}/h2ph + ${bindir}/perl + ${bindir}/perl${MY_PV} + ${bindir}/pod2man + ${libdir}/${LIBPERL} + ${libdir}/libperl$(get_libname) + ${libdir}/libperl$(get_libname ${SHORT_PV}) + .${PRIV_LIB}/AutoLoader.pm + .${PRIV_LIB}/B/Deparse.pm + .${PRIV_LIB}/Carp.pm + .${PRIV_LIB}/Carp/Heavy.pm + .${PRIV_LIB}/Class/Struct.pm + .${PRIV_LIB}/DirHandle.pm + .${PRIV_LIB}/Exporter.pm + .${PRIV_LIB}/Exporter/Heavy.pm + .${PRIV_LIB}/ExtUtils/Command.pm + .${PRIV_LIB}/ExtUtils/Command/MM.pm + .${PRIV_LIB}/ExtUtils/Constant.pm + .${PRIV_LIB}/ExtUtils/Constant/Base.pm + .${PRIV_LIB}/ExtUtils/Constant/Utils.pm + .${PRIV_LIB}/ExtUtils/Constant/XS.pm + .${PRIV_LIB}/ExtUtils/Embed.pm + .${PRIV_LIB}/ExtUtils/Install.pm + .${PRIV_LIB}/ExtUtils/Installed.pm + .${PRIV_LIB}/ExtUtils/Liblist.pm + .${PRIV_LIB}/ExtUtils/Liblist/Kid.pm + .${PRIV_LIB}/ExtUtils/MM.pm + .${PRIV_LIB}/ExtUtils/MM_Any.pm + .${PRIV_LIB}/ExtUtils/MM_MacOS.pm + .${PRIV_LIB}/ExtUtils/MM_Unix.pm + .${PRIV_LIB}/ExtUtils/MY.pm + .${PRIV_LIB}/ExtUtils/MakeMaker.pm + .${PRIV_LIB}/ExtUtils/MakeMaker/Config.pm + .${PRIV_LIB}/ExtUtils/Manifest.pm + .${PRIV_LIB}/ExtUtils/Miniperl.pm + .${PRIV_LIB}/ExtUtils/Mkbootstrap.pm + .${PRIV_LIB}/ExtUtils/Mksymlists.pm + .${PRIV_LIB}/ExtUtils/Packlist.pm + .${PRIV_LIB}/ExtUtils/testlib.pm + .${PRIV_LIB}/File/Basename.pm + .${PRIV_LIB}/File/Compare.pm + .${PRIV_LIB}/File/Copy.pm + .${PRIV_LIB}/File/Find.pm + .${PRIV_LIB}/File/Path.pm + .${PRIV_LIB}/File/stat.pm + .${PRIV_LIB}/FileHandle.pm + .${PRIV_LIB}/Getopt/Long.pm + .${PRIV_LIB}/Getopt/Std.pm + .${PRIV_LIB}/IPC/Open2.pm + .${PRIV_LIB}/IPC/Open3.pm + .${PRIV_LIB}/PerlIO.pm + .${PRIV_LIB}/Pod/InputObjects.pm + .${PRIV_LIB}/Pod/Man.pm + .${PRIV_LIB}/Pod/ParseLink.pm + .${PRIV_LIB}/Pod/Parser.pm + .${PRIV_LIB}/Pod/Select.pm + .${PRIV_LIB}/Pod/Text.pm + .${PRIV_LIB}/Pod/Usage.pm + .${PRIV_LIB}/SelectSaver.pm + .${PRIV_LIB}/Symbol.pm + .${PRIV_LIB}/Text/ParseWords.pm + .${PRIV_LIB}/Text/Tabs.pm + .${PRIV_LIB}/Text/Wrap.pm + .${PRIV_LIB}/Tie/Hash.pm + .${PRIV_LIB}/Time/Local.pm + .${PRIV_LIB}/XSLoader.pm + .${PRIV_LIB}/autouse.pm + .${PRIV_LIB}/base.pm + .${PRIV_LIB}/bigint.pm + .${PRIV_LIB}/bignum.pm + .${PRIV_LIB}/bigrat.pm + .${PRIV_LIB}/blib.pm + .${PRIV_LIB}/bytes.pm + .${PRIV_LIB}/bytes_heavy.pl + .${PRIV_LIB}/charnames.pm + .${PRIV_LIB}/constant.pm + .${PRIV_LIB}/diagnostics.pm + .${PRIV_LIB}/fields.pm + .${PRIV_LIB}/filetest.pm + .${PRIV_LIB}/if.pm + .${PRIV_LIB}/integer.pm + .${PRIV_LIB}/less.pm + .${PRIV_LIB}/locale.pm + .${PRIV_LIB}/open.pm + .${PRIV_LIB}/overload.pm + .${PRIV_LIB}/sigtrap.pm + .${PRIV_LIB}/sort.pm + .${PRIV_LIB}/stat.pl + .${PRIV_LIB}/strict.pm + .${PRIV_LIB}/subs.pm + .${PRIV_LIB}/unicore/To/Fold.pl + .${PRIV_LIB}/unicore/To/Lower.pl + .${PRIV_LIB}/unicore/To/Upper.pl + .${PRIV_LIB}/utf8.pm + .${PRIV_LIB}/utf8_heavy.pl + .${PRIV_LIB}/vars.pm + .${PRIV_LIB}/vmsish.pm + .${PRIV_LIB}/warnings + .${PRIV_LIB}/warnings.pm + .${PRIV_LIB}/warnings/register.pm + .${ARCH_LIB}/B.pm + .${ARCH_LIB}/CORE/libperl$(get_libname) + .${ARCH_LIB}/Config.pm + .${ARCH_LIB}/Config_heavy.pl + .${ARCH_LIB}/Cwd.pm + .${ARCH_LIB}/Data/Dumper.pm + .${ARCH_LIB}/DynaLoader.pm + .${ARCH_LIB}/Errno.pm + .${ARCH_LIB}/Fcntl.pm + .${ARCH_LIB}/File/Glob.pm + .${ARCH_LIB}/File/Spec.pm + .${ARCH_LIB}/File/Spec/Unix.pm + .${ARCH_LIB}/IO.pm + .${ARCH_LIB}/IO/File.pm + .${ARCH_LIB}/IO/Handle.pm + .${ARCH_LIB}/IO/Pipe.pm + .${ARCH_LIB}/IO/Seekable.pm + .${ARCH_LIB}/IO/Select.pm + .${ARCH_LIB}/IO/Socket.pm + .${ARCH_LIB}/IO/Socket/INET.pm + .${ARCH_LIB}/IO/Socket/UNIX.pm + .${ARCH_LIB}/List/Util.pm + .${ARCH_LIB}/NDBM_File.pm + .${ARCH_LIB}/POSIX.pm + .${ARCH_LIB}/Scalar/Util.pm + .${ARCH_LIB}/Socket.pm + .${ARCH_LIB}/Storable.pm + .${ARCH_LIB}/attributes.pm + .${ARCH_LIB}/auto/Cwd/Cwd$(get_libname) + .${ARCH_LIB}/auto/Data/Dumper/Dumper$(get_libname) + .${ARCH_LIB}/auto/DynaLoader/dl_findfile.al + .${ARCH_LIB}/auto/Fcntl/Fcntl$(get_libname) + .${ARCH_LIB}/auto/File/Glob/Glob$(get_libname) + .${ARCH_LIB}/auto/IO/IO$(get_libname) + .${ARCH_LIB}/auto/POSIX/POSIX$(get_libname) + .${ARCH_LIB}/auto/POSIX/autosplit.ix + .${ARCH_LIB}/auto/POSIX/fstat.al + .${ARCH_LIB}/auto/POSIX/load_imports.al + .${ARCH_LIB}/auto/POSIX/stat.al + .${ARCH_LIB}/auto/POSIX/tmpfile.al + .${ARCH_LIB}/auto/Socket/Socket$(get_libname) + .${ARCH_LIB}/auto/Storable/Storable$(get_libname) + .${ARCH_LIB}/auto/Storable/_retrieve.al + .${ARCH_LIB}/auto/Storable/_store.al + .${ARCH_LIB}/auto/Storable/autosplit.ix + .${ARCH_LIB}/auto/Storable/retrieve.al + .${ARCH_LIB}/auto/Storable/store.al + .${ARCH_LIB}/auto/re/re$(get_libname) + .${ARCH_LIB}/encoding.pm + .${ARCH_LIB}/lib.pm + .${ARCH_LIB}/ops.pm + .${ARCH_LIB}/re.pm + .${ARCH_LIB}/threads.pm +" + + pushd "${ED}" > /dev/null + # Remove cruft + einfo "Removing files that are not in the minimal install" + echo "${MINIMAL_PERL_INSTALL}" + for f in $(find . -type f ) ; do + has "${f}" ${MINIMAL_PERL_INSTALL} || rm -f "${f}" + done + # Remove empty directories + find . -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null + #for f in ${MINIMAL_PERL_INSTALL} ; do + # [[ -e ${f} ]] || ewarn "${f} unused in MINIMAL_PERL_INSTALL" + #done + popd > /dev/null +}