Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/perl/
Date: Sat, 06 Apr 2019 21:50:19
Message-Id: 1554587404.4ca852556c44570dbd4cd7e6e224567bb91ad39b.dilfridge@gentoo
1 commit: 4ca852556c44570dbd4cd7e6e224567bb91ad39b
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 6 21:50:04 2019 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 6 21:50:04 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ca85255
7
8 dev-lang/perl: Drop 5.26.1
9
10 Package-Manager: Portage-2.3.62, Repoman-2.3.12
11 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
12
13 dev-lang/perl/Manifest | 2 -
14 dev-lang/perl/perl-5.26.1-r1.ebuild | 625 -----------------------------------
15 dev-lang/perl/perl-5.26.1-r2.ebuild | 637 ------------------------------------
16 3 files changed, 1264 deletions(-)
17
18 diff --git a/dev-lang/perl/Manifest b/dev-lang/perl/Manifest
19 index 7115f5a4580..3a78b53c6f1 100644
20 --- a/dev-lang/perl/Manifest
21 +++ b/dev-lang/perl/Manifest
22 @@ -2,8 +2,6 @@ DIST perl-5.24.3-patches-2.tar.xz 23980 BLAKE2B 5de7ac2cc5238d0b8460a294ae2e8da1
23 DIST perl-5.24.3.tar.xz 11574740 BLAKE2B 79e719d1d0fcea3eea71653f276d0d093d8d1f6b1f981b053f25e6891c57af9ee1982f65ce4a31e4c5844eb11a7966f25c6b459cc7de51cf62b9127be96f6f25 SHA512 139c92c0ea0ee7bd5912ad52cc275e0732ceb0865d8b67c301e1fc5a96ae126a26432b4450a2bbc7fe65b8e1dd8adde92ea2cc91ee39cb13ec3c5096e8f787ec
24 DIST perl-5.24.4-patches-1.tar.xz 24244 BLAKE2B aa4557a887e57d584c738058ed147f1b4f80f491223e1476c16abdc371bbe133f5d99ea3be11e44101b5343680823ab29c5d26cc8a8ca222275ba4bc092cd5d9 SHA512 465f22269d6c07be5616de223c712ab57d7060fdb4fcc4d79ab23aae79fa61517dbed112bb3a2541d3368a02d046b769ef8fa50a7b91379ad03ca4bf3387e518
25 DIST perl-5.24.4.tar.xz 11580256 BLAKE2B efdb9f0e52604207fc73e040c999f40e364f546e3e872dd6709cc6b5209179742fab083319238142581c324847d5e24a3e6a011decc901827d3eb213d00a1666 SHA512 a50bf162d9e62a558a4137d44383eb3fe2001e1eaa574aad7abae851b544dee1dacb849c101023db49b2740925691f5e367fa36ab5dda90634143076c8e4d2f3
26 -DIST perl-5.26.1-patches-1.tar.xz 16764 BLAKE2B 95fb086d214bf27dedfdc96f927e11ca6e2a237aabc268b3e26ca9868eeede3916fe6adc9ab890bc6bbc9977fa4a3c200188f91d506652c1f45f7ebdda9857e2 SHA512 24d7f5e1344a768bbf170376b131498fa234881d10edc259ff7a31572467e2fe1084ce6a2a9ef4d4ec5924ca95488064235d6e02b83acba727a856cd1e4c9ebc
27 -DIST perl-5.26.1.tar.xz 11922848 BLAKE2B 8ba5ac50bc6bc3cea1ede7dbd9b41566bd3f62e432d9a1f5ee45837cc3051c1edc037a13d73d4c867edc7833f9dfa8a9d22216e14a19df179ba030a03d3acc07 SHA512 13faa7bcd7ed8c490c37e9032c115af06c9b8152b75f8062409dd72d263d1314480e8a9a883490de1b448b2e6d53b6a87d108e2eceb17de2524d5857c6a7d300
28 DIST perl-5.26.2-patches-1.tar.xz 17100 BLAKE2B 681239e438945285e006ee1d1e2a9eb888fc9b425e6fbd4822e65e1fe1ced2216de76485b9792d3fee28783a588c09e1d34c294ef43d81055c4566af37fe9b6c SHA512 2a274150d2dba406c6efb67ec236f67032a51ff1788b30ea556e74b2f02fab68f5029ebd4b9d4daeb16b3a63fa7aa1744d323bf637a9d21946f19f33b69da245
29 DIST perl-5.26.2.tar.xz 11931624 BLAKE2B 2d54b155ace7c70a33adbe9911ba5384281aa49a0f6d4f452f4249b4deb58804268b473457470488f7592e041221f552b09156eb55c10078002aae3715446d9a SHA512 fd54c90da250144c81b94587c01c49fa367f84c54406f1d360ddab4a41589a7b19efc1707f95c95d6357fae66fc3f6f00bf69dd7741db114c7034a14f52be65f
30 DIST perl-5.28.0-patches-1.tar.xz 17128 BLAKE2B f16843d9ecf27fa7d42dd59e1591d618ba9ad6b14f4e56bab4019af043eb79559cc7dbc4a1b1e580c18b7ba0b5d71c4da3e3f94955889629a655e7028492a066 SHA512 e05a492ba045ac71d20393099815bed8e4f491bed79a352e83537561eb256d4f672e0125c5cca9e45150c01d3ad463a070a49e845b3c17806d9f77a872d0352a
31
32 diff --git a/dev-lang/perl/perl-5.26.1-r1.ebuild b/dev-lang/perl/perl-5.26.1-r1.ebuild
33 deleted file mode 100644
34 index 7e570ce3afd..00000000000
35 --- a/dev-lang/perl/perl-5.26.1-r1.ebuild
36 +++ /dev/null
37 @@ -1,625 +0,0 @@
38 -# Copyright 1999-2018 Gentoo Foundation
39 -# Distributed under the terms of the GNU General Public License v2
40 -
41 -EAPI=6
42 -
43 -inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing
44 -
45 -PATCH_VER=1
46 -CROSS_VER=1.1.7
47 -PATCH_BASE="perl-5.26.1-patches-${PATCH_VER}"
48 -
49 -DIST_AUTHOR=SHAY
50 -
51 -# Greatest first, don't include yourself
52 -# Devel point-releases are not ABI-intercompatible, but stable point releases are
53 -# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
54 -PERL_BIN_OLDVERSEN="5.26.0"
55 -if [[ "${PV##*.}" == "9999" ]]; then
56 - DIST_VERSION=5.26.1-RC1
57 -else
58 - DIST_VERSION="${PV/_rc/-RC}"
59 -fi
60 -SHORT_PV="${DIST_VERSION%.*}"
61 -# Even numbered major versions are ABI intercompatible
62 -# Odd numbered major versions are not
63 -if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
64 - SUBSLOT="${DIST_VERSION%-RC*}"
65 -else
66 - SUBSLOT="${DIST_VERSION%.*}"
67 -fi
68 -# Used only in tar paths
69 -MY_P="perl-${DIST_VERSION}"
70 -# Used in library paths
71 -MY_PV="${DIST_VERSION%-RC*}"
72 -
73 -DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
74 -
75 -SRC_URI="
76 - mirror://cpan/src/5.0/${MY_P}.tar.xz
77 - mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz
78 - https://github.com/gentoo-perl/perl-patchset/releases/download/${PATCH_BASE}/${PATCH_BASE}.tar.xz
79 - mirror://gentoo/${PATCH_BASE}.tar.xz
80 - https://dev.gentoo.org/~kentnl/distfiles/${PATCH_BASE}.tar.xz
81 - https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz
82 -"
83 -HOMEPAGE="https://www.perl.org/"
84 -
85 -LICENSE="|| ( Artistic GPL-1+ )"
86 -SLOT="0/${SUBSLOT}"
87 -
88 -if [[ "${PV##*.}" != "9999" ]]; then
89 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
90 -fi
91 -
92 -IUSE="berkdb debug doc gdbm ithreads"
93 -
94 -RDEPEND="
95 - berkdb? ( sys-libs/db:= )
96 - gdbm? ( >=sys-libs/gdbm-1.8.3:= )
97 - app-arch/bzip2
98 - sys-libs/zlib
99 -"
100 -DEPEND="${RDEPEND}
101 - !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
102 -"
103 -PDEPEND="
104 - >=app-admin/perl-cleaner-2.5
105 - >=virtual/perl-File-Temp-0.230.400-r2
106 - >=virtual/perl-Data-Dumper-2.154.0
107 - virtual/perl-Test-Harness
108 -"
109 -# bug 390719, bug 523624
110 -# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
111 -
112 -S="${WORKDIR}/${MY_P}"
113 -
114 -dual_scripts() {
115 - src_remove_dual perl-core/Archive-Tar 2.240.0 ptar ptardiff ptargrep
116 - src_remove_dual perl-core/CPAN 2.180.0 cpan
117 - src_remove_dual perl-core/Digest-SHA 5.960.0 shasum
118 - src_remove_dual perl-core/Encode 2.880.0 enc2xs piconv
119 - src_remove_dual perl-core/ExtUtils-MakeMaker 7.240.0 instmodsh
120 - src_remove_dual perl-core/ExtUtils-ParseXS 3.340.0 xsubpp
121 - src_remove_dual perl-core/IO-Compress 2.74.0 zipdetails
122 - src_remove_dual perl-core/JSON-PP 2.274.0.200_rc json_pp
123 - src_remove_dual perl-core/Module-CoreList 5.201.709.222.600_rc corelist
124 - src_remove_dual perl-core/Pod-Parser 1.630.0 pod2usage podchecker podselect
125 - src_remove_dual perl-core/Pod-Perldoc 3.280.0 perldoc
126 - src_remove_dual perl-core/Test-Harness 3.380.0 prove
127 - src_remove_dual perl-core/podlators 4.90.0 pod2man pod2text
128 - src_remove_dual_man perl-core/podlators 4.90.0 /usr/share/man/man1/perlpodstyle.1
129 -}
130 -
131 -check_rebuild() {
132 - # Fresh install
133 - if [[ -z "${REPLACING_VERSIONS}" ]]; then
134 - return 0;
135 - # Major Upgrade
136 - # doesn't matter if there's multiple copies, it still needs a rebuild
137 - # if the string is anything other than "5.CURRENTMAJOR"
138 - elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then
139 - echo ""
140 - ewarn "UPDATE THE PERL MODULES:"
141 - ewarn "After updating dev-lang/perl the installed Perl modules"
142 - ewarn "have to be re-installed. In most cases, this is done automatically"
143 - ewarn "by the package manager, but subsequent steps are still recommended"
144 - ewarn "to ensure system consistency."
145 - ewarn
146 - ewarn "You should start with a depclean to remove any unused perl dependencies"
147 - ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
148 - ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
149 - ewarn "Recommended: emerge --depclean -va"
150 - ewarn
151 - ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
152 - ewarn "remaining rebuilds portage may have missed."
153 - ewarn "Use: perl-cleaner --all"
154 - return 0;
155 -
156 - # Reinstall w/ USE Change
157 - elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
158 - ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
159 - ( use debug && ! has_version dev-lang/perl[debug] ) || \
160 - ( ! use debug && has_version dev-lang/perl[debug] ) ; then
161 - echo ""
162 - ewarn "TOGGLED USE-FLAGS WARNING:"
163 - ewarn "You changed one of the use-flags ithreads or debug."
164 - ewarn "You must rebuild all perl-modules installed."
165 - ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
166 - fi
167 -}
168 -
169 -pkg_setup() {
170 - case ${CHOST} in
171 - *-freebsd*) osname="freebsd" ;;
172 - *-dragonfly*) osname="dragonfly" ;;
173 - *-netbsd*) osname="netbsd" ;;
174 - *-openbsd*) osname="openbsd" ;;
175 - *-darwin*) osname="darwin" ;;
176 - *-interix*) osname="interix" ;;
177 - *-aix*) osname="aix" ;;
178 - *-cygwin*) osname="cygwin" ;;
179 - *) osname="linux" ;;
180 - esac
181 -
182 - myarch="${CHOST%%-*}-${osname}"
183 - if use debug ; then
184 - myarch+="-debug"
185 - fi
186 - if use ithreads ; then
187 - mythreading="-multi"
188 - myarch+="-thread"
189 - fi
190 -
191 - PRIV_BASE="/usr/$(get_libdir)/perl5"
192 - SITE_BASE="/usr/local/$(get_libdir)/perl5"
193 - VENDOR_BASE="/usr/$(get_libdir)/perl5/vendor_perl"
194 -
195 - LIBPERL="libperl$(get_libname ${MY_PV} )"
196 - PRIV_LIB="${PRIV_BASE}/${MY_PV}"
197 - ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}"
198 - SITE_LIB="${SITE_BASE}/${MY_PV}"
199 - SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}"
200 - VENDOR_LIB="${VENDOR_BASE}/${MY_PV}"
201 - VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}"
202 -
203 - dual_scripts
204 -}
205 -
206 -src_remove_dual_file() {
207 - local i pkg ver
208 - pkg="$1"
209 - ver="$2"
210 - shift 2
211 - case "${EBUILD_PHASE:-none}" in
212 - postinst|postrm)
213 - for i in "$@" ; do
214 - alternatives_auto_makesym "${i}" "${i}-[0-9]*"
215 - done
216 - ;;
217 - setup)
218 - for i in "$@" ; do
219 - if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
220 - has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
221 - break
222 - fi
223 - done
224 - ;;
225 - install)
226 - for i in "$@" ; do
227 - if ! [[ -f "${ED}"${i} ]] ; then
228 - ewarn "${i} does not exist!"
229 - continue
230 - fi
231 - mv "${ED}"${i}{,-${ver}-${P}} || die
232 - done
233 - ;;
234 - esac
235 -}
236 -
237 -src_remove_dual_man() {
238 - local i pkg ver ff
239 - pkg="$1"
240 - ver="$2"
241 - shift 2
242 - case "${EBUILD_PHASE:-none}" in
243 - postinst|postrm)
244 - for i in "$@" ; do
245 - ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
246 - ff=${ff##*${i#${i%.[0-9]}}}
247 - alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
248 - done
249 - ;;
250 - install)
251 - for i in "$@" ; do
252 - if ! [[ -f "${ED}"${i} ]] ; then
253 - ewarn "${i} does not exist!"
254 - continue
255 - fi
256 - mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
257 - done
258 - ;;
259 - esac
260 -}
261 -
262 -src_remove_dual() {
263 - local i pkg ver
264 - pkg="$1"
265 - ver="$2"
266 - shift 2
267 - for i in "$@" ; do
268 - src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
269 - src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
270 - done
271 -}
272 -
273 -src_prepare_update_patchlevel_h() {
274 - # Copied and modified from debian:
275 - # Copyright 2011 Niko Tyni
276 - # This program is free software; you can redistribute it and/or modify
277 - # it under the same terms as Perl itself.
278 - local patchdir="${WORKDIR}/patches"
279 - local prefix
280 - local patchoutput="patchlevel-gentoo.h"
281 -
282 - [[ -f ${patchdir}/series ]] || return 0
283 -
284 -while read patch
285 -do
286 - patchname=$(echo $patch | sed 's/\.diff$//')
287 - < $patchdir/$patch sed -e '/^Subject:/ { N; s/\n / / }' | sed -n -e '
288 -
289 - # massage the patch headers
290 - s|^Bug: .*https\?://rt\.perl\.org/.*id=\(.*\).*|[perl #\1]|; tprepend;
291 - s|^Bug: .*https\?://rt\.cpan\.org/.*id=\(.*\).*|[rt.cpan.org #\1]|; tprepend;
292 - s|^Bug-Gentoo: ||; tprepend;
293 - s/^\(Subject\|Description\): //; tappend;
294 - s|^Origin: .*http://perl5\.git\.perl\.org/perl\.git/commit\(diff\)\?/\(.......\).*|[\2]|; tprepend;
295 -
296 - # post-process at the end of input
297 - $ { x;
298 - # include the version number in the patchlevel.h description (if available)
299 - s/List packaged patches/&'" for ${PF}(#${PATCH_VER})"'/;
300 -
301 - # escape any backslashes and double quotes
302 - s|\\|\\\\|g; s|"|\\"|g;
303 -
304 - # add a prefix
305 - s|^|\t,"'"$prefix$patchname"' - |;
306 - # newlines away
307 - s/\n/ /g; s/ */ /g;
308 - # add a suffix
309 - s/ *$/"/; p
310 - };
311 - # stop all processing
312 - d;
313 - # label: append to the hold space
314 - :append H; d;
315 - # label: prepend to the hold space
316 - :prepend x; H; d;
317 - '
318 -done < "${WORKDIR}"/patches/series > "${S}/${patchoutput}"
319 -echo "${patchoutput}" >> "${S}/MANIFEST"
320 -}
321 -
322 -src_prepare_perlcross() {
323 - cp -a ../perl-cross-${CROSS_VER}/* . || die
324 -
325 - sed -i \
326 - -e 's/MakeMaker\.pm .*/MakeMaker.pm bf9174c70a0e50ff2fee4552c7df89b37d292da1/' \
327 - -e 's/MM_Unix\.pm .*/MM_Unix.pm b0ec308fe2d7dcfcef5732880db0fae1f4ea80fa/' \
328 - cnf/diffs/perl5-${PV}/customized.patch || die
329 -
330 - sed -i \
331 - -e 's|^lib/unicore/CombiningClass.pl pod/perluniprops.pod:|lib/unicore/CombiningClass.pl pod/perluniprops.pod: $(CONFIGPM)|' \
332 - Makefile || die
333 -
334 - # bug 604072
335 - MAKEOPTS+=" -j1"
336 - export MAKEOPTS
337 -}
338 -src_prepare_dynamic() {
339 - ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
340 - ln -s ${LIBPERL} libperl$(get_libname ) || die
341 -}
342 -
343 -src_prepare() {
344 - local patch
345 - EPATCH_OPTS+=" -p1"
346 - einfo "Applying patches from ${PATCH_BASE} ..."
347 - while read patch ; do
348 - EPATCH_SINGLE_MSG=" ${patch} ..."
349 - epatch "${WORKDIR}"/patches/${patch}
350 - done < "${WORKDIR}"/patches/series
351 -
352 - src_prepare_update_patchlevel_h
353 -
354 - tc-is-cross-compiler && src_prepare_perlcross
355 -
356 - tc-is-static-only || src_prepare_dynamic
357 -
358 - if use gdbm; then
359 - sed -i "s:INC => .*:INC => \"-I${EROOT}usr/include/gdbm\":g" \
360 - ext/NDBM_File/Makefile.PL || die
361 - fi
362 -
363 - default
364 -}
365 -
366 -myconf() {
367 - # the myconf array is declared in src_configure
368 - myconf=( "${myconf[@]}" "$@" )
369 -}
370 -
371 -src_configure() {
372 - declare -a myconf
373 -
374 - export LC_ALL="C"
375 - [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
376 -
377 - # some arches and -O do not mix :)
378 - use ppc && replace-flags -O? -O1
379 -
380 - # Perl has problems compiling with -Os in your flags with glibc
381 - use elibc_uclibc || replace-flags "-Os" "-O2"
382 -
383 - # xlocale.h is going away in glibc-2.26, so it's counterproductive
384 - # if we use it and include it in CORE/perl.h ... Perl builds just
385 - # fine with glibc and locale.h only.
386 - # However, the darwin prefix people have no locale.h ...
387 - use elibc_glibc && myconf -Ui_xlocale
388 -
389 - # This flag makes compiling crash in interesting ways
390 - filter-flags "-malign-double"
391 -
392 - # Fixes bug #97645
393 - use ppc && filter-flags "-mpowerpc-gpopt"
394 -
395 - # Fixes bug #143895 on gcc-4.1.1
396 - filter-flags "-fsched2-use-superblocks"
397 -
398 - use sparc && myconf -Ud_longdbl
399 -
400 - export BUILD_BZIP2=0
401 - export BZIP2_INCLUDE=${EROOT}/usr/include
402 - export BZIP2_LIB=${EROOT}/usr/$(get_libdir)
403 -
404 - export BUILD_ZLIB=False
405 - export ZLIB_INCLUDE=${EROOT}/usr/include
406 - export ZLIB_LIB=${EROOT}/usr/$(get_libdir)
407 -
408 - # allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
409 - myndbm='U'
410 - mygdbm='U'
411 - mydb='U'
412 - if use gdbm ; then
413 - mygdbm='D'
414 - if use berkdb ; then
415 - myndbm='D'
416 - fi
417 - fi
418 - if use berkdb ; then
419 - mydb='D'
420 - has_version '=sys-libs/db-1*' && myndbm='D'
421 - fi
422 -
423 - myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
424 -
425 - if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
426 - ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
427 - myconf -Ui_db -Ui_ndbm
428 - fi
429 -
430 - use ithreads && myconf -Dusethreads
431 -
432 - if use debug ; then
433 - append-cflags "-g"
434 - myconf -DDEBUGGING
435 - elif [[ ${CFLAGS} == *-g* ]] ; then
436 - myconf -DDEBUGGING=-g
437 - else
438 - myconf -DDEBUGGING=none
439 - fi
440 -
441 - # Autodiscover all old version directories, some of them will even be newer
442 - # if you downgrade
443 - if [[ -z ${PERL_OLDVERSEN} ]]; then
444 - PERL_OLDVERSEN="$(
445 - find "${EROOT%/}${PRIV_BASE}" "${EROOT%/}${SITE_BASE}" "${EROOT%/}${VENDOR_BASE}" \
446 - -maxdepth 1 -mindepth 1 -type d -regex '.*/5[.][0-9]+[.][0-9]+$' \
447 - -printf "%f " 2>/dev/null )"
448 - fi
449 - # Fixup versions, removing self match, fixing order and dupes
450 - PERL_OLDVERSEN="$(
451 - echo "${PERL_OLDVERSEN}" |\
452 - tr " " "\n" |\
453 - grep -vF "${DIST_VERSION%-RC}" |\
454 - sort -u -nr -t'.' -k1,1 -k2,2 -k3,3
455 - )"
456 -
457 - # Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string
458 - if [[ -n "${PERL_OLDVERSEN// }" ]]; then
459 - local inclist="$(
460 - for v in ${PERL_OLDVERSEN}; do
461 - has "${v}" ${PERL_BIN_OLDVERSEN} && echo -n "${v}/${myarch}${mythreading} ";
462 - echo -n "${v} ";
463 - done )"
464 - einfo "This version of perl may partially support modules previously"
465 - einfo "installed in any of the following paths:"
466 - for incpath in ${inclist}; do
467 - [[ -e "${EROOT%/}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${VENDOR_BASE}/${incpath}"
468 - [[ -e "${EROOT%/}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROO%/T}${PRIV_BASE}/${incpath}"
469 - [[ -e "${EROOT%/}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${SITE_BASE}/${incpath}"
470 - done
471 - einfo "This is a temporary measure and you should aim to cleanup these paths"
472 - einfo "via world updates and perl-cleaner"
473 - myconf -Dinc_version_list="${inclist}"
474 - fi
475 -
476 - [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
477 -
478 - # Make sure we can do the final link #523730, need to set deployment
479 - # target to override hardcoded 10.3 which breaks on modern OSX
480 - [[ ${CHOST} == *-darwin* ]] && \
481 - myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
482 -
483 - # Prefix: the host system needs not to follow Gentoo multilib stuff, and in
484 - # Prefix itself we don't do multilib either, so make sure perl can find
485 - # something compatible.
486 - if use prefix ; then
487 - # Set a hook to check for each detected library whether it actually works.
488 - export libscheck="
489 - ( echo 'main(){}' > '${T}'/conftest.c &&
490 - $(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
491 - ) || xxx=/dev/null"
492 -
493 - # Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
494 - local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
495 - myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
496 - elif [[ $(get_libdir) != "lib" ]] ; then
497 - # We need to use " and not ', as the written config.sh use ' ...
498 - myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
499 - fi
500 -
501 - # don't try building ODBM, bug #354453
502 - disabled_extensions="ODBM_File"
503 -
504 - if ! use gdbm ; then
505 - # workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
506 - disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
507 - fi
508 -
509 - myconf -Dnoextensions="${disabled_extensions}"
510 -
511 - [[ "${PV##*.}" == "9999" ]] && myconf -Dusedevel -Uversiononly
512 -
513 - [[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF}
514 - # allow fiddling via EXTRA_ECONF, bug 558070
515 - eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})"
516 -
517 - myconf \
518 - -Duseshrplib \
519 - -Darchname="${myarch}" \
520 - -Dcc="$(tc-getCC)" \
521 - -Doptimize="${CFLAGS}" \
522 - -Dldflags="${LDFLAGS}" \
523 - -Dprefix="${EPREFIX}"'/usr' \
524 - -Dsiteprefix="${EPREFIX}"'/usr/local' \
525 - -Dvendorprefix="${EPREFIX}"'/usr' \
526 - -Dscriptdir="${EPREFIX}"'/usr/bin' \
527 - -Dprivlib="${EPREFIX}${PRIV_LIB}" \
528 - -Darchlib="${EPREFIX}${ARCH_LIB}" \
529 - -Dsitelib="${EPREFIX}${SITE_LIB}" \
530 - -Dsitearch="${EPREFIX}${SITE_ARCH}" \
531 - -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
532 - -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
533 - -Dman1dir="${EPREFIX}"/usr/share/man/man1 \
534 - -Dman3dir="${EPREFIX}"/usr/share/man/man3 \
535 - -Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
536 - -Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
537 - -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
538 - -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
539 - -Dman1ext='1' \
540 - -Dman3ext='3pm' \
541 - -Dlibperl="${LIBPERL}" \
542 - -Dlocincpth="${EPREFIX}"'/usr/include ' \
543 - -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
544 - -Duselargefiles \
545 - -Dd_semctl_semun \
546 - -Dcf_by='Gentoo' \
547 - -Dmyhostname='localhost' \
548 - -Dperladmin='root@localhost' \
549 - -Ud_csh \
550 - -Dsh="${EPREFIX}"/bin/sh \
551 - -Dtargetsh="${EPREFIX}"/bin/sh \
552 - -Uusenm \
553 - "${myconf[@]}" \
554 - "${EXTRA_ECONF[@]}"
555 -
556 - if tc-is-cross-compiler; then
557 - ./configure \
558 - --target="${CHOST}" \
559 - --build="${CBUILD}" \
560 - -Dinstallprefix='' \
561 - -Dinstallusrbinperl='undef' \
562 - -Dusevendorprefix='define' \
563 - "${myconf[@]}" \
564 - || die "Unable to configure"
565 - else
566 - sh Configure \
567 - -des \
568 - -Dinstallprefix="${EPREFIX}"'/usr' \
569 - -Dinstallusrbinperl='n' \
570 - "${myconf[@]}" \
571 - || die "Unable to configure"
572 - fi
573 -}
574 -
575 -src_test() {
576 - export NO_GENTOO_NETWORK_TESTS=1;
577 - if [[ ${EUID} == 0 ]] ; then
578 - ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
579 - return 0
580 - fi
581 - use elibc_uclibc && export MAKEOPTS+=" -j1"
582 - TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed"
583 -}
584 -
585 -src_install() {
586 - local i
587 - local coredir="${ARCH_LIB}/CORE"
588 -
589 - emake DESTDIR="${D}" install
590 -
591 - rm -f "${ED}/usr/bin/perl${MY_PV}"
592 - ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die
593 -
594 - if ! tc-is-static-only ; then
595 - dolib.so "${ED}"${coredir}/${LIBPERL}
596 - rm -f "${ED}"${coredir}/${LIBPERL}
597 - ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
598 - ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
599 - ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
600 - ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
601 - ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
602 - fi
603 -
604 - rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
605 -
606 - # This removes ${D} from Config.pm
607 - for i in $(find "${D}" -iname "Config.pm" ) ; do
608 - einfo "Removing ${D} from ${i}..."
609 - sed -i -e "s:${D}::" "${i}" || die "Sed failed"
610 - done
611 -
612 - dodoc Changes* README AUTHORS
613 -
614 - if use doc ; then
615 - # HTML Documentation
616 - # We expect errors, warnings, and such with the following.
617 -
618 - dodir /usr/share/doc/${PF}/html
619 - LD_LIBRARY_PATH=. ./perl installhtml \
620 - --podroot='.' \
621 - --podpath='lib:ext:pod:vms' \
622 - --recurse \
623 - --htmldir="${ED}/usr/share/doc/${PF}/html"
624 - fi
625 -
626 - [[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local
627 -
628 - dual_scripts
629 -}
630 -
631 -pkg_preinst() {
632 - check_rebuild
633 -}
634 -
635 -pkg_postinst() {
636 - dual_scripts
637 -
638 - if [[ "${ROOT}" = "/" ]] ; then
639 - local INC DIR file
640 - INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
641 - einfo "Removing old .ph files"
642 - for DIR in ${INC} ; do
643 - if [[ -d "${DIR}" ]] ; then
644 - for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
645 - rm -f "${file}"
646 - einfo "<< ${file}"
647 - done
648 - fi
649 - done
650 - # Silently remove the now empty dirs
651 - for DIR in ${INC} ; do
652 - if [[ -d "${DIR}" ]] ; then
653 - find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
654 - fi
655 - done
656 -
657 - fi
658 -}
659 -
660 -pkg_postrm(){
661 - dual_scripts
662 -}
663
664 diff --git a/dev-lang/perl/perl-5.26.1-r2.ebuild b/dev-lang/perl/perl-5.26.1-r2.ebuild
665 deleted file mode 100644
666 index a913f5694db..00000000000
667 --- a/dev-lang/perl/perl-5.26.1-r2.ebuild
668 +++ /dev/null
669 @@ -1,637 +0,0 @@
670 -# Copyright 1999-2018 Gentoo Foundation
671 -# Distributed under the terms of the GNU General Public License v2
672 -
673 -EAPI=6
674 -
675 -inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing
676 -
677 -PATCH_VER=1
678 -CROSS_VER=1.1.7
679 -PATCH_BASE="perl-5.26.1-patches-${PATCH_VER}"
680 -
681 -DIST_AUTHOR=SHAY
682 -
683 -# Greatest first, don't include yourself
684 -# Devel point-releases are not ABI-intercompatible, but stable point releases are
685 -# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
686 -PERL_BIN_OLDVERSEN="5.26.0"
687 -if [[ "${PV##*.}" == "9999" ]]; then
688 - DIST_VERSION=5.26.1-RC1
689 -else
690 - DIST_VERSION="${PV/_rc/-RC}"
691 -fi
692 -SHORT_PV="${DIST_VERSION%.*}"
693 -# Even numbered major versions are ABI intercompatible
694 -# Odd numbered major versions are not
695 -if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
696 - SUBSLOT="${DIST_VERSION%-RC*}"
697 -else
698 - SUBSLOT="${DIST_VERSION%.*}"
699 -fi
700 -# Used only in tar paths
701 -MY_P="perl-${DIST_VERSION}"
702 -# Used in library paths
703 -MY_PV="${DIST_VERSION%-RC*}"
704 -
705 -DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
706 -
707 -SRC_URI="
708 - mirror://cpan/src/5.0/${MY_P}.tar.xz
709 - mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz
710 - https://github.com/gentoo-perl/perl-patchset/releases/download/${PATCH_BASE}/${PATCH_BASE}.tar.xz
711 - mirror://gentoo/${PATCH_BASE}.tar.xz
712 - https://dev.gentoo.org/~kentnl/distfiles/${PATCH_BASE}.tar.xz
713 - https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz
714 -"
715 -HOMEPAGE="https://www.perl.org/"
716 -
717 -LICENSE="|| ( Artistic GPL-1+ )"
718 -SLOT="0/${SUBSLOT}"
719 -
720 -if [[ "${PV##*.}" != "9999" ]]; then
721 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
722 -fi
723 -
724 -IUSE="berkdb debug doc gdbm ithreads"
725 -
726 -RDEPEND="
727 - berkdb? ( sys-libs/db:= )
728 - gdbm? ( >=sys-libs/gdbm-1.8.3:= )
729 - app-arch/bzip2
730 - sys-libs/zlib
731 -"
732 -DEPEND="${RDEPEND}
733 - !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
734 -"
735 -PDEPEND="
736 - >=app-admin/perl-cleaner-2.5
737 - >=virtual/perl-File-Temp-0.230.400-r2
738 - >=virtual/perl-Data-Dumper-2.154.0
739 - virtual/perl-Test-Harness
740 -"
741 -# bug 390719, bug 523624
742 -# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
743 -
744 -S="${WORKDIR}/${MY_P}"
745 -
746 -PATCHES=( "${FILESDIR}/perl-5.24-libnsl.patch" )
747 -
748 -dual_scripts() {
749 - src_remove_dual perl-core/Archive-Tar 2.240.0 ptar ptardiff ptargrep
750 - src_remove_dual perl-core/CPAN 2.180.0 cpan
751 - src_remove_dual perl-core/Digest-SHA 5.960.0 shasum
752 - src_remove_dual perl-core/Encode 2.880.0 enc2xs piconv
753 - src_remove_dual perl-core/ExtUtils-MakeMaker 7.240.0 instmodsh
754 - src_remove_dual perl-core/ExtUtils-ParseXS 3.340.0 xsubpp
755 - src_remove_dual perl-core/IO-Compress 2.74.0 zipdetails
756 - src_remove_dual perl-core/JSON-PP 2.274.0.200_rc json_pp
757 - src_remove_dual perl-core/Module-CoreList 5.201.709.222.600_rc corelist
758 - src_remove_dual perl-core/Pod-Parser 1.630.0 pod2usage podchecker podselect
759 - src_remove_dual perl-core/Pod-Perldoc 3.280.0 perldoc
760 - src_remove_dual perl-core/Test-Harness 3.380.0 prove
761 - src_remove_dual perl-core/podlators 4.90.0 pod2man pod2text
762 - src_remove_dual_man perl-core/podlators 4.90.0 /usr/share/man/man1/perlpodstyle.1
763 -}
764 -
765 -check_rebuild() {
766 - # Fresh install
767 - if [[ -z "${REPLACING_VERSIONS}" ]]; then
768 - return 0;
769 - # Major Upgrade
770 - # doesn't matter if there's multiple copies, it still needs a rebuild
771 - # if the string is anything other than "5.CURRENTMAJOR"
772 - elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then
773 - echo ""
774 - ewarn "UPDATE THE PERL MODULES:"
775 - ewarn "After updating dev-lang/perl the installed Perl modules"
776 - ewarn "have to be re-installed. In most cases, this is done automatically"
777 - ewarn "by the package manager, but subsequent steps are still recommended"
778 - ewarn "to ensure system consistency."
779 - ewarn
780 - ewarn "You should start with a depclean to remove any unused perl dependencies"
781 - ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
782 - ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
783 - ewarn "Recommended: emerge --depclean -va"
784 - ewarn
785 - ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
786 - ewarn "remaining rebuilds portage may have missed."
787 - ewarn "Use: perl-cleaner --all"
788 - return 0;
789 -
790 - # Reinstall w/ USE Change
791 - elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
792 - ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
793 - ( use debug && ! has_version dev-lang/perl[debug] ) || \
794 - ( ! use debug && has_version dev-lang/perl[debug] ) ; then
795 - echo ""
796 - ewarn "TOGGLED USE-FLAGS WARNING:"
797 - ewarn "You changed one of the use-flags ithreads or debug."
798 - ewarn "You must rebuild all perl-modules installed."
799 - ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
800 - fi
801 -}
802 -
803 -pkg_setup() {
804 - case ${CHOST} in
805 - *-freebsd*) osname="freebsd" ;;
806 - *-dragonfly*) osname="dragonfly" ;;
807 - *-netbsd*) osname="netbsd" ;;
808 - *-openbsd*) osname="openbsd" ;;
809 - *-darwin*) osname="darwin" ;;
810 - *-interix*) osname="interix" ;;
811 - *-aix*) osname="aix" ;;
812 - *-cygwin*) osname="cygwin" ;;
813 - *) osname="linux" ;;
814 - esac
815 -
816 - myarch="${CHOST%%-*}-${osname}"
817 - if use debug ; then
818 - myarch+="-debug"
819 - fi
820 - if use ithreads ; then
821 - mythreading="-multi"
822 - myarch+="-thread"
823 - fi
824 -
825 - PRIV_BASE="/usr/$(get_libdir)/perl5"
826 - SITE_BASE="/usr/local/$(get_libdir)/perl5"
827 - VENDOR_BASE="/usr/$(get_libdir)/perl5/vendor_perl"
828 -
829 - LIBPERL="libperl$(get_libname ${MY_PV} )"
830 - PRIV_LIB="${PRIV_BASE}/${MY_PV}"
831 - ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}"
832 - SITE_LIB="${SITE_BASE}/${MY_PV}"
833 - SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}"
834 - VENDOR_LIB="${VENDOR_BASE}/${MY_PV}"
835 - VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}"
836 -
837 - dual_scripts
838 -}
839 -
840 -src_remove_dual_file() {
841 - local i pkg ver
842 - pkg="$1"
843 - ver="$2"
844 - shift 2
845 - case "${EBUILD_PHASE:-none}" in
846 - postinst|postrm)
847 - for i in "$@" ; do
848 - alternatives_auto_makesym "${i}" "${i}-[0-9]*"
849 - done
850 - ;;
851 - setup)
852 - for i in "$@" ; do
853 - if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
854 - has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
855 - break
856 - fi
857 - done
858 - ;;
859 - install)
860 - for i in "$@" ; do
861 - if ! [[ -f "${ED}"${i} ]] ; then
862 - ewarn "${i} does not exist!"
863 - continue
864 - fi
865 - mv "${ED}"${i}{,-${ver}-${P}} || die
866 - done
867 - ;;
868 - esac
869 -}
870 -
871 -src_remove_dual_man() {
872 - local i pkg ver ff
873 - pkg="$1"
874 - ver="$2"
875 - shift 2
876 - case "${EBUILD_PHASE:-none}" in
877 - postinst|postrm)
878 - for i in "$@" ; do
879 - ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
880 - ff=${ff##*${i#${i%.[0-9]}}}
881 - alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
882 - done
883 - ;;
884 - install)
885 - for i in "$@" ; do
886 - if ! [[ -f "${ED}"${i} ]] ; then
887 - ewarn "${i} does not exist!"
888 - continue
889 - fi
890 - mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
891 - done
892 - ;;
893 - esac
894 -}
895 -
896 -src_remove_dual() {
897 - local i pkg ver
898 - pkg="$1"
899 - ver="$2"
900 - shift 2
901 - for i in "$@" ; do
902 - src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
903 - src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
904 - done
905 -}
906 -
907 -src_prepare_update_patchlevel_h() {
908 - # Copied and modified from debian:
909 - # Copyright 2011 Niko Tyni
910 - # This program is free software; you can redistribute it and/or modify
911 - # it under the same terms as Perl itself.
912 - local patchdir="${WORKDIR}/patches"
913 - local prefix
914 - local patchoutput="patchlevel-gentoo.h"
915 -
916 - [[ -f ${patchdir}/series ]] || return 0
917 -
918 -while read patch
919 -do
920 - patchname=$(echo $patch | sed 's/\.diff$//')
921 - < $patchdir/$patch sed -e '/^Subject:/ { N; s/\n / / }' | sed -n -e '
922 -
923 - # massage the patch headers
924 - s|^Bug: .*https\?://rt\.perl\.org/.*id=\(.*\).*|[perl #\1]|; tprepend;
925 - s|^Bug: .*https\?://rt\.cpan\.org/.*id=\(.*\).*|[rt.cpan.org #\1]|; tprepend;
926 - s|^Bug-Gentoo: ||; tprepend;
927 - s/^\(Subject\|Description\): //; tappend;
928 - s|^Origin: .*http://perl5\.git\.perl\.org/perl\.git/commit\(diff\)\?/\(.......\).*|[\2]|; tprepend;
929 -
930 - # post-process at the end of input
931 - $ { x;
932 - # include the version number in the patchlevel.h description (if available)
933 - s/List packaged patches/&'" for ${PF}(#${PATCH_VER})"'/;
934 -
935 - # escape any backslashes and double quotes
936 - s|\\|\\\\|g; s|"|\\"|g;
937 -
938 - # add a prefix
939 - s|^|\t,"'"$prefix$patchname"' - |;
940 - # newlines away
941 - s/\n/ /g; s/ */ /g;
942 - # add a suffix
943 - s/ *$/"/; p
944 - };
945 - # stop all processing
946 - d;
947 - # label: append to the hold space
948 - :append H; d;
949 - # label: prepend to the hold space
950 - :prepend x; H; d;
951 - '
952 -done < "${WORKDIR}"/patches/series > "${S}/${patchoutput}"
953 -echo "${patchoutput}" >> "${S}/MANIFEST"
954 -}
955 -
956 -src_prepare_perlcross() {
957 - cp -a ../perl-cross-${CROSS_VER}/* . || die
958 -
959 - sed -i \
960 - -e 's/MakeMaker\.pm .*/MakeMaker.pm bf9174c70a0e50ff2fee4552c7df89b37d292da1/' \
961 - -e 's/MM_Unix\.pm .*/MM_Unix.pm b0ec308fe2d7dcfcef5732880db0fae1f4ea80fa/' \
962 - cnf/diffs/perl5-${PV}/customized.patch || die
963 -
964 - sed -i \
965 - -e 's|^lib/unicore/CombiningClass.pl pod/perluniprops.pod:|lib/unicore/CombiningClass.pl pod/perluniprops.pod: $(CONFIGPM)|' \
966 - Makefile || die
967 -
968 - # bug 604072
969 - MAKEOPTS+=" -j1"
970 - export MAKEOPTS
971 -}
972 -src_prepare_dynamic() {
973 - ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
974 - ln -s ${LIBPERL} libperl$(get_libname ) || die
975 -}
976 -
977 -src_prepare() {
978 - local patch
979 - EPATCH_OPTS+=" -p1"
980 - einfo "Applying patches from ${PATCH_BASE} ..."
981 - while read patch ; do
982 - EPATCH_SINGLE_MSG=" ${patch} ..."
983 - epatch "${WORKDIR}"/patches/${patch}
984 - done < "${WORKDIR}"/patches/series
985 -
986 - src_prepare_update_patchlevel_h
987 -
988 - tc-is-cross-compiler && src_prepare_perlcross
989 -
990 - tc-is-static-only || src_prepare_dynamic
991 -
992 - if use gdbm; then
993 - sed -i "s:INC => .*:INC => \"-I${EROOT}usr/include/gdbm\":g" \
994 - ext/NDBM_File/Makefile.PL || die
995 - fi
996 -
997 - # Use errno.h from prefix rather than from host system, bug #645804
998 - if use prefix; then
999 - sed -i "/my..sysroot/s:'':'${EPREFIX}':" ext/Errno/Errno_pm.PL || die
1000 - fi
1001 -
1002 - if [[ ${CHOST} == *-solaris* ]] ; then
1003 - # do NOT mess with nsl, on Solaris this is always necessary,
1004 - # when -lsocket is used e.g. to get h_errno
1005 - PATCHES=( ${PATCHES[@]/*libnsl.patch/} )
1006 - fi
1007 - default
1008 -}
1009 -
1010 -myconf() {
1011 - # the myconf array is declared in src_configure
1012 - myconf=( "${myconf[@]}" "$@" )
1013 -}
1014 -
1015 -src_configure() {
1016 - declare -a myconf
1017 -
1018 - export LC_ALL="C"
1019 - [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
1020 -
1021 - # some arches and -O do not mix :)
1022 - use ppc && replace-flags -O? -O1
1023 -
1024 - # Perl has problems compiling with -Os in your flags with glibc
1025 - use elibc_uclibc || replace-flags "-Os" "-O2"
1026 -
1027 - # xlocale.h is going away in glibc-2.26, so it's counterproductive
1028 - # if we use it and include it in CORE/perl.h ... Perl builds just
1029 - # fine with glibc and locale.h only.
1030 - # However, the darwin prefix people have no locale.h ...
1031 - use elibc_glibc && myconf -Ui_xlocale
1032 -
1033 - # This flag makes compiling crash in interesting ways
1034 - filter-flags "-malign-double"
1035 -
1036 - # Fixes bug #97645
1037 - use ppc && filter-flags "-mpowerpc-gpopt"
1038 -
1039 - # Fixes bug #143895 on gcc-4.1.1
1040 - filter-flags "-fsched2-use-superblocks"
1041 -
1042 - use sparc && myconf -Ud_longdbl
1043 -
1044 - export BUILD_BZIP2=0
1045 - export BZIP2_INCLUDE=${EROOT}/usr/include
1046 - export BZIP2_LIB=${EROOT}/usr/$(get_libdir)
1047 -
1048 - export BUILD_ZLIB=False
1049 - export ZLIB_INCLUDE=${EROOT}/usr/include
1050 - export ZLIB_LIB=${EROOT}/usr/$(get_libdir)
1051 -
1052 - # allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
1053 - myndbm='U'
1054 - mygdbm='U'
1055 - mydb='U'
1056 - if use gdbm ; then
1057 - mygdbm='D'
1058 - if use berkdb ; then
1059 - myndbm='D'
1060 - fi
1061 - fi
1062 - if use berkdb ; then
1063 - mydb='D'
1064 - has_version '=sys-libs/db-1*' && myndbm='D'
1065 - fi
1066 -
1067 - myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
1068 -
1069 - if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
1070 - ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
1071 - myconf -Ui_db -Ui_ndbm
1072 - fi
1073 -
1074 - use ithreads && myconf -Dusethreads
1075 -
1076 - if use debug ; then
1077 - append-cflags "-g"
1078 - myconf -DDEBUGGING
1079 - elif [[ ${CFLAGS} == *-g* ]] ; then
1080 - myconf -DDEBUGGING=-g
1081 - else
1082 - myconf -DDEBUGGING=none
1083 - fi
1084 -
1085 - # Autodiscover all old version directories, some of them will even be newer
1086 - # if you downgrade
1087 - if [[ -z ${PERL_OLDVERSEN} ]]; then
1088 - PERL_OLDVERSEN="$(
1089 - find "${EROOT%/}${PRIV_BASE}" "${EROOT%/}${SITE_BASE}" "${EROOT%/}${VENDOR_BASE}" \
1090 - -maxdepth 1 -mindepth 1 -type d -regex '.*/5[.][0-9]+[.][0-9]+$' \
1091 - -printf "%f " 2>/dev/null )"
1092 - fi
1093 - # Fixup versions, removing self match, fixing order and dupes
1094 - PERL_OLDVERSEN="$(
1095 - echo "${PERL_OLDVERSEN}" |\
1096 - tr " " "\n" |\
1097 - grep -vF "${DIST_VERSION%-RC}" |\
1098 - sort -u -nr -t'.' -k1,1 -k2,2 -k3,3
1099 - )"
1100 -
1101 - # Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string
1102 - if [[ -n "${PERL_OLDVERSEN// }" ]]; then
1103 - local inclist="$(
1104 - for v in ${PERL_OLDVERSEN}; do
1105 - has "${v}" ${PERL_BIN_OLDVERSEN} && echo -n "${v}/${myarch}${mythreading} ";
1106 - echo -n "${v} ";
1107 - done )"
1108 - einfo "This version of perl may partially support modules previously"
1109 - einfo "installed in any of the following paths:"
1110 - for incpath in ${inclist}; do
1111 - [[ -e "${EROOT%/}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${VENDOR_BASE}/${incpath}"
1112 - [[ -e "${EROOT%/}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROO%/T}${PRIV_BASE}/${incpath}"
1113 - [[ -e "${EROOT%/}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${SITE_BASE}/${incpath}"
1114 - done
1115 - einfo "This is a temporary measure and you should aim to cleanup these paths"
1116 - einfo "via world updates and perl-cleaner"
1117 - myconf -Dinc_version_list="${inclist}"
1118 - fi
1119 -
1120 - [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
1121 -
1122 - # Make sure we can do the final link #523730, need to set deployment
1123 - # target to override hardcoded 10.3 which breaks on modern OSX
1124 - [[ ${CHOST} == *-darwin* ]] && \
1125 - myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
1126 -
1127 - # Prefix: the host system needs not to follow Gentoo multilib stuff, and in
1128 - # Prefix itself we don't do multilib either, so make sure perl can find
1129 - # something compatible.
1130 - if use prefix ; then
1131 - # Set a hook to check for each detected library whether it actually works.
1132 - export libscheck="
1133 - ( echo 'main(){}' > '${T}'/conftest.c &&
1134 - $(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
1135 - ) || xxx=/dev/null"
1136 -
1137 - # Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
1138 - local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
1139 - myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
1140 - elif [[ $(get_libdir) != "lib" ]] ; then
1141 - # We need to use " and not ', as the written config.sh use ' ...
1142 - myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
1143 - fi
1144 -
1145 - # don't try building ODBM, bug #354453
1146 - disabled_extensions="ODBM_File"
1147 -
1148 - if ! use gdbm ; then
1149 - # workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
1150 - disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
1151 - fi
1152 -
1153 - myconf -Dnoextensions="${disabled_extensions}"
1154 -
1155 - [[ "${PV##*.}" == "9999" ]] && myconf -Dusedevel -Uversiononly
1156 -
1157 - [[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF}
1158 - # allow fiddling via EXTRA_ECONF, bug 558070
1159 - eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})"
1160 -
1161 - myconf \
1162 - -Duseshrplib \
1163 - -Darchname="${myarch}" \
1164 - -Dcc="$(tc-getCC)" \
1165 - -Doptimize="${CFLAGS}" \
1166 - -Dldflags="${LDFLAGS}" \
1167 - -Dprefix="${EPREFIX}"'/usr' \
1168 - -Dsiteprefix="${EPREFIX}"'/usr/local' \
1169 - -Dvendorprefix="${EPREFIX}"'/usr' \
1170 - -Dscriptdir="${EPREFIX}"'/usr/bin' \
1171 - -Dprivlib="${EPREFIX}${PRIV_LIB}" \
1172 - -Darchlib="${EPREFIX}${ARCH_LIB}" \
1173 - -Dsitelib="${EPREFIX}${SITE_LIB}" \
1174 - -Dsitearch="${EPREFIX}${SITE_ARCH}" \
1175 - -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
1176 - -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
1177 - -Dman1dir="${EPREFIX}"/usr/share/man/man1 \
1178 - -Dman3dir="${EPREFIX}"/usr/share/man/man3 \
1179 - -Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
1180 - -Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
1181 - -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
1182 - -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
1183 - -Dman1ext='1' \
1184 - -Dman3ext='3pm' \
1185 - -Dlibperl="${LIBPERL}" \
1186 - -Dlocincpth="${EPREFIX}"'/usr/include ' \
1187 - -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
1188 - -Duselargefiles \
1189 - -Dd_semctl_semun \
1190 - -Dcf_by='Gentoo' \
1191 - -Dmyhostname='localhost' \
1192 - -Dperladmin='root@localhost' \
1193 - -Ud_csh \
1194 - -Dsh="${EPREFIX}"/bin/sh \
1195 - -Dtargetsh="${EPREFIX}"/bin/sh \
1196 - -Uusenm \
1197 - "${myconf[@]}" \
1198 - "${EXTRA_ECONF[@]}"
1199 -
1200 - if tc-is-cross-compiler; then
1201 - ./configure \
1202 - --target="${CHOST}" \
1203 - --build="${CBUILD}" \
1204 - -Dinstallprefix='' \
1205 - -Dinstallusrbinperl='undef' \
1206 - -Dusevendorprefix='define' \
1207 - "${myconf[@]}" \
1208 - || die "Unable to configure"
1209 - else
1210 - sh Configure \
1211 - -des \
1212 - -Dinstallprefix="${EPREFIX}"'/usr' \
1213 - -Dinstallusrbinperl='n' \
1214 - "${myconf[@]}" \
1215 - || die "Unable to configure"
1216 - fi
1217 -}
1218 -
1219 -src_test() {
1220 - export NO_GENTOO_NETWORK_TESTS=1;
1221 - if [[ ${EUID} == 0 ]] ; then
1222 - ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
1223 - return 0
1224 - fi
1225 - use elibc_uclibc && export MAKEOPTS+=" -j1"
1226 - TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed"
1227 -}
1228 -
1229 -src_install() {
1230 - local i
1231 - local coredir="${ARCH_LIB}/CORE"
1232 -
1233 - emake DESTDIR="${D}" install
1234 -
1235 - rm -f "${ED}/usr/bin/perl${MY_PV}"
1236 - ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die
1237 -
1238 - if ! tc-is-static-only ; then
1239 - dolib.so "${ED}"${coredir}/${LIBPERL}
1240 - rm -f "${ED}"${coredir}/${LIBPERL}
1241 - ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
1242 - ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
1243 - ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
1244 - ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
1245 - ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
1246 - fi
1247 -
1248 - rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
1249 -
1250 - # This removes ${D} from Config.pm
1251 - for i in $(find "${D}" -iname "Config.pm" ) ; do
1252 - einfo "Removing ${D} from ${i}..."
1253 - sed -i -e "s:${D}::" "${i}" || die "Sed failed"
1254 - done
1255 -
1256 - dodoc Changes* README AUTHORS
1257 -
1258 - if use doc ; then
1259 - # HTML Documentation
1260 - # We expect errors, warnings, and such with the following.
1261 -
1262 - dodir /usr/share/doc/${PF}/html
1263 - LD_LIBRARY_PATH=. ./perl installhtml \
1264 - --podroot='.' \
1265 - --podpath='lib:ext:pod:vms' \
1266 - --recurse \
1267 - --htmldir="${ED}/usr/share/doc/${PF}/html"
1268 - fi
1269 -
1270 - [[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local
1271 -
1272 - dual_scripts
1273 -}
1274 -
1275 -pkg_preinst() {
1276 - check_rebuild
1277 -}
1278 -
1279 -pkg_postinst() {
1280 - dual_scripts
1281 -
1282 - if [[ "${ROOT}" = "/" ]] ; then
1283 - local INC DIR file
1284 - INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
1285 - einfo "Removing old .ph files"
1286 - for DIR in ${INC} ; do
1287 - if [[ -d "${DIR}" ]] ; then
1288 - for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
1289 - rm -f "${file}"
1290 - einfo "<< ${file}"
1291 - done
1292 - fi
1293 - done
1294 - # Silently remove the now empty dirs
1295 - for DIR in ${INC} ; do
1296 - if [[ -d "${DIR}" ]] ; then
1297 - find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
1298 - fi
1299 - done
1300 -
1301 - fi
1302 -}
1303 -
1304 -pkg_postrm(){
1305 - dual_scripts
1306 -}