public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Torsten Veller" <tove@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/perl-overlay:master commit in: dev-lang/perl/files/, dev-lang/perl/
Date: Sun,  1 Apr 2012 13:31:44 +0000 (UTC)	[thread overview]
Message-ID: <1333286731.7ac9a460307a4efe370689379f79a54f2edd28fa.tove@gentoo> (raw)

commit:     7ac9a460307a4efe370689379f79a54f2edd28fa
Author:     Torsten Veller <tove <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  1 13:24:49 2012 +0000
Commit:     Torsten Veller <tove <AT> gentoo <DOT> org>
CommitDate: Sun Apr  1 13:25:31 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=7ac9a460

[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/files/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 <stdio.h>\nint main(){long l;printf("%d\\n",sizeof(l));}'>try.c
+ 	$cc -o try $ccflags $ldflags try.c
+-	if [ "`try`" = "8" ]; then
++	if [ "`./try`" = "8" ]; then
+ 	    case "$use64bitall" in
+ 		$define|true|[Yy]) ;;
+ 		*)  cat <<EOM >&4
+@@ -338,7 +338,7 @@
+     } /* main */
+ EOF
+ $cc -o try $ccflags $ldflags try.c
+-	maxdsiz=`try`
++	maxdsiz=`./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="-g -O" ;;
+ 	    *O[3456789]*) optimize=`echo "$optimize" | sed -e 's/O[3-9]/O2/'` ;;
+ 	    esac
+-	#ld="$cc"
+-	ld=/usr/bin/ld
++	ld="$cc"
++	#ld=/usr/bin/ld
+ 	cccdlflags='-fPIC'
+-	#lddlflags='-shared'
+-	lddlflags='-b'
++	lddlflags='-shared'
++	#lddlflags='-b'
++	libs='-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="-shared -Wl,-H512 -Wl,-T512 -Wl,-bhalt:4 -Wl,-bM:SRE -Wl,-bE:perl.exp"
++		*gcc*)
++			shrpldflags="-shared -Wl,-H512 -Wl,-T512 -Wl,-bhalt:4 -Wl,-bE:perl.exp"
+ 			case "$osvers" in
+-			3*)	shrpldflags="$shrpldflags -e _nostart"
++			3*)	shrpldflags="$shrpldflags -Wl,-bM:SRE -e _nostart"
+ 				;;
+-			*)	shrpldflags="$shrpldflags -Wl,-bnoentry"
++			*)	shrpldflags="$shrpldflags -Wl,-G -Wl,-bernotok -Wl,-bnoentry"
+ 				;;
+ 			esac
+ 			shrpldflags="$shrpldflags $ldflags $perllibs $cryptlib"
+@@ -105,11 +105,11 @@
+ 			linklibperl_nonshr='-lperl_nonshr'
+ 			;;
+ 		*)
+-			shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp"
++			shrpldflags="-H512 -T512 -bhalt:4 -bE:perl.exp"
+ 			case "$osvers" in
+-			3*)	shrpldflags="$shrpldflags -e _nostart"
++			3*)	shrpldflags="$shrpldflags -bM:SRE -e _nostart"
+ 				;;
+-			*)	shrpldflags="$shrpldflags -b noentry"
++			*)	shrpldflags="$shrpldflags -G -bernotok -b noentry"
+ 				;;
+ 			esac
+ 			shrpldflags="$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=32
++			if test X"$use64bitall" = Xdefine; then bits=64; fi
++			$spitshell >>$Makefile <<!GROK!THIS!
++	rm -f shr.imp shr.o
++	mv \$@ shr.o
++	strip -e shr.o
++	( echo '#! libperl.so.${revision}.${patchlevel}(shr.o)' \\
++	; echo '# ${bits}' \\
++	; grep -v '^#!' perl.exp \\
++	) > 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/perl/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='gcc'
+ cccdlflags="-DPIC $cccdlflags"
+ ccdlflags='-Wl,-E'
+-ccflags="-D_ALL_SOURCE $ccflags"
+-d_poll="$undef"
+ ld='gcc'
+ lddlflags="-shared $lddlflags"
+ rpathflag='-Wl,-R'
+ sharpbang='#!'
+ usemymalloc='false'
+ usenm='false'
++firstmakefile=GNUmakefile
+ 
+ # This script UU/usethreads.cbu will get 'called-back' by Configure 
+ # after it has prompted the user for whether to use threads. 

diff --git a/dev-lang/perl/files/perl-5.12.3-mint.patch b/dev-lang/perl/files/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=89502
+
+--- 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 @@ 
+ elif test -n "$DJGPP"; then
+ : DOS DJGPP
+     _exe=".exe"
++elif test -f "/kern/cookiejar"; then
++: MiNT
++    _exe=""
+ elif test -d c:/. -o -n "$is_os2" ; then
+ : OS/2 or cygwin
+     _exe=".exe"
+@@ -1402,7 +1405,7 @@ 
+ 	xcat=/bin/cat
+ 	test -f $xcat$_exe || xcat=/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=$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 @@ 
+ 	goto haverror;
+     }
+ 
++    DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dld_link(libm.a)\n"));
++    if (dlderr = 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 = dld_link("/usr/lib/libc.a")) {
++	SaveError(aTHX_ "dld_link(libc.a): %s", dld_strerror(dlderr));
++	goto haverror;
++    }
++
+     max = AvFILL(dl_resolve_using);
+     for (x = 0; x <= max; x++) {
+ 	char *sym = 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 @@ 
+ #define MIN_BUC_POW2 (sizeof(void*) > 4 ? 3 : 2) /* Allow for 4-byte arena. */
+ #define MIN_BUCKET (MIN_BUC_POW2 * BUCKETS_PER_POW2)
+ 
+-#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 @@ 
+  */
+ #define u_short unsigned short
+ 
+-/* 286 and atarist like big chunks, which gives too much overhead. */
+-#if (defined(RCHECK) || defined(I286) || defined(atarist)) && defined(PACK_MALLOC)
++/* 286 like big chunks, which gives too much overhead. */
++#if (defined(RCHECK) || defined(I286)) && defined(PACK_MALLOC)
+ #  undef PACK_MALLOC
+ #endif 
+ 
+@@ -1734,16 +1734,14 @@ 
+ 	/* Second, check alignment. */
+ 	slack = 0;
+ 
+-#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 segment */
+ 	/* 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 = WANTED_ALIGNMENT - (PTR2UV(cp) & (WANTED_ALIGNMENT - 1));
+ 	    add += slack;
+ 	}
+-#  endif
+-#endif /* !atarist */
++#endif
+ 		
+ 	if (add) {
+ 	    DEBUG_m(PerlIO_printf(Perl_debug_log, 
+--- 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 @@ 
+ #if defined (atarist)
+ /* The Atari operating system doesn't have a dynamic stack.  The
+    stack size is determined from this value.  */
+-long _stksize = 64 * 1024;
++long _stksize = 256 * 1024;
+ #endif
+ 
+ #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 @@ 
+ #if defined (atarist)
+ /* The Atari operating system doesn't have a dynamic stack.  The
+    stack size is determined from this value.  */
+-long _stksize = 64 * 1024;
++long _stksize = 256 * 1024;
+ #endif
+ 
+ /* 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 @@ 
+ 		      "\n\nOS/2 port Copyright (c) 1990, 1991, Raymond Chen, Kai Uwe Rommel\n"
+ 		      "Version 5 port Copyright (c) 1994-2002, Andreas Kaiser, Ilya Zakharevich\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 @@ 
+  */
+ 
+ /* define this once if either system, instead of cluttering up the src */
+-#if defined(MSDOS) || defined(atarist) || defined(WIN32) || defined(NETWARE)
++#if defined(MSDOS) || defined(WIN32) || defined(NETWARE)
+ #define DOSISH 1
+ #endif
+ 
+--- 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 @@ 
+      * 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 |= _IOBIN;
+-        else
+-            ((FILE *) fp)->_flag &= ~_IOBIN;
+-        return 1;
+-    }
+-    return 0;
+-#  else
+     dTHX;
+     PERL_UNUSED_ARG(iotype);
+ #ifdef NETWARE
+@@ -153,7 +142,7 @@ 
+ #else
+     if (PerlLIO_setmode(fileno(fp), mode) != -1) {
+ #endif
+-#    if defined(WIN32) && defined(__BORLANDC__)
++#  if defined(WIN32) && defined(__BORLANDC__)
+         /*
+          * The translation mode of the stream is maintained independent 
+ of
+@@ -169,12 +158,11 @@ 
+             fp->flags |= _F_BIN;
+         else
+             fp->flags &= ~_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 @@ 
+     RETPUSHNO;
+ }
+ 
+-#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 @@ 
+     case 8:
+ 	retval = syscall(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);
+ 	break;
+-#ifdef atarist
+-    case 9:
+-	retval = syscall(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);
+-	break;
+-    case 10:
+-	retval = 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 = 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 = 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 = 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 = 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 = 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 @@ 
+     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 @@ 
+ }
+ #endif
+ 
+-#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 @@ 
+     I32 len = 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 @@ 
+ 
+ 	bufend = s + strlen(s);
+ 	while (s < bufend) {
+-#if defined(atarist) || defined(DOSISH)
++#if defined(DOSISH)
+ 	    for (len = 0; *s
+-#  ifdef atarist
+-		    && *s != ','
+-#  endif
+ 		    && *s != ';'; len++, s++) {
+ 		if (len < sizeof tmpbuf)
+ 		    tmpbuf[len] = *s;
+ 	    }
+ 	    if (len < sizeof tmpbuf)
+ 		tmpbuf[len] = '\0';
+-#else  /* ! (atarist || DOSISH) */
++#else  /* ! (DOSISH) */
+ 	    s = 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 >= sizeof tmpbuf)
+ 		continue;	/* don't search dir with too-long name */
+ 	    if (len
+-#  if defined(atarist) || defined(DOSISH)
++#  if defined(DOSISH)
+ 		&& tmpbuf[len - 1] != '/'
+ 		&& tmpbuf[len - 1] != '\\'
+ #  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 @@ 
++# hints/freemint.sh
++#
++# talk to guido@freemint.de if you want to change this file.
++# Please read the README.mint file.
++#
++# misc stuff
++
++archname="m68k-freemint"
++
++cccdlflags=' '; # avoid -fPIC
++ccdlflags="-Wl,-whole-archive -lgcc -lpthread -Wl,-no-whole-archive"
++
++# libs
++libpth="$prefix/lib /usr/local/lib /usr/lib"
++glibpth="$libpth"
++xlibpth="$libpth"
++
++ccflags="$ccflags -D_GNU_SOURCE"
++libswanted='m dld'
++dl_src='dl_dld.xs'
++dlext='o'
++lddlflags='-r'
++ldflags='-static'
++so='none'
++useshrplib='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='ccflags="-DUSE_PERL_SBRK -DPERL_SBRK_VIA_MALLOC $ccflags"'
++
++# Locales aren't feeling well. We crash if -Ox used.
++locale_cflags='optimize="-O0"'
++LC_ALL=C; export LC_ALL;
++LANG=C; export LANG;

diff --git a/dev-lang/perl/files/perl-5.14.1-cleanup-paths.patch b/dev-lang/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 use
+
+--- Configure
++++ Configure
+@@ -105,28 +105,6 @@
+ 	fi
+ fi
+ 
+-: Proper PATH setting
+-paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
+-paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
+-paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
+-paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
+-paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
+-paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr/ccs/bin"
+-paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
+-paths="$paths /sbin /usr/sbin /usr/libexec"
+-paths="$paths /system/gnu_library/bin"
+-
+-for p in $paths
+-do
+-	case "$p_$PATH$p_" in
+-	*$p_$p$p_*) ;;
+-	*) test -d $p && PATH=$PATH$p_$p ;;
+-	esac
+-done
+-
+-PATH=.$p_$PATH
+-export PATH
+-
+ : shall we be using ksh?
+ inksh=''
+ needksh=''
+@@ -8287,66 +8265,6 @@
+ 	;;
+ esac
+ 
+-# 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=$archlibexp/CORE
+-xxx=''
+-tmp_shrpenv=''
+-if "$useshrplib"; then
+-    case "$osname" in
+-	aix)
+-		# We'll set it in Makefile.SH...
+-		;;
+-	solaris)
+-		xxx="-R $shrpdir"
+-		;;
+-	freebsd|mirbsd|netbsd|openbsd|interix|dragonfly)
+-		xxx="-Wl,-R$shrpdir"
+-		;;
+-	bsdos|linux|irix*|dec_osf|gnu*)
+-		xxx="-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="env LDOPTS=\"+s +b${shrpdir}\""
+-		;;
+-	cygwin)
+-		# cygwin needs only ldlibpth
+-		;;
+-	*)
+-		tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
+-		;;
+-	esac
+-	case "$xxx" in
+-	'') ;;
+-	*)
+-		# Only add $xxx if it isn't already in ccdlflags.
+-		case " $ccdlflags " in
+-		*" $xxx "*)	;;
+-		*)	ccdlflags="$ccdlflags $xxx"
+-			cat <<EOM >&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=297751
+
+--- hints/darwin.sh
++++ hints/darwin.sh
+@@ -128,13 +128,13 @@
+ ccflags="${ccflags} ${cppflags}"
+ 
+ # Known optimizer problems.
+-case "`cc -v 2>&1`" in
++case "`${cc:-gcc} -v 2>&1`" in
+   *"3.1 20020105"*) toke_cflags='optimize=""' ;;
+ esac
+ 
+ # Shared library extension is .dylib.
+ # Bundle extension is .bundle.
+-ld='cc';
++ld="${cc:-gcc}";
+ so='dylib';
+ dlext='bundle';
+ usedl='define';

diff --git a/dev-lang/perl/files/perl-5.8.8-solaris-relocation.patch b/dev-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 @@
+ 
+ END
+ 		ccdlflags="$ccdlflags -Wl,-E"
+-		lddlflags="$lddlflags -Wl,-E -G"
++		lddlflags="$lddlflags -shared"
+ 	    fi
+ 	fi
+ 
+@@ -555,7 +555,7 @@
+ 		    : #ccflags="$ccflags -Wa,`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"
+ 		fi
+ 		ldflags="$ldflags -m64"
+-		lddlflags="$lddlflags -G -m64"
++		lddlflags="$lddlflags -m64"
+ 		;;
+ 	    *)
+ 		ccflags="$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/perl/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 @@
+  */
+ 
+ #if defined(I_SYSMODE) && !defined(PERL_MICRO)
++#include <sys/stat.h>
++#include <sys/vnode.h>
+ #include <sys/mode.h>
+ #endif
+ 

