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