Version bump
authorTorsten Veller <tove@gentoo.org>
Tue, 27 Sep 2011 13:42:03 +0000 (13:42 +0000)
committerTorsten Veller <tove@gentoo.org>
Tue, 27 Sep 2011 13:42:03 +0000 (13:42 +0000)
Package-Manager: portage-2.2.0_alpha59/cvs/Linux x86_64

dev-lang/perl/ChangeLog
dev-lang/perl/Manifest
dev-lang/perl/perl-5.14.2.ebuild [new file with mode: 0644]

index d498f92be1702015221474ab44044f9def1caa68..8f0be7f69ebf18db9355342252252940c8e0adbe 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for dev-lang/perl
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/ChangeLog,v 1.371 2011/08/09 11:42:18 tove Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/ChangeLog,v 1.372 2011/09/27 13:42:03 tove Exp $
+
+*perl-5.14.2 (27 Sep 2011)
+
+  27 Sep 2011; Torsten Veller <tove@gentoo.org> +perl-5.14.2.ebuild:
+  Version bump
 
 *perl-5.14.1-r1 (09 Aug 2011)
 *perl-5.12.4-r1 (09 Aug 2011)
index f61bafd8543dd70574543ba825990cde7d1e7ae5..ae82a7706de11ebf3a1eb7fc6d974f22b0ae4555 100644 (file)
@@ -36,6 +36,8 @@ DIST perl-5.12.4-1.tar.bz2 8045 RMD160 040b90454c088398fffa8167d20c903cd0254dc6
 DIST perl-5.12.4.tar.bz2 12350353 RMD160 f799248164293da2cee06cb51460fb854b091236 SHA1 68ff2f4a0901d1e4ea263f452001db0563d2edb3 SHA256 c920fa01a34b7752e8cbbc99c6921b908df60611d84a29c4377e4a798604767e
 DIST perl-5.14.1-1.tar.bz2 5074 RMD160 4b177a5a803757151420f53a3cdf9a0d890b0b28 SHA1 f9bed53967415a677dfe247810bb5f37599337bf SHA256 5fa81bde2e8ca4f8a9c60203d4c2d5f7d388fda648a669ae474881317cd2baee
 DIST perl-5.14.1.tar.bz2 13266293 RMD160 57347db6c2794f5599f6f59183b6f2a92133a75c SHA1 3f629f84f5bf766d7e24f61af910b10f5981c002 SHA256 29b4a7e7c22d4a980ab9eb1ea486c5c4ee9ec533192a1ce8f3fe9ae32fb1f862
+DIST perl-5.14.2-1.tar.bz2 5103 RMD160 efec2b0cc77febf4f7d45cef0245f851cd41cff8 SHA1 3c99f5e473749962ac5317f98271f2afebf30791 SHA256 0f553de072f80670880b96ef8ca0a79e4e1505f9bf1df55f6de55b95ac0862e7
+DIST perl-5.14.2.tar.bz2 13226972 RMD160 4a15090b2b4fdfa9abda6444d1825e62c393c891 SHA1 e48d11c6fd1ee61985b475d7f261d774296a1367 SHA256 c2a2362e8d1fdd2bfbfde801fcd78241f154c164f00fba76065ab8cc5c7b06cd
 DIST perl-5.8.8.tar.bz2 10123359 RMD160 e78f26d9b96e6db35f946ad4ff55e3a69385c71b SHA1 4aab490040727ca4419098720eca2ba4367df539 SHA256 818a140d9c04ea8dab3a05104b34ced7f7d9d0a91bfed91baf89a84d0dfb1bc9
 EBUILD perl-5.10.1.ebuild 18125 RMD160 061e49a2031f270f2804923069d98ddf0a8edd40 SHA1 cb35c08fe202cd4e1eae39439cc307193a4bc72d SHA256 ed5ca8861b704f9dbfaa9cadddbe464644dfe93bdefe71d3118abd7d0c935776
 EBUILD perl-5.12.3-r1.ebuild 19395 RMD160 2fecbfe18cfc23bf4945ac564356d250088be46a SHA1 a03feeaa327eb4411e7f0fba7bf664aada53bca6 SHA256 88d44ed7abd26f5ee1077d3d52e0f1ba2799aeb34dc60fc612ea9609efe127ed
