Gentoo Archives: gentoo-commits

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