summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Fredric <kentnl@gentoo.org>2017-09-11 13:08:41 +1200
committerKent Fredric <kentnl@gentoo.org>2017-09-11 13:09:09 +1200
commite7f2457d1a8207a97e4a8675613ce97ecb408e7c (patch)
tree7650f9a729889f28b20fa290f414644ede0b37e8 /dev-lang
parentdev-lang/perl: Update 5.26.9999 to 5.26.1-RC1 (diff)
downloadgentoo-e7f2457d1a8207a97e4a8675613ce97ecb408e7c.tar.gz
gentoo-e7f2457d1a8207a97e4a8675613ce97ecb408e7c.tar.bz2
gentoo-e7f2457d1a8207a97e4a8675613ce97ecb408e7c.zip
dev-lang/perl: Do auto oldversen discovery for ABI non-specific paths
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/perl/perl-5.26.9999.ebuild56
-rw-r--r--dev-lang/perl/perl-5.28.9999.ebuild56
2 files changed, 84 insertions, 28 deletions
diff --git a/dev-lang/perl/perl-5.26.9999.ebuild b/dev-lang/perl/perl-5.26.9999.ebuild
index 47b6f53cd7c0..4ca2f53d0a04 100644
--- a/dev-lang/perl/perl-5.26.9999.ebuild
+++ b/dev-lang/perl/perl-5.26.9999.ebuild
@@ -15,8 +15,6 @@ DIST_AUTHOR=SHAY
# Devel point-releases are not ABI-intercompatible, but stable point releases are
# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
PERL_BIN_OLDVERSEN="5.26.0"
-# Don't add more -RC values, its historical bungling
-PERL_OLDVERSEN="5.26.0 5.26.0-RC1 5.25.12 5.25.11 5.24.3 5.24.2 5.24.1 5.24.0 5.22.3 5.22.2 5.22.1 5.22.0"
if [[ "${PV##*.}" == "9999" ]]; then
DIST_VERSION=5.26.1-RC1
else
@@ -153,13 +151,17 @@ pkg_setup() {
myarch+="-thread"
fi
+ PRIV_BASE="/usr/$(get_libdir)/perl5"
+ SITE_BASE="/usr/local/$(get_libdir)/perl5"
+ VENDOR_BASE="/usr/$(get_libdir)/perl5/vendor_perl"
+
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}"
+ PRIV_LIB="${PRIV_BASE}/${MY_PV}"
+ ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}"
+ SITE_LIB="${SITE_BASE}/${MY_PV}"
+ SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}"
+ VENDOR_LIB="${VENDOR_BASE}/${MY_PV}"
+ VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}"
dual_scripts
}
@@ -397,12 +399,38 @@ src_configure() {
myconf -DDEBUGGING=none
fi
- if [[ -n ${PERL_OLDVERSEN} ]] ; then
- local inclist=$(
- for v in ${PERL_OLDVERSEN}; do
- has "${v}" ${PERL_BIN_OLDVERSEN} && echo -n "${v}/${myarch}${mythreading} ";
- echo -n "${v} ";
- done )
+ # Autodiscover all old version directories, some of them will even be newer
+ # if you downgrade
+ if [[ -z ${PERL_OLDVERSEN} ]]; then
+ PERL_OLDVERSEN="$(
+ find "${EROOT%/}${PRIV_BASE}" "${EROOT%/}${SITE_BASE}" "${EROOT%/}${VENDOR_BASE}" \
+ -maxdepth 1 -mindepth 1 -type d -regex '.*/5[.][0-9]+[.][0-9]+$' \
+ -printf "%f " 2>/dev/null )"
+ fi
+ # Fixup versions, removing self match, fixing order and dupes
+ PERL_OLDVERSEN="$(
+ echo "${PERL_OLDVERSEN}" |\
+ tr " " "\n" |\
+ grep -vF "${DIST_VERSION%-RC}" |\
+ sort -u -nr -t'.' -k1,1 -k2,2 -k3,3
+ )"
+
+ # Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string
+ if [[ -n "${PERL_OLDVERSEN// }" ]]; then
+ local inclist="$(
+ for v in ${PERL_OLDVERSEN}; do
+ has "${v}" ${PERL_BIN_OLDVERSEN} && echo -n "${v}/${myarch}${mythreading} ";
+ echo -n "${v} ";
+ done )"
+ einfo "This version of perl may partially support modules previously"
+ einfo "installed in any of the following paths:"
+ for incpath in ${inclist}; do
+ [[ -e "${EROOT%/}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${VENDOR_BASE}/${incpath}"
+ [[ -e "${EROOT%/}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROO%/T}${PRIV_BASE}/${incpath}"
+ [[ -e "${EROOT%/}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${SITE_BASE}/${incpath}"
+ done
+ einfo "This is a temporary measure and you should aim to cleanup these paths"
+ einfo "via world updates and perl-cleaner"
myconf -Dinc_version_list="${inclist}"
fi
diff --git a/dev-lang/perl/perl-5.28.9999.ebuild b/dev-lang/perl/perl-5.28.9999.ebuild
index d43d8adc8b1d..1405b91843d5 100644
--- a/dev-lang/perl/perl-5.28.9999.ebuild
+++ b/dev-lang/perl/perl-5.28.9999.ebuild
@@ -15,8 +15,6 @@ DIST_AUTHOR=WOLFSAGE
# Devel point-releases are not ABI-intercompatible, but stable point releases are
# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
PERL_BIN_OLDVERSEN=""
-# Don't add more -RC values, its historical bungling
-PERL_OLDVERSEN="5.27.2 5.27.1 5.27.0 5.26.0 5.26.0-RC1 5.25.12 5.25.11 5.24.2 5.24.1 5.24.0 5.22.3 5.22.2 5.22.1 5.22.0"
if [[ "${PV##*.}" == "9999" ]]; then
DIST_VERSION=5.27.3
else
@@ -153,13 +151,17 @@ pkg_setup() {
myarch+="-thread"
fi
+ PRIV_BASE="/usr/$(get_libdir)/perl5"
+ SITE_BASE="/usr/local/$(get_libdir)/perl5"
+ VENDOR_BASE="/usr/$(get_libdir)/perl5/vendor_perl"
+
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}"
+ PRIV_LIB="${PRIV_BASE}/${MY_PV}"
+ ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}"
+ SITE_LIB="${SITE_BASE}/${MY_PV}"
+ SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}"
+ VENDOR_LIB="${VENDOR_BASE}/${MY_PV}"
+ VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}"
dual_scripts
}
@@ -397,12 +399,38 @@ src_configure() {
myconf -DDEBUGGING=none
fi
- if [[ -n ${PERL_OLDVERSEN} ]] ; then
- local inclist=$(
- for v in ${PERL_OLDVERSEN}; do
- has "${v}" ${PERL_BIN_OLDVERSEN} && echo -n "${v}/${myarch}${mythreading} ";
- echo -n "${v} ";
- done )
+ # Autodiscover all old version directories, some of them will even be newer
+ # if you downgrade
+ if [[ -z ${PERL_OLDVERSEN} ]]; then
+ PERL_OLDVERSEN="$(
+ find "${EROOT%/}${PRIV_BASE}" "${EROOT%/}${SITE_BASE}" "${EROOT%/}${VENDOR_BASE}" \
+ -maxdepth 1 -mindepth 1 -type d -regex '.*/5[.][0-9]+[.][0-9]+$' \
+ -printf "%f " 2>/dev/null )"
+ fi
+ # Fixup versions, removing self match, fixing order and dupes
+ PERL_OLDVERSEN="$(
+ echo "${PERL_OLDVERSEN}" |\
+ tr " " "\n" |\
+ grep -vF "${DIST_VERSION%-RC}" |\
+ sort -u -nr -t'.' -k1,1 -k2,2 -k3,3
+ )"
+
+ # Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string
+ if [[ -n "${PERL_OLDVERSEN// }" ]]; then
+ local inclist="$(
+ for v in ${PERL_OLDVERSEN}; do
+ has "${v}" ${PERL_BIN_OLDVERSEN} && echo -n "${v}/${myarch}${mythreading} ";
+ echo -n "${v} ";
+ done )"
+ einfo "This version of perl may partially support modules previously"
+ einfo "installed in any of the following paths:"
+ for incpath in ${inclist}; do
+ [[ -e "${EROOT%/}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${VENDOR_BASE}/${incpath}"
+ [[ -e "${EROOT%/}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROO%/T}${PRIV_BASE}/${incpath}"
+ [[ -e "${EROOT%/}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${SITE_BASE}/${incpath}"
+ done
+ einfo "This is a temporary measure and you should aim to cleanup these paths"
+ einfo "via world updates and perl-cleaner"
myconf -Dinc_version_list="${inclist}"
fi