@@ -43,13 +45,14 @@ EBUILD perl-5.12.4-r1.ebuild 19508 RMD160 06fb1dec73bdc057e89bd8a7f5c9894f5de446
 EBUILD perl-5.12.4.ebuild 19434 RMD160 1c3ea1f1045ab464bfbcb2530e0662e3e207bf92 SHA1 0f036fb213acc46db1538c85348c4c2fae0b2217 SHA256 1c5946b4c48a1d87026f62d03ef5d4eefc10fa93569d1a4ae78ea4309c77ac25
 EBUILD perl-5.14.1-r1.ebuild 19996 RMD160 c56e6bdcfe2923caa784407cdc6bd4f100845f33 SHA1 2fc45f90032c9223b257ed736567688a1460e5ae SHA256 bb8edc920f0450f1cd78277310a4bf95954e00645a84fa29351e0e6e49d86b6f
 EBUILD perl-5.14.1.ebuild 19375 RMD160 4366d553c06db5f874a2a9ba0f039b8991fe3310 SHA1 016d380d9ccd3dd7d4af64598c5accdd75b230f4 SHA256 85cf69568c9626ff875c66faa083db9f1411a4ea266e29b0f111029908865fb6
+EBUILD perl-5.14.2.ebuild 20000 RMD160 fb5f5f7a40dfa30e0b378e3b6243b9d6c1a6873a SHA1 5d8f459b70f5efa79df91e8ef9d95fbbfaa4df67 SHA256 10c94449e0298a3d6fbd23b814554c164a12d564082f78dc4b1a14229575456b
 EBUILD perl-5.8.8-r8.ebuild 20685 RMD160 407925611750782be465654d4204c35fb5fd98db SHA1 7dfcf6028d61d42a6303dab28ab5d370f0fc27a6 SHA256 81d7022079a0d387b3caa8af0301e49741da5bd56d8d28f7d19eabf96c558998
-MISC ChangeLog 71955 RMD160 1cd42bfc5fba87b9dabb1c3b776b435f500318bc SHA1 713b21c3cce110dea0d34f0f29752f14630b8273 SHA256 350c4bf4771d7dce785d5f34d9b224a3bf4d5e125e0ae9f0a578d07edf36c78b
+MISC ChangeLog 72068 RMD160 8387732e72596103d720a0fa683c37dd2be47501 SHA1 b79912b2cd2fcfb293265d533edbab0fd1a2db37 SHA256 5ada41699eb2c412507a17dadbe7aa59a3fd213710e83f6961551e5b2d0fee93
 MISC metadata.xml 451 RMD160 8424230d79d13df7462c454050058b3526a78e92 SHA1 1ae85db5c1c1fc6413ca324ebc93b6894831b437 SHA256 49e06011c113616fa1f618cf58d42c2d6abbce5f71936f109b6ae3a5dfff587c
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
-iEYEAREIAAYFAk5BHSAACgkQV3J2n04EauxTQgCgoeZPShdinzD2vcHJZAhqOlx2
-zmwAn3EEgz0QXo6vhrUvYVeuSMkLMHwB
-=p9ix
+iEYEAREIAAYFAk6B0rEACgkQV3J2n04EauyIYQCgvndwTyyBsPQ2RUu8iPBHr+HD
+VRYAoKMsPan56N9Q91aLSMzpWVsSdojR
+=Ahri
 -----END PGP SIGNATURE-----
