1 |
commit: e7f2457d1a8207a97e4a8675613ce97ecb408e7c |
2 |
Author: Kent Fredric <kentnl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 11 01:08:41 2017 +0000 |
4 |
Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 11 01:09:09 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7f2457d |
7 |
|
8 |
dev-lang/perl: Do auto oldversen discovery for ABI non-specific paths |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
11 |
|
12 |
dev-lang/perl/perl-5.26.9999.ebuild | 56 +++++++++++++++++++++++++++---------- |
13 |
dev-lang/perl/perl-5.28.9999.ebuild | 56 +++++++++++++++++++++++++++---------- |
14 |
2 files changed, 84 insertions(+), 28 deletions(-) |
15 |
|
16 |
diff --git a/dev-lang/perl/perl-5.26.9999.ebuild b/dev-lang/perl/perl-5.26.9999.ebuild |
17 |
index 47b6f53cd7c..4ca2f53d0a0 100644 |
18 |
--- a/dev-lang/perl/perl-5.26.9999.ebuild |
19 |
+++ b/dev-lang/perl/perl-5.26.9999.ebuild |
20 |
@@ -15,8 +15,6 @@ DIST_AUTHOR=SHAY |
21 |
# Devel point-releases are not ABI-intercompatible, but stable point releases are |
22 |
# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions |
23 |
PERL_BIN_OLDVERSEN="5.26.0" |
24 |
-# Don't add more -RC values, its historical bungling |
25 |
-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" |
26 |
if [[ "${PV##*.}" == "9999" ]]; then |
27 |
DIST_VERSION=5.26.1-RC1 |
28 |
else |
29 |
@@ -153,13 +151,17 @@ pkg_setup() { |
30 |
myarch+="-thread" |
31 |
fi |
32 |
|
33 |
+ PRIV_BASE="/usr/$(get_libdir)/perl5" |
34 |
+ SITE_BASE="/usr/local/$(get_libdir)/perl5" |
35 |
+ VENDOR_BASE="/usr/$(get_libdir)/perl5/vendor_perl" |
36 |
+ |
37 |
LIBPERL="libperl$(get_libname ${MY_PV} )" |
38 |
- PRIV_LIB="/usr/$(get_libdir)/perl5/${MY_PV}" |
39 |
- ARCH_LIB="/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}" |
40 |
- SITE_LIB="/usr/local/$(get_libdir)/perl5/${MY_PV}" |
41 |
- SITE_ARCH="/usr/local/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}" |
42 |
- VENDOR_LIB="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}" |
43 |
- VENDOR_ARCH="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}/${myarch}${mythreading}" |
44 |
+ PRIV_LIB="${PRIV_BASE}/${MY_PV}" |
45 |
+ ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}" |
46 |
+ SITE_LIB="${SITE_BASE}/${MY_PV}" |
47 |
+ SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}" |
48 |
+ VENDOR_LIB="${VENDOR_BASE}/${MY_PV}" |
49 |
+ VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}" |
50 |
|
51 |
dual_scripts |
52 |
} |
53 |
@@ -397,12 +399,38 @@ src_configure() { |
54 |
myconf -DDEBUGGING=none |
55 |
fi |
56 |
|
57 |
- if [[ -n ${PERL_OLDVERSEN} ]] ; then |
58 |
- local inclist=$( |
59 |
- for v in ${PERL_OLDVERSEN}; do |
60 |
- has "${v}" ${PERL_BIN_OLDVERSEN} && echo -n "${v}/${myarch}${mythreading} "; |
61 |
- echo -n "${v} "; |
62 |
- done ) |
63 |
+ # Autodiscover all old version directories, some of them will even be newer |
64 |
+ # if you downgrade |
65 |
+ if [[ -z ${PERL_OLDVERSEN} ]]; then |
66 |
+ PERL_OLDVERSEN="$( |
67 |
+ find "${EROOT%/}${PRIV_BASE}" "${EROOT%/}${SITE_BASE}" "${EROOT%/}${VENDOR_BASE}" \ |
68 |
+ -maxdepth 1 -mindepth 1 -type d -regex '.*/5[.][0-9]+[.][0-9]+$' \ |
69 |
+ -printf "%f " 2>/dev/null )" |
70 |
+ fi |
71 |
+ # Fixup versions, removing self match, fixing order and dupes |
72 |
+ PERL_OLDVERSEN="$( |
73 |
+ echo "${PERL_OLDVERSEN}" |\ |
74 |
+ tr " " "\n" |\ |
75 |
+ grep -vF "${DIST_VERSION%-RC}" |\ |
76 |
+ sort -u -nr -t'.' -k1,1 -k2,2 -k3,3 |
77 |
+ )" |
78 |
+ |
79 |
+ # Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string |
80 |
+ if [[ -n "${PERL_OLDVERSEN// }" ]]; then |
81 |
+ local inclist="$( |
82 |
+ for v in ${PERL_OLDVERSEN}; do |
83 |
+ has "${v}" ${PERL_BIN_OLDVERSEN} && echo -n "${v}/${myarch}${mythreading} "; |
84 |
+ echo -n "${v} "; |
85 |
+ done )" |
86 |
+ einfo "This version of perl may partially support modules previously" |
87 |
+ einfo "installed in any of the following paths:" |
88 |
+ for incpath in ${inclist}; do |
89 |
+ [[ -e "${EROOT%/}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${VENDOR_BASE}/${incpath}" |
90 |
+ [[ -e "${EROOT%/}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROO%/T}${PRIV_BASE}/${incpath}" |
91 |
+ [[ -e "${EROOT%/}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${SITE_BASE}/${incpath}" |
92 |
+ done |
93 |
+ einfo "This is a temporary measure and you should aim to cleanup these paths" |
94 |
+ einfo "via world updates and perl-cleaner" |
95 |
myconf -Dinc_version_list="${inclist}" |
96 |
fi |
97 |
|
98 |
|
99 |
diff --git a/dev-lang/perl/perl-5.28.9999.ebuild b/dev-lang/perl/perl-5.28.9999.ebuild |
100 |
index d43d8adc8b1..1405b91843d 100644 |
101 |
--- a/dev-lang/perl/perl-5.28.9999.ebuild |
102 |
+++ b/dev-lang/perl/perl-5.28.9999.ebuild |
103 |
@@ -15,8 +15,6 @@ DIST_AUTHOR=WOLFSAGE |
104 |
# Devel point-releases are not ABI-intercompatible, but stable point releases are |
105 |
# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions |
106 |
PERL_BIN_OLDVERSEN="" |
107 |
-# Don't add more -RC values, its historical bungling |
108 |
-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" |
109 |
if [[ "${PV##*.}" == "9999" ]]; then |
110 |
DIST_VERSION=5.27.3 |
111 |
else |
112 |
@@ -153,13 +151,17 @@ pkg_setup() { |
113 |
myarch+="-thread" |
114 |
fi |
115 |
|
116 |
+ PRIV_BASE="/usr/$(get_libdir)/perl5" |
117 |
+ SITE_BASE="/usr/local/$(get_libdir)/perl5" |
118 |
+ VENDOR_BASE="/usr/$(get_libdir)/perl5/vendor_perl" |
119 |
+ |
120 |
LIBPERL="libperl$(get_libname ${MY_PV} )" |
121 |
- PRIV_LIB="/usr/$(get_libdir)/perl5/${MY_PV}" |
122 |
- ARCH_LIB="/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}" |
123 |
- SITE_LIB="/usr/local/$(get_libdir)/perl5/${MY_PV}" |
124 |
- SITE_ARCH="/usr/local/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}" |
125 |
- VENDOR_LIB="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}" |
126 |
- VENDOR_ARCH="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}/${myarch}${mythreading}" |
127 |
+ PRIV_LIB="${PRIV_BASE}/${MY_PV}" |
128 |
+ ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}" |
129 |
+ SITE_LIB="${SITE_BASE}/${MY_PV}" |
130 |
+ SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}" |
131 |
+ VENDOR_LIB="${VENDOR_BASE}/${MY_PV}" |
132 |
+ VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}" |
133 |
|
134 |
dual_scripts |
135 |
} |
136 |
@@ -397,12 +399,38 @@ src_configure() { |
137 |
myconf -DDEBUGGING=none |
138 |
fi |
139 |
|
140 |
- if [[ -n ${PERL_OLDVERSEN} ]] ; then |
141 |
- local inclist=$( |
142 |
- for v in ${PERL_OLDVERSEN}; do |
143 |
- has "${v}" ${PERL_BIN_OLDVERSEN} && echo -n "${v}/${myarch}${mythreading} "; |
144 |
- echo -n "${v} "; |
145 |
- done ) |
146 |
+ # Autodiscover all old version directories, some of them will even be newer |
147 |
+ # if you downgrade |
148 |
+ if [[ -z ${PERL_OLDVERSEN} ]]; then |
149 |
+ PERL_OLDVERSEN="$( |
150 |
+ find "${EROOT%/}${PRIV_BASE}" "${EROOT%/}${SITE_BASE}" "${EROOT%/}${VENDOR_BASE}" \ |
151 |
+ -maxdepth 1 -mindepth 1 -type d -regex '.*/5[.][0-9]+[.][0-9]+$' \ |
152 |
+ -printf "%f " 2>/dev/null )" |
153 |
+ fi |
154 |
+ # Fixup versions, removing self match, fixing order and dupes |
155 |
+ PERL_OLDVERSEN="$( |
156 |
+ echo "${PERL_OLDVERSEN}" |\ |
157 |
+ tr " " "\n" |\ |
158 |
+ grep -vF "${DIST_VERSION%-RC}" |\ |
159 |
+ sort -u -nr -t'.' -k1,1 -k2,2 -k3,3 |
160 |
+ )" |
161 |
+ |
162 |
+ # Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string |
163 |
+ if [[ -n "${PERL_OLDVERSEN// }" ]]; then |
164 |
+ local inclist="$( |
165 |
+ for v in ${PERL_OLDVERSEN}; do |
166 |
+ has "${v}" ${PERL_BIN_OLDVERSEN} && echo -n "${v}/${myarch}${mythreading} "; |
167 |
+ echo -n "${v} "; |
168 |
+ done )" |
169 |
+ einfo "This version of perl may partially support modules previously" |
170 |
+ einfo "installed in any of the following paths:" |
171 |
+ for incpath in ${inclist}; do |
172 |
+ [[ -e "${EROOT%/}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${VENDOR_BASE}/${incpath}" |
173 |
+ [[ -e "${EROOT%/}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROO%/T}${PRIV_BASE}/${incpath}" |
174 |
+ [[ -e "${EROOT%/}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${SITE_BASE}/${incpath}" |
175 |
+ done |
176 |
+ einfo "This is a temporary measure and you should aim to cleanup these paths" |
177 |
+ einfo "via world updates and perl-cleaner" |
178 |
myconf -Dinc_version_list="${inclist}" |
179 |
fi |