Gentoo Archives: gentoo-commits

From: Kent Fredric <kentnl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: profiles/, dev-lang/perl/
Date: Tue, 10 Jul 2018 07:18:29
Message-Id: 1531207076.25755248c06fd6d61362137e1723f84cfe06c47d.kentnl@gentoo
1 commit: 25755248c06fd6d61362137e1723f84cfe06c47d
2 Author: Kent Fredric <kentnl <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 8 07:19:10 2018 +0000
4 Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 10 07:17:56 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25755248
7
8 dev-lang/perl: Bump to version 5.28.0 [masked]
9
10 Package-Manager: Portage-2.3.40, Repoman-2.3.9
11
12 dev-lang/perl/perl-5.28.0.ebuild | 642 +++++++++++++++++++++++++++++++++++++++
13 profiles/package.mask | 4 +
14 2 files changed, 646 insertions(+)
15
16 diff --git a/dev-lang/perl/perl-5.28.0.ebuild b/dev-lang/perl/perl-5.28.0.ebuild
17 new file mode 100644
18 index 00000000000..3fee6ac8677
19 --- /dev/null
20 +++ b/dev-lang/perl/perl-5.28.0.ebuild
21 @@ -0,0 +1,642 @@
22 +# Copyright 1999-2018 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=6
26 +
27 +inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing
28 +
29 +PATCH_VER=1
30 +CROSS_VER=1.1.9
31 +PATCH_BASE="perl-5.28.0-patches-${PATCH_VER}"
32 +
33 +DIST_AUTHOR=XSAWYERX
34 +
35 +# Greatest first, don't include yourself
36 +# Devel point-releases are not ABI-intercompatible, but stable point releases are
37 +# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
38 +PERL_BIN_OLDVERSEN=""
39 +if [[ "${PV##*.}" == "9999" ]]; then
40 + DIST_VERSION=5.28.0
41 +else
42 + DIST_VERSION="${PV/_rc/-RC}"
43 +fi
44 +SHORT_PV="${DIST_VERSION%.*}"
45 +# Even numbered major versions are ABI intercompatible
46 +# Odd numbered major versions are not
47 +if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
48 + SUBSLOT="${DIST_VERSION%-RC*}"
49 +else
50 + SUBSLOT="${DIST_VERSION%.*}"
51 +fi
52 +# Used only in tar paths
53 +MY_P="perl-${DIST_VERSION}"
54 +# Used in library paths
55 +MY_PV="${DIST_VERSION%-RC*}"
56 +
57 +DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
58 +
59 +SRC_URI="
60 + mirror://cpan/src/5.0/${MY_P}.tar.xz
61 + mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz
62 + https://github.com/gentoo-perl/perl-patchset/releases/download/${PATCH_BASE}/${PATCH_BASE}.tar.xz
63 + mirror://gentoo/${PATCH_BASE}.tar.xz
64 + https://dev.gentoo.org/~kentnl/distfiles/${PATCH_BASE}.tar.xz
65 + https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz
66 +"
67 +HOMEPAGE="https://www.perl.org/"
68 +
69 +LICENSE="|| ( Artistic GPL-1+ )"
70 +SLOT="0/${SUBSLOT}"
71 +
72 +if [[ "${PV##*.}" != "9999" ]]; then
73 +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"
74 +fi
75 +
76 +IUSE="berkdb debug doc gdbm ithreads"
77 +
78 +RDEPEND="
79 + berkdb? ( sys-libs/db:= )
80 + gdbm? ( >=sys-libs/gdbm-1.8.3:= )
81 + app-arch/bzip2
82 + sys-libs/zlib
83 +"
84 +DEPEND="${RDEPEND}
85 + !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
86 +"
87 +PDEPEND="
88 + >=app-admin/perl-cleaner-2.5
89 + >=virtual/perl-File-Temp-0.230.400-r2
90 + >=virtual/perl-Data-Dumper-2.154.0
91 + virtual/perl-Test-Harness
92 +"
93 +# bug 390719, bug 523624
94 +# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
95 +
96 +S="${WORKDIR}/${MY_P}"
97 +
98 +dual_scripts() {
99 + src_remove_dual perl-core/Archive-Tar 2.280.0 ptar ptardiff ptargrep
100 + src_remove_dual perl-core/CPAN 2.200.0 cpan
101 + src_remove_dual perl-core/Digest-SHA 6.10.0 shasum
102 + src_remove_dual perl-core/Encode 2.970.0 enc2xs piconv
103 + src_remove_dual perl-core/ExtUtils-MakeMaker 7.340.0 instmodsh
104 + src_remove_dual perl-core/ExtUtils-ParseXS 3.390.0 xsubpp
105 + src_remove_dual perl-core/IO-Compress 2.74.0 zipdetails
106 + src_remove_dual perl-core/JSON-PP 2.970.10 json_pp
107 + src_remove_dual perl-core/Module-CoreList 5.201.806.220 corelist
108 + src_remove_dual perl-core/Pod-Parser 1.630.0 pod2usage podchecker podselect
109 + src_remove_dual perl-core/Pod-Perldoc 3.280.100 perldoc
110 + src_remove_dual perl-core/Test-Harness 3.420.0 prove
111 + src_remove_dual perl-core/podlators 4.100.0 pod2man pod2text
112 + src_remove_dual_man perl-core/podlators 4.100.0 /usr/share/man/man1/perlpodstyle.1
113 +}
114 +
115 +check_rebuild() {
116 + # Fresh install
117 + if [[ -z "${REPLACING_VERSIONS}" ]]; then
118 + return 0;
119 + # Major Upgrade
120 + # doesn't matter if there's multiple copies, it still needs a rebuild
121 + # if the string is anything other than "5.CURRENTMAJOR"
122 + elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then
123 + echo ""
124 + ewarn "UPDATE THE PERL MODULES:"
125 + ewarn "After updating dev-lang/perl the installed Perl modules"
126 + ewarn "have to be re-installed. In most cases, this is done automatically"
127 + ewarn "by the package manager, but subsequent steps are still recommended"
128 + ewarn "to ensure system consistency."
129 + ewarn
130 + ewarn "You should start with a depclean to remove any unused perl dependencies"
131 + ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
132 + ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
133 + ewarn "Recommended: emerge --depclean -va"
134 + ewarn
135 + ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
136 + ewarn "remaining rebuilds portage may have missed."
137 + ewarn "Use: perl-cleaner --all"
138 + return 0;
139 +
140 + # Reinstall w/ USE Change
141 + elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
142 + ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
143 + ( use debug && ! has_version dev-lang/perl[debug] ) || \
144 + ( ! use debug && has_version dev-lang/perl[debug] ) ; then
145 + echo ""
146 + ewarn "TOGGLED USE-FLAGS WARNING:"
147 + ewarn "You changed one of the use-flags ithreads or debug."
148 + ewarn "You must rebuild all perl-modules installed."
149 + ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
150 + fi
151 +}
152 +
153 +pkg_setup() {
154 + case ${CHOST} in
155 + *-freebsd*) osname="freebsd" ;;
156 + *-dragonfly*) osname="dragonfly" ;;
157 + *-netbsd*) osname="netbsd" ;;
158 + *-openbsd*) osname="openbsd" ;;
159 + *-darwin*) osname="darwin" ;;
160 + *-interix*) osname="interix" ;;
161 + *-aix*) osname="aix" ;;
162 + *-cygwin*) osname="cygwin" ;;
163 + *) osname="linux" ;;
164 + esac
165 +
166 + myarch="${CHOST%%-*}-${osname}"
167 + if use debug ; then
168 + myarch+="-debug"
169 + fi
170 + if use ithreads ; then
171 + mythreading="-multi"
172 + myarch+="-thread"
173 + fi
174 +
175 + PRIV_BASE="/usr/$(get_libdir)/perl5"
176 + SITE_BASE="/usr/local/$(get_libdir)/perl5"
177 + VENDOR_BASE="/usr/$(get_libdir)/perl5/vendor_perl"
178 +
179 + LIBPERL="libperl$(get_libname ${MY_PV} )"
180 + PRIV_LIB="${PRIV_BASE}/${MY_PV}"
181 + ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}"
182 + SITE_LIB="${SITE_BASE}/${MY_PV}"
183 + SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}"
184 + VENDOR_LIB="${VENDOR_BASE}/${MY_PV}"
185 + VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}"
186 +
187 + dual_scripts
188 +}
189 +
190 +src_remove_dual_file() {
191 + local i pkg ver
192 + pkg="$1"
193 + ver="$2"
194 + shift 2
195 + case "${EBUILD_PHASE:-none}" in
196 + postinst|postrm)
197 + for i in "$@" ; do
198 + alternatives_auto_makesym "${i}" "${i}-[0-9]*"
199 + done
200 + ;;
201 + setup)
202 + for i in "$@" ; do
203 + if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
204 + has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
205 + break
206 + fi
207 + done
208 + ;;
209 + install)
210 + for i in "$@" ; do
211 + if ! [[ -f "${ED}"${i} ]] ; then
212 + ewarn "${i} does not exist!"
213 + continue
214 + fi
215 + mv "${ED}"${i}{,-${ver}-${P}} || die
216 + done
217 + ;;
218 + esac
219 +}
220 +
221 +src_remove_dual_man() {
222 + local i pkg ver ff
223 + pkg="$1"
224 + ver="$2"
225 + shift 2
226 + case "${EBUILD_PHASE:-none}" in
227 + postinst|postrm)
228 + for i in "$@" ; do
229 + ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
230 + ff=${ff##*${i#${i%.[0-9]}}}
231 + alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
232 + done
233 + ;;
234 + install)
235 + for i in "$@" ; do
236 + if ! [[ -f "${ED}"${i} ]] ; then
237 + ewarn "${i} does not exist!"
238 + continue
239 + fi
240 + mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
241 + done
242 + ;;
243 + esac
244 +}
245 +
246 +src_remove_dual() {
247 + local i pkg ver
248 + pkg="$1"
249 + ver="$2"
250 + shift 2
251 + for i in "$@" ; do
252 + src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
253 + src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
254 + done
255 +}
256 +
257 +src_prepare_update_patchlevel_h() {
258 + # Copied and modified from debian:
259 + # Copyright 2011 Niko Tyni
260 + # This program is free software; you can redistribute it and/or modify
261 + # it under the same terms as Perl itself.
262 + local patchdir="${WORKDIR}/patches"
263 + local prefix
264 + local patchoutput="patchlevel-gentoo.h"
265 +
266 + [[ -f ${patchdir}/series ]] || return 0
267 +
268 +while read patch
269 +do
270 + patchname=$(echo $patch | sed 's/\.diff$//')
271 + < $patchdir/$patch sed -e '/^Subject:/ { N; s/\n / / }' | sed -n -e '
272 +
273 + # massage the patch headers
274 + s|^Bug: .*https\?://rt\.perl\.org/.*id=\(.*\).*|[perl #\1]|; tprepend;
275 + s|^Bug: .*https\?://rt\.cpan\.org/.*id=\(.*\).*|[rt.cpan.org #\1]|; tprepend;
276 + s|^Bug-Gentoo: ||; tprepend;
277 + s/^\(Subject\|Description\): //; tappend;
278 + s|^Origin: .*http://perl5\.git\.perl\.org/perl\.git/commit\(diff\)\?/\(.......\).*|[\2]|; tprepend;
279 +
280 + # post-process at the end of input
281 + $ { x;
282 + # include the version number in the patchlevel.h description (if available)
283 + s/List packaged patches/&'" for ${PF}(#${PATCH_VER})"'/;
284 +
285 + # escape any backslashes and double quotes
286 + s|\\|\\\\|g; s|"|\\"|g;
287 +
288 + # add a prefix
289 + s|^|\t,"'"$prefix$patchname"' - |;
290 + # newlines away
291 + s/\n/ /g; s/ */ /g;
292 + # add a suffix
293 + s/ *$/"/; p
294 + };
295 + # stop all processing
296 + d;
297 + # label: append to the hold space
298 + :append H; d;
299 + # label: prepend to the hold space
300 + :prepend x; H; d;
301 + '
302 +done < "${WORKDIR}"/patches/series > "${S}/${patchoutput}"
303 +echo "${patchoutput}" >> "${S}/MANIFEST"
304 +}
305 +
306 +src_prepare_perlcross() {
307 + cp -a ../perl-cross-${CROSS_VER}/* . || die
308 +
309 + sed -i \
310 + -e 's/MakeMaker\.pm .*/MakeMaker.pm bf9174c70a0e50ff2fee4552c7df89b37d292da1/' \
311 + -e 's/MM_Unix\.pm .*/MM_Unix.pm b0ec308fe2d7dcfcef5732880db0fae1f4ea80fa/' \
312 + cnf/diffs/perl5-${PV}/customized.patch || die
313 +
314 + sed -i \
315 + -e 's|^lib/unicore/CombiningClass.pl pod/perluniprops.pod:|lib/unicore/CombiningClass.pl pod/perluniprops.pod: $(CONFIGPM)|' \
316 + Makefile || die
317 +
318 + # bug 604072
319 + MAKEOPTS+=" -j1"
320 + export MAKEOPTS
321 +}
322 +src_prepare_dynamic() {
323 + ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
324 + ln -s ${LIBPERL} libperl$(get_libname ) || die
325 +}
326 +
327 +src_prepare() {
328 + local patch
329 + EPATCH_OPTS+=" -p1"
330 +
331 + if [[ ${CHOST} == *-solaris* ]] ; then
332 + # do NOT mess with nsl, on Solaris this is always necessary,
333 + # when -lsocket is used e.g. to get h_errno
334 + sed -i '/gentoo\/no-nsl\.patch/d' "${WORKDIR}/patches/series" || die "Can't exclude libnsl patch"
335 + fi
336 +
337 + einfo "Applying patches from ${PATCH_BASE} ..."
338 + while read patch ; do
339 + EPATCH_SINGLE_MSG=" ${patch} ..."
340 + epatch "${WORKDIR}"/patches/${patch}
341 + done < "${WORKDIR}"/patches/series
342 +
343 + src_prepare_update_patchlevel_h
344 +
345 + tc-is-cross-compiler && src_prepare_perlcross
346 +
347 + tc-is-static-only || src_prepare_dynamic
348 +
349 + if use gdbm; then
350 + sed -i "s:INC => .*:INC => \"-I${EROOT}usr/include/gdbm\":g" \
351 + ext/NDBM_File/Makefile.PL || die
352 + fi
353 +
354 + # Use errno.h from prefix rather than from host system, bug #645804
355 + if use prefix && ! use prefix-guest; then
356 + sed -i "/my..sysroot/s:'':'${EPREFIX}':" ext/Errno/Errno_pm.PL || die
357 + fi
358 +
359 + default
360 +}
361 +
362 +myconf() {
363 + # the myconf array is declared in src_configure
364 + myconf=( "${myconf[@]}" "$@" )
365 +}
366 +
367 +src_configure() {
368 + declare -a myconf
369 +
370 + export LC_ALL="C"
371 + [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
372 +
373 + # some arches and -O do not mix :)
374 + use ppc && replace-flags -O? -O1
375 +
376 + # Perl has problems compiling with -Os in your flags with glibc
377 + use elibc_uclibc || replace-flags "-Os" "-O2"
378 +
379 + # xlocale.h is going away in glibc-2.26, so it's counterproductive
380 + # if we use it and include it in CORE/perl.h ... Perl builds just
381 + # fine with glibc and locale.h only.
382 + # However, the darwin prefix people have no locale.h ...
383 + use elibc_glibc && myconf -Ui_xlocale
384 +
385 + # This flag makes compiling crash in interesting ways
386 + filter-flags "-malign-double"
387 +
388 + # Fixes bug #97645
389 + use ppc && filter-flags "-mpowerpc-gpopt"
390 +
391 + # Fixes bug #143895 on gcc-4.1.1
392 + filter-flags "-fsched2-use-superblocks"
393 +
394 + # Generic LTO broken since 5.28, triggers EUMM failures
395 + filter-flags "-flto"
396 +
397 + use sparc && myconf -Ud_longdbl
398 +
399 + export BUILD_BZIP2=0
400 + export BZIP2_INCLUDE=${EROOT}/usr/include
401 + export BZIP2_LIB=${EROOT}/usr/$(get_libdir)
402 +
403 + export BUILD_ZLIB=False
404 + export ZLIB_INCLUDE=${EROOT}/usr/include
405 + export ZLIB_LIB=${EROOT}/usr/$(get_libdir)
406 +
407 + # allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
408 + myndbm='U'
409 + mygdbm='U'
410 + mydb='U'
411 + if use gdbm ; then
412 + mygdbm='D'
413 + if use berkdb ; then
414 + myndbm='D'
415 + fi
416 + fi
417 + if use berkdb ; then
418 + mydb='D'
419 + has_version '=sys-libs/db-1*' && myndbm='D'
420 + fi
421 +
422 + myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
423 +
424 + if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
425 + ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
426 + myconf -Ui_db -Ui_ndbm
427 + fi
428 +
429 + use ithreads && myconf -Dusethreads
430 +
431 + if use debug ; then
432 + append-cflags "-g"
433 + myconf -DDEBUGGING
434 + elif [[ ${CFLAGS} == *-g* ]] ; then
435 + myconf -DDEBUGGING=-g
436 + else
437 + myconf -DDEBUGGING=none
438 + fi
439 +
440 + # Autodiscover all old version directories, some of them will even be newer
441 + # if you downgrade
442 + if [[ -z ${PERL_OLDVERSEN} ]]; then
443 + PERL_OLDVERSEN="$(
444 + find "${EROOT%/}${PRIV_BASE}" "${EROOT%/}${SITE_BASE}" "${EROOT%/}${VENDOR_BASE}" \
445 + -maxdepth 1 -mindepth 1 -type d -regex '.*/5[.][0-9]+[.][0-9]+$' \
446 + -printf "%f " 2>/dev/null )"
447 + fi
448 + # Fixup versions, removing self match, fixing order and dupes
449 + PERL_OLDVERSEN="$(
450 + echo "${PERL_OLDVERSEN}" |\
451 + tr " " "\n" |\
452 + grep -vF "${DIST_VERSION%-RC}" |\
453 + sort -u -nr -t'.' -k1,1 -k2,2 -k3,3
454 + )"
455 +
456 + # Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string
457 + if [[ -n "${PERL_OLDVERSEN// }" ]]; then
458 + local inclist="$(
459 + for v in ${PERL_OLDVERSEN}; do
460 + has "${v}" ${PERL_BIN_OLDVERSEN} && echo -n "${v}/${myarch}${mythreading} ";
461 + echo -n "${v} ";
462 + done )"
463 + einfo "This version of perl may partially support modules previously"
464 + einfo "installed in any of the following paths:"
465 + for incpath in ${inclist}; do
466 + [[ -e "${EROOT%/}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${VENDOR_BASE}/${incpath}"
467 + [[ -e "${EROOT%/}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROO%/T}${PRIV_BASE}/${incpath}"
468 + [[ -e "${EROOT%/}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${SITE_BASE}/${incpath}"
469 + done
470 + einfo "This is a temporary measure and you should aim to cleanup these paths"
471 + einfo "via world updates and perl-cleaner"
472 + myconf -Dinc_version_list="${inclist}"
473 + fi
474 +
475 + [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
476 +
477 + # Make sure we can do the final link #523730, need to set deployment
478 + # target to override hardcoded 10.3 which breaks on modern OSX
479 + [[ ${CHOST} == *-darwin* ]] && \
480 + myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
481 +
482 + # Prefix: the host system needs not to follow Gentoo multilib stuff, and in
483 + # Prefix itself we don't do multilib either, so make sure perl can find
484 + # something compatible.
485 + if use prefix ; then
486 + # Set a hook to check for each detected library whether it actually works.
487 + export libscheck="
488 + ( echo 'main(){}' > '${T}'/conftest.c &&
489 + $(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
490 + ) || xxx=/dev/null"
491 +
492 + # Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
493 + local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
494 + myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
495 + elif [[ $(get_libdir) != "lib" ]] ; then
496 + # We need to use " and not ', as the written config.sh use ' ...
497 + myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
498 + fi
499 +
500 + # don't try building ODBM, bug #354453
501 + disabled_extensions="ODBM_File"
502 +
503 + if ! use gdbm ; then
504 + # workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
505 + disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
506 + fi
507 +
508 + myconf -Dnoextensions="${disabled_extensions}"
509 +
510 + [[ "${PV##*.}" == "9999" ]] && myconf -Dusedevel -Uversiononly
511 +
512 + [[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF}
513 + # allow fiddling via EXTRA_ECONF, bug 558070
514 + eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})"
515 +
516 + myconf \
517 + -Duseshrplib \
518 + -Darchname="${myarch}" \
519 + -Dcc="$(tc-getCC)" \
520 + -Doptimize="${CFLAGS}" \
521 + -Dldflags="${LDFLAGS}" \
522 + -Dprefix="${EPREFIX}"'/usr' \
523 + -Dsiteprefix="${EPREFIX}"'/usr/local' \
524 + -Dvendorprefix="${EPREFIX}"'/usr' \
525 + -Dscriptdir="${EPREFIX}"'/usr/bin' \
526 + -Dprivlib="${EPREFIX}${PRIV_LIB}" \
527 + -Darchlib="${EPREFIX}${ARCH_LIB}" \
528 + -Dsitelib="${EPREFIX}${SITE_LIB}" \
529 + -Dsitearch="${EPREFIX}${SITE_ARCH}" \
530 + -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
531 + -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
532 + -Dman1dir="${EPREFIX}"/usr/share/man/man1 \
533 + -Dman3dir="${EPREFIX}"/usr/share/man/man3 \
534 + -Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
535 + -Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
536 + -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
537 + -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
538 + -Dman1ext='1' \
539 + -Dman3ext='3pm' \
540 + -Dlibperl="${LIBPERL}" \
541 + -Dlocincpth="${EPREFIX}"'/usr/include ' \
542 + -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
543 + -Duselargefiles \
544 + -Dd_semctl_semun \
545 + -Dcf_by='Gentoo' \
546 + -Dmyhostname='localhost' \
547 + -Dperladmin='root@localhost' \
548 + -Ud_csh \
549 + -Dsh="${EPREFIX}"/bin/sh \
550 + -Dtargetsh="${EPREFIX}"/bin/sh \
551 + -Uusenm \
552 + "${myconf[@]}" \
553 + "${EXTRA_ECONF[@]}"
554 +
555 + if tc-is-cross-compiler; then
556 + ./configure \
557 + --target="${CHOST}" \
558 + --build="${CBUILD}" \
559 + -Dinstallprefix='' \
560 + -Dinstallusrbinperl='undef' \
561 + -Dusevendorprefix='define' \
562 + "${myconf[@]}" \
563 + || die "Unable to configure"
564 + else
565 + sh Configure \
566 + -des \
567 + -Dinstallprefix="${EPREFIX}"'/usr' \
568 + -Dinstallusrbinperl='n' \
569 + "${myconf[@]}" \
570 + || die "Unable to configure"
571 + fi
572 +}
573 +
574 +src_test() {
575 + export NO_GENTOO_NETWORK_TESTS=1;
576 + export GENTOO_ASSUME_SANDBOXED="${GENTOO_ASSUME_SANDBOXED:-1}"
577 + export GENTOO_NO_PORTING_TESTS="${GENTOO_NO_PORTING_TESTS:-1}"
578 + if [[ ${EUID} == 0 ]] ; then
579 + ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
580 + return 0
581 + fi
582 + use elibc_uclibc && export MAKEOPTS+=" -j1"
583 + TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed"
584 +}
585 +
586 +src_install() {
587 + local i
588 + local coredir="${ARCH_LIB}/CORE"
589 +
590 + emake DESTDIR="${D}" install
591 +
592 + rm -f "${ED}/usr/bin/perl${MY_PV}"
593 + ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die
594 +
595 + if ! tc-is-static-only ; then
596 + dolib.so "${ED}"${coredir}/${LIBPERL}
597 + rm -f "${ED}"${coredir}/${LIBPERL}
598 + ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
599 + ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
600 + ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
601 + ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
602 + ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
603 + fi
604 +
605 + rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
606 +
607 + # This removes ${D} from Config.pm
608 + for i in $(find "${D}" -iname "Config.pm" ) ; do
609 + einfo "Removing ${D} from ${i}..."
610 + sed -i -e "s:${D}::" "${i}" || die "Sed failed"
611 + done
612 +
613 + dodoc Changes* README AUTHORS
614 +
615 + if use doc ; then
616 + # HTML Documentation
617 + # We expect errors, warnings, and such with the following.
618 +
619 + dodir /usr/share/doc/${PF}/html
620 + LD_LIBRARY_PATH=. ./perl installhtml \
621 + --podroot='.' \
622 + --podpath='lib:ext:pod:vms' \
623 + --recurse \
624 + --htmldir="${ED}/usr/share/doc/${PF}/html"
625 + fi
626 +
627 + [[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local
628 +
629 + dual_scripts
630 +}
631 +
632 +pkg_preinst() {
633 + check_rebuild
634 +}
635 +
636 +pkg_postinst() {
637 + dual_scripts
638 +
639 + if [[ "${ROOT}" = "/" ]] ; then
640 + local INC DIR file
641 + INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
642 + einfo "Removing old .ph files"
643 + for DIR in ${INC} ; do
644 + if [[ -d "${DIR}" ]] ; then
645 + for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
646 + rm -f "${file}"
647 + einfo "<< ${file}"
648 + done
649 + fi
650 + done
651 + # Silently remove the now empty dirs
652 + for DIR in ${INC} ; do
653 + if [[ -d "${DIR}" ]] ; then
654 + find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
655 + fi
656 + done
657 +
658 + fi
659 +}
660 +
661 +pkg_postrm(){
662 + dual_scripts
663 +}
664
665 diff --git a/profiles/package.mask b/profiles/package.mask
666 index a3d01e98f55..e353fc495f4 100644
667 --- a/profiles/package.mask
668 +++ b/profiles/package.mask
669 @@ -29,6 +29,10 @@
670
671 #--- END OF EXAMPLES ---
672
673 +# Kent Fredric <kentnl@g.o> (10 Jul 2018)
674 +# Perl 5.28 Staging block
675 +=dev-lang/perl-5.28.0
676 +
677 # Aaron W. Swenson <titanofold@g.o> (9 Jul 2018)
678 # Hasn’t been updated in years, upstream’s download source is blank, and depends
679 # on an outdated twisted-core (Bug 660668). Removal after 2018-08-08.