diff --git a/dev-lang/perl/perl-5.14.2.ebuild b/dev-lang/perl/perl-5.14.2.ebuild
new file mode 100644 (file)
index 0000000..af00e18
--- /dev/null
@@ -0,0 +1,673 @@
+# Copyright 1999-2011 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.1 2011/09/27 13:42:03 tove 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"
+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}
+       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" ;;
+               *)            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
+       ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
+       ln -s ${LIBPERL} libperl$(get_libname ) || die
+}
+
+myconf() {
+       # the myconf array is declared in src_configure
+       myconf=( "${myconf[@]}" "$@" )
+}
+
+src_configure() {
+       declare -a myconf
+
+       export LC_ALL="C"
+
+       # 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"
+
+       # this is needed because gcc 3.3-compiled kernels will hang
+       # the machine trying to run this test - check with `Kumba
+       # <rac@gentoo.org> 2003.06.26
+       use mips && myconf -Dd_u32align
+
+       use sparc && myconf -Ud_longdbl
+
+       # 266337
+       export BUILD_BZIP2=0
+       export BZIP2_INCLUDE=/usr/include
+       export BZIP2_LIB=/usr/$(get_libdir)
+       cat <<-EOF > "${S}/cpan/Compress-Raw-Zlib/config.in"
+               BUILD_ZLIB = False
+               INCLUDE = /usr/include
+               LIB = /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"
+
+       if [[ $(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
+
+       sh Configure \
+               -des \
+               -Duseshrplib \
+               -Darchname="${myarch}" \
+               -Dcc="$(tc-getCC)" \
+               -Doptimize="${CFLAGS}" \
+               -Dldflags="${LDFLAGS}" \
+               -Dprefix='/usr' \
+               -Dsiteprefix='/usr' \
+               -Dvendorprefix='/usr' \
+               -Dscriptdir='/usr/bin' \
+               -Dprivlib="${PRIV_LIB}" \
+               -Darchlib="${ARCH_LIB}" \
+               -Dsitelib="${SITE_LIB}" \
+               -Dsitearch="${SITE_ARCH}" \
+               -Dvendorlib="${VENDOR_LIB}" \
+               -Dvendorarch="${VENDOR_ARCH}" \
+               -Dman1dir=/usr/share/man/man1 \
+               -Dman3dir=/usr/share/man/man3 \
+               -Dsiteman1dir=/usr/share/man/man1 \
+               -Dsiteman3dir=/usr/share/man/man3 \
+               -Dvendorman1dir=/usr/share/man/man1 \
+               -Dvendorman3dir=/usr/share/man/man3 \
+               -Dman1ext='1' \
+               -Dman3ext='3pm' \
+               -Dlibperl="${LIBPERL}" \
+               -Dlocincpth=' ' \
+               -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 "${D}"/usr/bin/perl
+       ln -s perl${MY_PV} "${D}"/usr/bin/perl || die
+
+       dolib.so "${D}"${coredir}/${LIBPERL}
+       rm -f "${D}"${coredir}/${LIBPERL}
+       ln -sf ${LIBPERL} "${D}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
+       ln -sf ${LIBPERL} "${D}"/usr/$(get_libdir)/libperl$(get_libname) || die
+       ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${D}"${coredir}/${LIBPERL} || die
+       ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${D}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
+       ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${D}"${coredir}/libperl$(get_libname) || die
+
+       rm -rf "${D}"/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 "${D}" -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 "${D}" -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="${D}/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)"
+               pushd /usr/include >/dev/null
+                       h2ph -Q -a -d ${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 ${ROOT}${i} && ! -h ${ROOT}${i} ]] ; then
+                                       has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
+                                       break
+                               fi
+                       done
+                       ;;
+               install)
+                       for i in "$@" ; do
+                               if ! [[ -f "${D}"${i} ]] ; then
+                                       use build || ewarn "${i} does not exist!"
+                                       continue
+                               fi
+                               mv "${D}"${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 "${ROOT}${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 "${D}"${i} ]] ; then
+                                       use build || ewarn "${i} does not exist!"
+                                       continue
+                               fi
+                               mv "${D}"${i} "${D}"${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 "${D}" > /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
+}