diff --git a/dev-lang/perl/files/perl-5.8.8-usr-local.patch b/dev-lang/perl/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="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
++		plibpth="$incpath/usr/lib /usr/ccs/lib"
+ 	fi;;
+ esac
+ case "$libpth" in
+@@ -19144,7 +19142,7 @@
+ 	case "$ranlib" in
+ 	:) ranlib='';;
+ 	'')
+-		ranlib=`./loc ranlib X /usr/bin /bin /usr/local/bin`
++		ranlib=`./loc ranlib X /usr/bin /bin`
+ 		$test -f $ranlib || ranlib=''
+ 		;;
+ 	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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<herd>perl</herd>
+	<maintainer>
+		<email>perl@gentoo.org</email>
+		<description>Primary Maintainer</description>
+	</maintainer>
+	<use>
+		<flag name='ithreads'>Enable Perl threads, has some compatibility problems</flag>
+	</use>
+</pkgmetadata>

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=4
+
+inherit eutils alternatives flag-o-matic toolchain-funcs multilib
+
+PATCH_VER=1
+
+PERL_OLDVERSEN="5.14.0 5.14.1"
+MODULE_AUTHOR=FLORA
+
+SHORT_PV="${PV%.*}"
+MY_P="perl-${PV/_rc/-RC}"
+MY_PV="${PV%_rc*}"
+
+DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
+
+SRC_URI="
+	mirror://cpan/src/${MY_P}.tar.bz2
+	mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_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="http://www.perl.org/"
+
+LICENSE="|| ( Artistic GPL-1 GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="~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 ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="berkdb build debug doc gdbm ithreads"
+
+COMMON_DEPEND="
+	berkdb? ( sys-libs/db )
+	gdbm? ( >=sys-libs/gdbm-1.8.3 )
+	app-arch/bzip2
+	sys-libs/zlib
+"
+DEPEND="${COMMON_DEPEND}
+	!prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
+"
+RDEPEND="${COMMON_DEPEND}
+"
+PDEPEND=">=app-admin/perl-cleaner-2.5"
+
+S="${WORKDIR}/${MY_P}"
+
+dual_scripts() {
+	src_remove_dual      perl-core/Archive-Tar        1.760.0      ptar ptardiff 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 cpan2dist
+	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 piconv
+	src_remove_dual      perl-core/ExtUtils-MakeMaker 6.570.500_rc instmodsh
+	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_data
+	src_remove_dual      perl-core/Module-CoreList    2.490.200_rc corelist
+	src_remove_dual      perl-core/PodParser          1.370.0      pod2usage 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/share/man/man1/perlpodstyle.1
+}
+
+pkg_pretend() {
+	check_rebuild
+}
+
+pkg_setup() {
+	case ${CHOST} in
+		*-freebsd*)   osname="freebsd" ;;
+		*-dragonfly*) osname="dragonfly" ;;
+		*-netbsd*)    osname="netbsd" ;;
+		*-openbsd*)   osname="openbsd" ;;
+		*-darwin*)    osname="darwin" ;;
+		*-interix*)   osname="interix" ;;
+		*)            osname="linux" ;;
+	esac
+
+	if use ithreads ; then
+		mythreading="-multi"
+		myarch="${CHOST%%-*}-${osname}-thread"
+	else
+		myarch="${CHOST%%-*}-${osname}"
+	fi
+	if use debug ; then
+		myarch="${myarch}-debug"
+	fi
+
+	LIBPERL="libperl$(get_libname ${MY_PV} )"
+	PRIV_LIB="/usr/$(get_libdir)/perl5/${MY_PV}"
+	ARCH_LIB="/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}"
+	SITE_LIB="/usr/local/$(get_libdir)/perl5/${MY_PV}"
+	SITE_ARCH="/usr/local/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}"
+	VENDOR_LIB="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}"
+	VENDOR_ARCH="/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 "<dev-lang/perl-${SHORT_PV}" ; then
+		echo ""
+		ewarn "UPDATE THE PERL MODULES:"
+		ewarn "After updating dev-lang/perl you must reinstall"
+		ewarn "the installed perl modules."
+		ewarn "Use: perl-cleaner --all"
+	elif has_version dev-lang/perl ; then
+		# doesnot work
+		#if ! has_version dev-lang/perl[ithreads=,debug=] ; then
+		#if ! has_version dev-lang/perl[ithreads=] || ! has_version dev-lang/perl[debug=] ; then
+		if (   use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
+		   ( ! use ithreads &&   has_version dev-lang/perl[ithreads] ) || \
+		   (   use debug    && ! has_version dev-lang/perl[debug]    ) || \
+		   ( ! use debug    &&   has_version dev-lang/perl[debug]    ) ; then
+			echo ""
+			ewarn "TOGGLED USE-FLAGS WARNING:"
+			ewarn "You changed one of the use-flags ithreads or debug."
+			ewarn "You must rebuild all perl-modules installed."
+			ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
+		fi
+	fi
+}
+
+src_prepare_update_patchlevel_h() {
+	[[ -f ${WORKDIR}/perl-patch/series ]] || return 0
+
+	while read patch level ; do
+		sed -i -e "s/^\t,NULL$/	,\"${patch//__/_}\"\n&/" "${S}"/patchlevel.h || die
+	done < "${WORKDIR}"/perl-patch/series
+}
+
+src_prepare() {
+	EPATCH_SOURCE="${WORKDIR}/perl-patch" \
+	EPATCH_SUFFIX="diff" \
+	EPATCH_FORCE="yes" \
+	EPATCH_OPTS="-p1" \
+	epatch
+
+	src_prepare_update_patchlevel_h
+
+	# pod/perltoc.pod fails
+	# lib/ExtUtils/t/Embed.t fails
+	if ! tc-is-static-only ; then
+		ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
+		ln -s ${LIBPERL} libperl$(get_libname ) || die
+	fi
+
+	epatch "${FILESDIR}"/${PN}-5.12.3-aix-soname.patch
+	epatch "${FILESDIR}"/${PN}-5.8.8-solaris-relocation.patch
+	epatch "${FILESDIR}"/${PN}-5.8.8-solaris11.patch
+	epatch "${FILESDIR}"/${PN}-5.14.1-cleanup-paths.patch
+	epatch "${FILESDIR}"/${PN}-5.8.8-usr-local.patch
+	epatch "${FILESDIR}"/${PN}-5.10.1-hpux.patch
+	epatch "${FILESDIR}"/${PN}-5.8.8-darwin-cc-ld.patch
+	epatch "${FILESDIR}"/${PN}-5.12.3-mint.patch
+	epatch "${FILESDIR}"/${PN}-5.12.3-interix.patch
+
+	# rest of usr-local patch
+	sed -i \
+		-e '/^locincpth=/c\locincpth=""' \
+		-e '/^loclibpth=/c\loclibpth=""' \
+		-e '/^glibpth=.*\/local\//s: /usr/local/lib.*":":' \
+		Configure || die
+}
+
+myconf() {
+	# the myconf array is declared in src_configure
+	myconf=( "${myconf[@]}" "$@" )
+}
+
+src_configure() {
+	declare -a myconf
+
+	export LC_ALL="C"
+	[[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
+
+	# some arches and -O do not mix :)
+	use ppc && replace-flags -O? -O1
+	# Perl has problems compiling with -Os in your flags with glibc
+	use elibc_uclibc || replace-flags "-Os" "-O2"
+	# This flag makes compiling crash in interesting ways
+	filter-flags "-malign-double"
+	# Fixes bug #97645
+	use ppc && filter-flags "-mpowerpc-gpopt"
+	# Fixes bug #143895 on gcc-4.1.1
+	filter-flags "-fsched2-use-superblocks"
+
+	use sparc && myconf -Ud_longdbl
+
+	# 266337
+	export BUILD_BZIP2=0
+	export BZIP2_INCLUDE=${EPREFIX}/usr/include
+	export BZIP2_LIB=${EPREFIX}/usr/$(get_libdir)
+	cat <<-EOF > "${S}/cpan/Compress-Raw-Zlib/config.in"
+		BUILD_ZLIB = False
+		INCLUDE = ${EPREFIX}/usr/include
+		LIB = ${EPREFIX}/usr/$(get_libdir)
+
+		OLD_ZLIB = False
+		GZIP_OS_CODE = AUTO_DETECT
+	EOF
+
+	# allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
+
+	myndbm='U'
+	mygdbm='U'
+	mydb='U'
+
+	if use gdbm ; then
+		mygdbm='D'
+		myndbm='D'
+	fi
+	if use berkdb ; then
+		mydb='D'
+		has_version '=sys-libs/db-1*' && myndbm='D'
+	fi
+
+	myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
+
+	if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
+		ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
+		myconf -Ui_db -Ui_ndbm
+	fi
+
+	use ithreads && myconf -Dusethreads
+
+	if use debug ; then
+		append-cflags "-g"
+		myconf -DDEBUGGING
+	elif [[ ${CFLAGS} == *-g* ]] ; then
+		myconf -DDEBUGGING=-g
+	else
+		myconf -DDEBUGGING=none
+	fi
+
+	if [[ -n ${PERL_OLDVERSEN} ]] ; then
+		local inclist=$(for v in ${PERL_OLDVERSEN}; do echo -n "${v}/${myarch}${mythreading} ${v} "; done )
+		myconf -Dinc_version_list="${inclist}"
+	fi
+
+	[[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
+
+	# Prefix: the host system needs not to follow Gentoo multilib stuff, and 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=""
+		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=( ${ldir}/*$(get_libname) )
+			[[ -e ${llib[0]} ]] || continue
+			$(tc-getCC) -o "${T}"/t "${T}"/t.c ${llib[0]} >& /dev/null \
+				&& paths="${paths} ${ldir}"
+		done
+		myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
+	elif [[ $(get_libdir) != "lib" ]] ; then
+		# We need to use " and not ', as the written config.sh use ' ...
+		myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
+	fi
+
+	# don't try building ODBM, bug #354453
+	myconf -Dnoextensions=ODBM_File
+
+	sh Configure \
+		-des \
+		-Duseshrplib \
+		-Darchname="${myarch}" \
+		-Dcc="$(tc-getCC)" \
+		-Doptimize="${CFLAGS}" \
+		-Dldflags="${LDFLAGS}" \
+		-Dprefix="${EPREFIX}"'/usr' \
+		-Dinstallprefix="${EPREFIX}"'/usr' \
+		-Dsiteprefix="${EPREFIX}"'/usr' \
+		-Dvendorprefix="${EPREFIX}"'/usr' \
+		-Dscriptdir="${EPREFIX}"'/usr/bin' \
+		-Dprivlib="${EPREFIX}${PRIV_LIB}" \
+		-Darchlib="${EPREFIX}${ARCH_LIB}" \
+		-Dsitelib="${EPREFIX}${SITE_LIB}" \
+		-Dsitearch="${EPREFIX}${SITE_ARCH}" \
+		-Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
+		-Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
+		-Dman1dir="${EPREFIX}"/usr/share/man/man1 \
+		-Dman3dir="${EPREFIX}"/usr/share/man/man3 \
+		-Dsiteman1dir="${EPREFIX}"/usr/share/man/man1 \
+		-Dsiteman3dir="${EPREFIX}"/usr/share/man/man3 \
+		-Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
+		-Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
+		-Dman1ext='1' \
+		-Dman3ext='3pm' \
+		-Dlibperl="${LIBPERL}" \
+		-Dlocincpth="${EPREFIX}"'/usr/include ' \
+		-Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
+		-Duselargefiles \
+		-Dd_semctl_semun \
+		-Dcf_by='Gentoo' \
+		-Dmyhostname='localhost' \
+		-Dperladmin='root@localhost' \
+		-Dinstallusrbinperl='n' \
+		-Ud_csh \
+		-Uusenm \
+		"${myconf[@]}" || die "Unable to configure"
+}
+
+src_test() {
+	if [[ ${EUID} == 0 ]] ; then
+		ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
+		return 0
+	fi
+	use elibc_uclibc && export MAKEOPTS+=" -j1"
+	TEST_JOBS=$(echo -j1 ${MAKEOPTS} | sed -r 's/.*(-j[[:space:]]*|--jobs=)([[:digit:]]+).*/\2/' ) \
+		make test_harness || die "test failed"
+}
+
+src_install() {
+	local i
+	local coredir="${ARCH_LIB}/CORE"
+
+	local installtarget=install
+	if use build ; then
+		installtarget=install.perl
+	fi
+	emake DESTDIR="${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 ${SHORT_PV}) || die
+		ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
+		ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
+		ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
+		ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
+	fi
+
+	rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
+
+#	# 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 '=sys-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=. ./perl installhtml \
+			--podroot='.' \
+			--podpath='lib:ext:pod:vms' \
+			--recurse \
+			--htmldir="${ED}/usr/share/doc/${PF}/html" \
+			--libpods='perlfunc:perlguts:perlvar:perlrun:perlop'
+	fi
+
+	if use build ; then
+		src_remove_extra_files
+	fi
+
+	dual_scripts
+}
+
+pkg_postinst() {
+	dual_scripts
+
+	if [[ "${ROOT}" = "/" ]] ; then
+		local INC DIR file
+		INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ 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/null
+			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 (ignore any error)"
+		# Prefix note: unprefixed as this is all kernel/libc stuff that we never 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 - which means
+# we will be able to invoke this only as needed :)
+		# Tried doing this via  -z, but $INC is too big...
+		#if [[ "${INC}x" != "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_libname)"
+	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="$1"
+	ver="$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="$1"
+	ver="$2"
+	shift 2
+	case "${EBUILD_PHASE:-none}" in
+		postinst|postrm)
+			for i in "$@" ; do
+				ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
+				ff=${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="$1"
+	ver="$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="./usr" # ./ is important
+	local bindir="${prefix}/bin"
+	local libdir="${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="
+	${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
+}



                 reply	other threads:[~2012-04-01 13:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1333286731.7ac9a460307a4efe370689379f79a54f2edd28fa.tove@gentoo \
    --to=tove@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox