Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: dev-lang/perl/files/, dev-lang/perl/
Date: Sat, 26 Dec 2020 13:41:49
Message-Id: 1608990088.bbe987a7090818fff67bf2e0d6fc7e31226ef507.grobian@gentoo
1 commit: bbe987a7090818fff67bf2e0d6fc7e31226ef507
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 26 13:41:28 2020 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 26 13:41:28 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=bbe987a7
7
8 dev-lang/perl: migrated to gx86
9
10 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
11
12 dev-lang/perl/Manifest | 3 -
13 dev-lang/perl/files/perl-5.26.2-hppa.patch | 105 ----
14 .../perl/files/perl-5.30.3-darwin-macos11.patch | 180 ------
15 dev-lang/perl/metadata.xml | 14 -
16 dev-lang/perl/perl-5.30.3-r1.ebuild | 664 ---------------------
17 5 files changed, 966 deletions(-)
18
19 diff --git a/dev-lang/perl/Manifest b/dev-lang/perl/Manifest
20 deleted file mode 100644
21 index d529a52ba0..0000000000
22 --- a/dev-lang/perl/Manifest
23 +++ /dev/null
24 @@ -1,3 +0,0 @@
25 -DIST perl-5.30.0-patches-1.tar.xz 17352 BLAKE2B 67eb1c4ce6ada27e05962d06fa9c5675ca1d22623b5fd172ce8ceaa17f2e51d61f9451955f9f6acf6d97ea7d71c72b583be1378ccbf9174c88580baec2049a48 SHA512 4fe1f2de5e72e56890858148d20b772df63dce34cb3977ec47d8ed5323c4843929130f660f1558c282c97e65efa1c6d2fdacf9e2dcc0ef1d487a0b69dbb5bbb4
26 -DIST perl-5.30.3.tar.xz 12375128 BLAKE2B ff0668c896e46ea35a1b8bd4a7d800c8668d6995185cd8c43fca332da2fa63965bb5276b2d5cf9738c0b7fb735140f6e33f1b4582899017903f86753065f417b SHA512 0ea62cf17532ee99217a218c39aa530472857c7a1982494f3a01693683062b4cdebe383a79f7b64452c713337b554ed5e0fd6eda018ea29e83c3538a13c24f3c
27 -DIST perl-cross-1.3.4.tar.gz 108461 BLAKE2B 28f207d235f51ebf681598cf85f7f16923574aafb593426a59d67578135ee3632efb12b9e1a672759195a79f80e49f5c929ec42b2b4571b1d36f5d8c8dceadc2 SHA512 7e1fc7b2b19d8c2e2fb8615e074e218b2e1a4d276b563ffabccfd0c7398bc8680fca96da89cc61d611993f38a2c67dfbb0201c58658e05437395ad8c00d31874
28
29 diff --git a/dev-lang/perl/files/perl-5.26.2-hppa.patch b/dev-lang/perl/files/perl-5.26.2-hppa.patch
30 deleted file mode 100644
31 index 83ed944353..0000000000
32 --- a/dev-lang/perl/files/perl-5.26.2-hppa.patch
33 +++ /dev/null
34 @@ -1,105 +0,0 @@
35 -https://bugs.gentoo.org/634162
36 -
37 -Source:
38 -https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869122
39 -
40 -Index: perl-5.26.0/op.c
41 -===================================================================
42 ---- perl-5.26.0.orig/op.c
43 -+++ perl-5.26.0/op.c
44 -@@ -14832,6 +14832,7 @@ Perl_custom_op_get_field(pTHX_ const OP
45 - SV *keysv;
46 - HE *he = NULL;
47 - XOP *xop;
48 -+ XOPRETANY any;
49 -
50 - static const XOP xop_null = { 0, 0, 0, 0, 0 };
51 -
52 -@@ -14874,58 +14875,37 @@ Perl_custom_op_get_field(pTHX_ const OP
53 - else
54 - xop = INT2PTR(XOP *, SvIV(HeVAL(he)));
55 - }
56 -- {
57 -- XOPRETANY any;
58 -- if(field == XOPe_xop_ptr) {
59 -- any.xop_ptr = xop;
60 -- } else {
61 -- const U32 flags = XopFLAGS(xop);
62 -- if(flags & field) {
63 -- switch(field) {
64 -- case XOPe_xop_name:
65 -- any.xop_name = xop->xop_name;
66 -- break;
67 -- case XOPe_xop_desc:
68 -- any.xop_desc = xop->xop_desc;
69 -- break;
70 -- case XOPe_xop_class:
71 -- any.xop_class = xop->xop_class;
72 -- break;
73 -- case XOPe_xop_peep:
74 -- any.xop_peep = xop->xop_peep;
75 -- break;
76 -- default:
77 -- NOT_REACHED; /* NOTREACHED */
78 -- break;
79 -- }
80 -- } else {
81 -- switch(field) {
82 -- case XOPe_xop_name:
83 -- any.xop_name = XOPd_xop_name;
84 -- break;
85 -- case XOPe_xop_desc:
86 -- any.xop_desc = XOPd_xop_desc;
87 -- break;
88 -- case XOPe_xop_class:
89 -- any.xop_class = XOPd_xop_class;
90 -- break;
91 -- case XOPe_xop_peep:
92 -- any.xop_peep = XOPd_xop_peep;
93 -- break;
94 -- default:
95 -- NOT_REACHED; /* NOTREACHED */
96 -- break;
97 -- }
98 -- }
99 -+
100 -+ if(field == XOPe_xop_ptr) {
101 -+ any.xop_ptr = xop;
102 -+ } else {
103 -+ const U32 flags = XopFLAGS(xop);
104 -+ switch(field) {
105 -+ case XOPe_xop_name:
106 -+ any.xop_name = (flags & field) ? xop->xop_name : XOPd_xop_name;
107 -+ break;
108 -+ case XOPe_xop_desc:
109 -+ any.xop_desc = (flags & field) ? xop->xop_desc : XOPd_xop_desc;
110 -+ break;
111 -+ case XOPe_xop_class:
112 -+ any.xop_class = (flags & field) ? xop->xop_class : XOPd_xop_class;
113 -+ break;
114 -+ case XOPe_xop_peep:
115 -+ any.xop_peep = (flags & field) ? xop->xop_peep : XOPd_xop_peep;
116 -+ break;
117 -+ default:
118 -+ NOT_REACHED; /* NOTREACHED */
119 -+ break;
120 - }
121 -- /* On some platforms (HP-UX, IA64) gcc emits a warning for this function:
122 -- * op.c: In function 'Perl_custom_op_get_field':
123 -- * op.c:...: warning: 'any.xop_name' may be used uninitialized in this function [-Wmaybe-uninitialized]
124 -- * This is because on those platforms (with -DEBUGGING) NOT_REACHED
125 -- * expands to assert(0), which expands to ((0) ? (void)0 :
126 -- * __assert(...)), and gcc doesn't know that __assert can never return. */
127 -- return any;
128 - }
129 -+
130 -+ /* On some platforms (HP-UX, IA64) gcc emits a warning for this function:
131 -+ * op.c: In function 'Perl_custom_op_get_field':
132 -+ * op.c:...: warning: 'any.xop_name' may be used uninitialized in this function [-Wmaybe-uninitialized]
133 -+ * This is because on those platforms (with -DEBUGGING) NOT_REACHED
134 -+ * expands to assert(0), which expands to ((0) ? (void)0 :
135 -+ * __assert(...)), and gcc doesn't know that __assert can never return. */
136 -+ return any;
137 - }
138 -
139 - /*
140
141 diff --git a/dev-lang/perl/files/perl-5.30.3-darwin-macos11.patch b/dev-lang/perl/files/perl-5.30.3-darwin-macos11.patch
142 deleted file mode 100644
143 index 73879b398c..0000000000
144 --- a/dev-lang/perl/files/perl-5.30.3-darwin-macos11.patch
145 +++ /dev/null
146 @@ -1,180 +0,0 @@
147 -https://github.com/Perl/perl5/pull/17946
148 -https://bugs.gentoo.org/757249
149 ----
150 -From b382aafc793fe1007f9058a5145a1d39d56cef70 Mon Sep 17 00:00:00 2001
151 -From: Adam Hartley <git@××××××××.com>
152 -Date: Mon, 6 Jul 2020 22:59:42 +0100
153 -Subject: [PATCH 1/7] Add 11.x support for darwin.sh
154 -
155 ----
156 - hints/darwin.sh | 4 ++--
157 - 1 file changed, 2 insertions(+), 2 deletions(-)
158 -
159 -diff --git a/hints/darwin.sh b/hints/darwin.sh
160 -index 0a91bc083c0..c0f06de1cab 100644
161 ---- a/hints/darwin.sh
162 -+++ b/hints/darwin.sh
163 -@@ -301,7 +301,7 @@ case "$osvers" in # Note: osvers is the kernel version, not the 10.x
164 - # We now use MACOSX_DEPLOYMENT_TARGET, if set, as an override by
165 - # capturing its value and adding it to the flags.
166 - case "$MACOSX_DEPLOYMENT_TARGET" in
167 -- 10.*)
168 -+ 10.* | 11.*)
169 - add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET
170 - add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET
171 - ;;
172 -@@ -327,7 +327,7 @@ EOM
173 - # "ProductVersion: 10.11" "10.11"
174 - prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'`
175 - case "$prodvers" in
176 -- 10.*)
177 -+ 10.* | 11.*)
178 - add_macosx_version_min ccflags $prodvers
179 - add_macosx_version_min ldflags $prodvers
180 - ;;
181 -
182 -From 960d1a5c4225d1dd12636a469e10a568464e4e7c Mon Sep 17 00:00:00 2001
183 -From: Adam Hartley <git@××××××××.com>
184 -Date: Wed, 8 Jul 2020 19:10:33 +0100
185 -Subject: [PATCH 3/7] Update error message
186 -
187 ----
188 - hints/darwin.sh | 2 +-
189 - 1 file changed, 1 insertion(+), 1 deletion(-)
190 -
191 -diff --git a/hints/darwin.sh b/hints/darwin.sh
192 -index c0f06de1cab..988b766c4f4 100644
193 ---- a/hints/darwin.sh
194 -+++ b/hints/darwin.sh
195 -@@ -313,7 +313,7 @@ case "$osvers" in # Note: osvers is the kernel version, not the 10.x
196 -
197 - *** Unexpected MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
198 - ***
199 --*** Please either set it to 10.something, or to empty.
200 -+*** Please either set it to 10.something, 11.something or to empty.
201 -
202 - EOM
203 - exit 1
204 -
205 -From d633cced1d5174e19c5f2234a9fb4c7603cfb9db Mon Sep 17 00:00:00 2001
206 -From: Adam Hartley <git@××××××××.com>
207 -Date: Sat, 11 Jul 2020 11:41:27 +0100
208 -Subject: [PATCH 4/7] Update deprecated syscall check for 11.x and greater
209 -
210 ----
211 - hints/darwin.sh | 4 ++--
212 - 1 file changed, 2 insertions(+), 2 deletions(-)
213 -
214 -diff --git a/hints/darwin.sh b/hints/darwin.sh
215 -index 988b766c4f4..4f73a9995e7 100644
216 ---- a/hints/darwin.sh
217 -+++ b/hints/darwin.sh
218 -@@ -342,11 +342,11 @@ EOM
219 - exit 1
220 - esac
221 -
222 -- # The X in 10.X
223 -+ prodvers_major=$(echo $prodvers|awk -F. '{print $1}')
224 - prodvers_minor=$(echo $prodvers|awk -F. '{print $2}')
225 -
226 - # macOS (10.12) deprecated syscall().
227 -- if [ "$prodvers_minor" -ge 12 ]; then
228 -+ if [[ ( "$prodvers_minor" -ge 12 && "$prodvers_major" -eq 10 ) || "$prodvers_major" -ge 11 ]]; then
229 - d_syscall='undef'
230 - # If deploying to pre-10.12, suppress Time::HiRes's detection of the system clock_gettime()
231 - case "$MACOSX_DEPLOYMENT_TARGET" in
232 -
233 -From 9c3890f8521a7db6d9b2aa21561c7d0dae9fb91d Mon Sep 17 00:00:00 2001
234 -From: Adam Hartley <BytesGuy@××××××××××××××××××××.com>
235 -Date: Wed, 22 Jul 2020 13:15:30 +0100
236 -Subject: [PATCH 5/7] Simplify syscall check
237 -
238 ----
239 - hints/darwin.sh | 7 +++----
240 - 1 file changed, 3 insertions(+), 4 deletions(-)
241 -
242 -diff --git a/hints/darwin.sh b/hints/darwin.sh
243 -index 4f73a9995e7..40c84cf267a 100644
244 ---- a/hints/darwin.sh
245 -+++ b/hints/darwin.sh
246 -@@ -342,11 +342,10 @@ EOM
247 - exit 1
248 - esac
249 -
250 -- prodvers_major=$(echo $prodvers|awk -F. '{print $1}')
251 -- prodvers_minor=$(echo $prodvers|awk -F. '{print $2}')
252 -+ darwin_major=$(echo $osvers|awk -F. '{print $1}')
253 -
254 -- # macOS (10.12) deprecated syscall().
255 -- if [[ ( "$prodvers_minor" -ge 12 && "$prodvers_major" -eq 10 ) || "$prodvers_major" -ge 11 ]]; then
256 -+ # macOS 10.12 (darwin 6.0.0) deprecated syscall().
257 -+ if [ "$darwin_major" -ge 6 ]; then
258 - d_syscall='undef'
259 - # If deploying to pre-10.12, suppress Time::HiRes's detection of the system clock_gettime()
260 - case "$MACOSX_DEPLOYMENT_TARGET" in
261 -
262 -From 99ff8934992102a3db63805e8ba9710577de164e Mon Sep 17 00:00:00 2001
263 -From: Adam Hartley <BytesGuy@××××××××××××××××××××.com>
264 -Date: Wed, 22 Jul 2020 13:15:53 +0100
265 -Subject: [PATCH 6/7] Update darwin.sh
266 -
267 ----
268 - hints/darwin.sh | 4 ++--
269 - 1 file changed, 2 insertions(+), 2 deletions(-)
270 -
271 -diff --git a/hints/darwin.sh b/hints/darwin.sh
272 -index 40c84cf267a..1709d224f7c 100644
273 ---- a/hints/darwin.sh
274 -+++ b/hints/darwin.sh
275 -@@ -344,8 +344,8 @@ EOM
276 -
277 - darwin_major=$(echo $osvers|awk -F. '{print $1}')
278 -
279 -- # macOS 10.12 (darwin 6.0.0) deprecated syscall().
280 -- if [ "$darwin_major" -ge 6 ]; then
281 -+ # macOS 10.12 (darwin 16.0.0) deprecated syscall().
282 -+ if [ "$darwin_major" -ge 16 ]; then
283 - d_syscall='undef'
284 - # If deploying to pre-10.12, suppress Time::HiRes's detection of the system clock_gettime()
285 - case "$MACOSX_DEPLOYMENT_TARGET" in
286 -
287 -From 1b712e4b359d9508461a0a832d06baa6e589b955 Mon Sep 17 00:00:00 2001
288 -From: Adam Hartley <BytesGuy@××××××××××××××××××××.com>
289 -Date: Thu, 23 Jul 2020 19:53:07 +0100
290 -Subject: [PATCH 7/7] Future proof version check
291 -
292 ----
293 - hints/darwin.sh | 6 +++---
294 - 1 file changed, 3 insertions(+), 3 deletions(-)
295 -
296 -diff --git a/hints/darwin.sh b/hints/darwin.sh
297 -index 1709d224f7c..fdfbdd4a3b9 100644
298 ---- a/hints/darwin.sh
299 -+++ b/hints/darwin.sh
300 -@@ -301,7 +301,7 @@ case "$osvers" in # Note: osvers is the kernel version, not the 10.x
301 - # We now use MACOSX_DEPLOYMENT_TARGET, if set, as an override by
302 - # capturing its value and adding it to the flags.
303 - case "$MACOSX_DEPLOYMENT_TARGET" in
304 -- 10.* | 11.*)
305 -+ [1-9][0-9].*)
306 - add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET
307 - add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET
308 - ;;
309 -@@ -313,7 +313,7 @@ case "$osvers" in # Note: osvers is the kernel version, not the 10.x
310 -
311 - *** Unexpected MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
312 - ***
313 --*** Please either set it to 10.something, 11.something or to empty.
314 -+*** Please either set it to a valid macOS version number (e.g., 10.15) or to empty.
315 -
316 - EOM
317 - exit 1
318 -@@ -327,7 +327,7 @@ EOM
319 - # "ProductVersion: 10.11" "10.11"
320 - prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'`
321 - case "$prodvers" in
322 -- 10.* | 11.*)
323 -+ [1-9][0-9].*)
324 - add_macosx_version_min ccflags $prodvers
325 - add_macosx_version_min ldflags $prodvers
326 - ;;
327
328 diff --git a/dev-lang/perl/metadata.xml b/dev-lang/perl/metadata.xml
329 deleted file mode 100644
330 index 0edcddc60b..0000000000
331 --- a/dev-lang/perl/metadata.xml
332 +++ /dev/null
333 @@ -1,14 +0,0 @@
334 -<?xml version='1.0' encoding='UTF-8'?>
335 -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
336 -<pkgmetadata>
337 - <maintainer type="project">
338 - <email>perl@g.o</email>
339 - <name>Gentoo Perl Project</name>
340 - </maintainer>
341 - <use>
342 - <flag name="ithreads">Enable Perl threads, has some compatibility problems</flag>
343 - </use>
344 - <upstream>
345 - <remote-id type="github">arsv/perl-cross</remote-id>
346 - </upstream>
347 -</pkgmetadata>
348
349 diff --git a/dev-lang/perl/perl-5.30.3-r1.ebuild b/dev-lang/perl/perl-5.30.3-r1.ebuild
350 deleted file mode 100644
351 index 50e4fc346a..0000000000
352 --- a/dev-lang/perl/perl-5.30.3-r1.ebuild
353 +++ /dev/null
354 @@ -1,664 +0,0 @@
355 -# Copyright 1999-2020 Gentoo Authors
356 -# Distributed under the terms of the GNU General Public License v2
357 -
358 -EAPI=6
359 -
360 -inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing
361 -
362 -PATCH_VER=1
363 -CROSS_VER=1.3.4
364 -PATCH_BASE="perl-5.30.0-patches-${PATCH_VER}"
365 -PATCH_DEV=dilfridge
366 -
367 -DIST_AUTHOR=XSAWYERX
368 -
369 -# Greatest first, don't include yourself
370 -# Devel point-releases are not ABI-intercompatible, but stable point releases are
371 -# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
372 -PERL_BIN_OLDVERSEN="5.30.0 5.30.1 5.30.2"
373 -
374 -if [[ "${PV##*.}" == "9999" ]]; then
375 - DIST_VERSION=5.30.0
376 -else
377 - DIST_VERSION="${PV/_rc/-RC}"
378 -fi
379 -SHORT_PV="${DIST_VERSION%.*}"
380 -# Even numbered major versions are ABI intercompatible
381 -# Odd numbered major versions are not
382 -if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
383 - SUBSLOT="${DIST_VERSION%-RC*}"
384 -else
385 - SUBSLOT="${DIST_VERSION%.*}"
386 -fi
387 -# Used only in tar paths
388 -MY_P="perl-${DIST_VERSION}"
389 -# Used in library paths
390 -MY_PV="${DIST_VERSION%-RC*}"
391 -
392 -DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
393 -
394 -SRC_URI="
395 - mirror://cpan/src/5.0/${MY_P}.tar.xz
396 - mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz
397 - https://github.com/gentoo-perl/perl-patchset/releases/download/${PATCH_BASE}/${PATCH_BASE}.tar.xz
398 - mirror://gentoo/${PATCH_BASE}.tar.xz
399 - https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PATCH_BASE}.tar.xz
400 - https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz
401 -"
402 -HOMEPAGE="https://www.perl.org/"
403 -
404 -LICENSE="|| ( Artistic GPL-1+ )"
405 -SLOT="0/${SUBSLOT}"
406 -
407 -if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then
408 -KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
409 -fi
410 -
411 -IUSE="berkdb debug doc gdbm ithreads minimal"
412 -
413 -RDEPEND="
414 - berkdb? ( sys-libs/db:= )
415 - gdbm? ( >=sys-libs/gdbm-1.8.3:= )
416 - app-arch/bzip2
417 - sys-libs/zlib
418 - virtual/libcrypt:=
419 -"
420 -DEPEND="${RDEPEND}"
421 -PDEPEND="
422 - !minimal? (
423 - >=app-admin/perl-cleaner-2.5
424 - >=virtual/perl-File-Temp-0.230.400-r2
425 - >=virtual/perl-Data-Dumper-2.154.0
426 - virtual/perl-Test-Harness
427 - )
428 -"
429 -# bug 390719, bug 523624
430 -# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
431 -
432 -S="${WORKDIR}/${MY_P}"
433 -
434 -dual_scripts() {
435 - src_remove_dual perl-core/Archive-Tar 2.320.0 ptar ptardiff ptargrep
436 - src_remove_dual perl-core/CPAN 2.220.0 cpan
437 - src_remove_dual perl-core/Digest-SHA 6.20.0 shasum
438 - src_remove_dual perl-core/Encode 3.10.0 enc2xs piconv
439 - src_remove_dual perl-core/ExtUtils-MakeMaker 7.340.0 instmodsh
440 - src_remove_dual perl-core/ExtUtils-ParseXS 3.400.0 xsubpp
441 - src_remove_dual perl-core/IO-Compress 2.84.0 zipdetails
442 - src_remove_dual perl-core/JSON-PP 4.20.0 json_pp
443 - src_remove_dual perl-core/Module-CoreList 5.202.6.13.0_rc corelist
444 - src_remove_dual perl-core/Pod-Parser 1.630.0 pod2usage podchecker podselect
445 - src_remove_dual perl-core/Pod-Perldoc 3.280.100 perldoc
446 - src_remove_dual perl-core/Test-Harness 3.420.0 prove
447 - src_remove_dual perl-core/podlators 4.110.0 pod2man pod2text
448 - src_remove_dual_man perl-core/podlators 4.110.0 /usr/share/man/man1/perlpodstyle.1
449 -}
450 -
451 -check_rebuild() {
452 - # Fresh install
453 - if [[ -z "${REPLACING_VERSIONS}" ]]; then
454 - return 0;
455 - # Major Upgrade
456 - # doesn't matter if there's multiple copies, it still needs a rebuild
457 - # if the string is anything other than "5.CURRENTMAJOR"
458 - elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then
459 - echo ""
460 - ewarn "UPDATE THE PERL MODULES:"
461 - ewarn "After updating dev-lang/perl the installed Perl modules"
462 - ewarn "have to be re-installed. In most cases, this is done automatically"
463 - ewarn "by the package manager, but subsequent steps are still recommended"
464 - ewarn "to ensure system consistency."
465 - ewarn
466 - ewarn "You should start with a depclean to remove any unused perl dependencies"
467 - ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
468 - ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
469 - ewarn "Recommended: emerge --depclean -va"
470 - ewarn
471 - ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
472 - ewarn "remaining rebuilds portage may have missed."
473 - ewarn "Use: perl-cleaner --all"
474 - return 0;
475 -
476 - # Reinstall w/ USE Change
477 - elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
478 - ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
479 - ( use debug && ! has_version dev-lang/perl[debug] ) || \
480 - ( ! use debug && has_version dev-lang/perl[debug] ) ; then
481 - echo ""
482 - ewarn "TOGGLED USE-FLAGS WARNING:"
483 - ewarn "You changed one of the use-flags ithreads or debug."
484 - ewarn "You must rebuild all perl-modules installed."
485 - ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
486 - fi
487 -}
488 -
489 -pkg_setup() {
490 - case ${CHOST} in
491 - *-freebsd*) osname="freebsd" ;;
492 - *-dragonfly*) osname="dragonfly" ;;
493 - *-netbsd*) osname="netbsd" ;;
494 - *-openbsd*) osname="openbsd" ;;
495 - *-darwin*) osname="darwin" ;;
496 - *-solaris*) osname="solaris" ;;
497 - *-cygwin*) osname="cygwin" ;;
498 - *) osname="linux" ;;
499 - esac
500 -
501 - myarch="${CHOST%%-*}-${osname}"
502 - if use debug ; then
503 - myarch+="-debug"
504 - fi
505 - if use ithreads ; then
506 - mythreading="-multi"
507 - myarch+="-thread"
508 - fi
509 -
510 - PRIV_BASE="/usr/$(get_libdir)/perl5"
511 - SITE_BASE="/usr/local/$(get_libdir)/perl5"
512 - VENDOR_BASE="/usr/$(get_libdir)/perl5/vendor_perl"
513 -
514 - LIBPERL="libperl$(get_libname ${MY_PV} )"
515 - PRIV_LIB="${PRIV_BASE}/${MY_PV}"
516 - ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}"
517 - SITE_LIB="${SITE_BASE}/${MY_PV}"
518 - SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}"
519 - VENDOR_LIB="${VENDOR_BASE}/${MY_PV}"
520 - VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}"
521 -
522 - dual_scripts
523 -}
524 -
525 -src_remove_dual_file() {
526 - local i pkg ver
527 - pkg="$1"
528 - ver="$2"
529 - shift 2
530 - case "${EBUILD_PHASE:-none}" in
531 - postinst|postrm)
532 - for i in "$@" ; do
533 - alternatives_auto_makesym "${i}" "${i}-[0-9]*"
534 - done
535 - ;;
536 - setup)
537 - for i in "$@" ; do
538 - if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
539 - has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
540 - break
541 - fi
542 - done
543 - ;;
544 - install)
545 - for i in "$@" ; do
546 - if ! [[ -f "${ED}"${i} ]] ; then
547 - ewarn "${i} does not exist!"
548 - continue
549 - fi
550 - mv "${ED}"${i}{,-${ver}-${P}} || die
551 - done
552 - ;;
553 - esac
554 -}
555 -
556 -src_remove_dual_man() {
557 - local i pkg ver ff
558 - pkg="$1"
559 - ver="$2"
560 - shift 2
561 - case "${EBUILD_PHASE:-none}" in
562 - postinst|postrm)
563 - for i in "$@" ; do
564 - ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
565 - ff=${ff##*${i#${i%.[0-9]}}}
566 - alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
567 - done
568 - ;;
569 - install)
570 - for i in "$@" ; do
571 - if ! [[ -f "${ED}"${i} ]] ; then
572 - ewarn "${i} does not exist!"
573 - continue
574 - fi
575 - mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
576 - done
577 - ;;
578 - esac
579 -}
580 -
581 -src_remove_dual() {
582 - local i pkg ver
583 - pkg="$1"
584 - ver="$2"
585 - shift 2
586 - for i in "$@" ; do
587 - src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
588 - src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
589 - done
590 -}
591 -
592 -src_prepare_update_patchlevel_h() {
593 - # Copied and modified from debian:
594 - # Copyright 2011 Niko Tyni
595 - # This program is free software; you can redistribute it and/or modify
596 - # it under the same terms as Perl itself.
597 - local patchdir="${WORKDIR}/patches"
598 - local prefix
599 - local patchoutput="patchlevel-gentoo.h"
600 -
601 - [[ -f ${patchdir}/series ]] || return 0
602 -
603 -while read patch
604 -do
605 - patchname=$(echo $patch | sed 's/\.diff$//')
606 - < $patchdir/$patch sed -e '/^Subject:/ { N; s/\n / / }' | sed -n -e '
607 -
608 - # massage the patch headers
609 - s|^Bug: .*https\?://rt\.perl\.org/.*id=\(.*\).*|[perl #\1]|; tprepend;
610 - s|^Bug: .*https\?://rt\.cpan\.org/.*id=\(.*\).*|[rt.cpan.org #\1]|; tprepend;
611 - s|^Bug-Gentoo: ||; tprepend;
612 - s/^\(Subject\|Description\): //; tappend;
613 - s|^Origin: .*http://perl5\.git\.perl\.org/perl\.git/commit\(diff\)\?/\(.......\).*|[\2]|; tprepend;
614 -
615 - # post-process at the end of input
616 - $ { x;
617 - # include the version number in the patchlevel.h description (if available)
618 - s/List packaged patches/&'" for ${PF}(#${PATCH_VER})"'/;
619 -
620 - # escape any backslashes and double quotes
621 - s|\\|\\\\|g; s|"|\\"|g;
622 -
623 - # add a prefix
624 - s|^|\t,"'"$prefix$patchname"' - |;
625 - # newlines away
626 - s/\n/ /g; s/ */ /g;
627 - # add a suffix
628 - s/ *$/"/; p
629 - };
630 - # stop all processing
631 - d;
632 - # label: append to the hold space
633 - :append H; d;
634 - # label: prepend to the hold space
635 - :prepend x; H; d;
636 - '
637 -done < "${WORKDIR}"/patches/series > "${S}/${patchoutput}"
638 -echo "${patchoutput}" >> "${S}/MANIFEST"
639 -}
640 -
641 -src_prepare_perlcross() {
642 - cp -a ../perl-cross-${CROSS_VER}/* . || die
643 -
644 - # bug 604072
645 - MAKEOPTS+=" -j1"
646 - export MAKEOPTS
647 -}
648 -src_prepare_dynamic() {
649 - ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
650 - ln -s ${LIBPERL} libperl$(get_libname ) || die
651 -}
652 -
653 -src_prepare() {
654 - local patch
655 - EPATCH_OPTS+=" -p1"
656 -
657 - if use hppa ; then
658 - epatch "${FILESDIR}/${PN}-5.26.2-hppa.patch" # bug 634162
659 - fi
660 -
661 - if [[ ${CHOST} == *-solaris* ]] ; then
662 - # do NOT mess with nsl, on Solaris this is always necessary,
663 - # when -lsocket is used e.g. to get h_errno
664 - sed -i '/gentoo\/no-nsl-cl\.patch/d' "${WORKDIR}/patches/series" || die
665 - fi
666 -
667 - einfo "Applying patches from ${PATCH_BASE} ..."
668 - while read patch ; do
669 - EPATCH_SINGLE_MSG=" ${patch} ..."
670 - epatch "${WORKDIR}"/patches/${patch}
671 - done < "${WORKDIR}"/patches/series
672 -
673 - src_prepare_update_patchlevel_h
674 -
675 - tc-is-cross-compiler && src_prepare_perlcross
676 -
677 - tc-is-static-only || src_prepare_dynamic
678 -
679 - if use gdbm; then
680 - sed -i "s:INC => .*:INC => \"-I${EROOT}usr/include/gdbm\":g" \
681 - ext/NDBM_File/Makefile.PL || die
682 - fi
683 -
684 - # Use errno.h from prefix rather than from host system, bug #645804
685 - if use prefix && [[ -e "${EPREFIX}"/usr/include/errno.h ]] ; then
686 - sed -i "/my..sysroot/s:'':'${EPREFIX}':" ext/Errno/Errno_pm.PL || die
687 - fi
688 -
689 - if [[ ${CHOST} == *-solaris* ]] ; then
690 - # set a soname, fix linking against just built libperl
691 - sed -i -e 's/netbsd\*/netbsd*|solaris*/' Makefile.SH || die
692 - fi
693 -
694 - if [[ ${CHOST} == *-darwin* ]] ; then
695 - # fix install_name (soname) not to reference $D
696 - sed -i -e '/install_name `pwd/s/`pwd`/\\$(shrpdir)/' Makefile.SH || die
697 -
698 - # Upstreamed, but not in this version.
699 - # Need to recognise macOS 11 / 10.16. #757249
700 - eapply "${FILESDIR}/${PN}-5.30.3-darwin-macos11.patch"
701 - fi
702 -
703 - default
704 -}
705 -
706 -myconf() {
707 - # the myconf array is declared in src_configure
708 - myconf=( "${myconf[@]}" "$@" )
709 -}
710 -
711 -src_configure() {
712 - declare -a myconf
713 -
714 - export LC_ALL="C"
715 - [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
716 -
717 - # Perl has problems compiling with -Os in your flags with glibc
718 - use elibc_uclibc || replace-flags "-Os" "-O2"
719 -
720 - # xlocale.h is going away in glibc-2.26, so it's counterproductive
721 - # if we use it and include it in CORE/perl.h ... Perl builds just
722 - # fine with glibc and locale.h only.
723 - # However, the darwin prefix people have no locale.h ...
724 - use elibc_glibc && myconf -Ui_xlocale
725 -
726 - # This flag makes compiling crash in interesting ways
727 - filter-flags "-malign-double"
728 -
729 - # Generic LTO broken since 5.28, triggers EUMM failures
730 - filter-flags "-flto"
731 -
732 - use sparc && myconf -Ud_longdbl
733 -
734 - export BUILD_BZIP2=0
735 - export BZIP2_INCLUDE=${EROOT}/usr/include
736 - export BZIP2_LIB=${EROOT}/usr/$(get_libdir)
737 -
738 - export BUILD_ZLIB=False
739 - export ZLIB_INCLUDE=${EROOT}/usr/include
740 - export ZLIB_LIB=${EROOT}/usr/$(get_libdir)
741 -
742 - # allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
743 - myndbm='U'
744 - mygdbm='U'
745 - mydb='U'
746 - if use gdbm ; then
747 - mygdbm='D'
748 - if use berkdb ; then
749 - myndbm='D'
750 - fi
751 - fi
752 - if use berkdb ; then
753 - mydb='D'
754 - has_version '=sys-libs/db-1*' && myndbm='D'
755 - fi
756 -
757 - myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
758 -
759 - if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
760 - ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
761 - myconf -Ui_db -Ui_ndbm
762 - fi
763 -
764 - use ithreads && myconf -Dusethreads
765 -
766 - if use debug ; then
767 - append-cflags "-g"
768 - myconf -DDEBUGGING
769 - elif [[ ${CFLAGS} == *-g* ]] ; then
770 - myconf -DDEBUGGING=-g
771 - else
772 - myconf -DDEBUGGING=none
773 - fi
774 -
775 - # Autodiscover all old version directories, some of them will even be newer
776 - # if you downgrade
777 - if [[ -z ${PERL_OLDVERSEN} ]]; then
778 - PERL_OLDVERSEN="$(
779 - find "${EROOT%/}${PRIV_BASE}" "${EROOT%/}${SITE_BASE}" "${EROOT%/}${VENDOR_BASE}" \
780 - -maxdepth 1 -mindepth 1 -type d -regex '.*/5[.][0-9]+[.][0-9]+$' \
781 - -printf "%f " 2>/dev/null )"
782 - fi
783 - # Fixup versions, removing self match, fixing order and dupes
784 - PERL_OLDVERSEN="$(
785 - echo "${PERL_OLDVERSEN}" |\
786 - tr " " "\n" |\
787 - grep -vF "${DIST_VERSION%-RC}" |\
788 - sort -u -nr -t'.' -k1,1 -k2,2 -k3,3
789 - )"
790 -
791 - # Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string
792 - if [[ -n "${PERL_OLDVERSEN// }" ]]; then
793 - local inclist="$(
794 - for v in ${PERL_OLDVERSEN}; do
795 - has "${v}" ${PERL_BIN_OLDVERSEN} && echo -n "${v}/${myarch}${mythreading} ";
796 - echo -n "${v} ";
797 - done )"
798 - einfo "This version of perl may partially support modules previously"
799 - einfo "installed in any of the following paths:"
800 - for incpath in ${inclist}; do
801 - [[ -e "${EROOT%/}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${VENDOR_BASE}/${incpath}"
802 - [[ -e "${EROOT%/}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROO%/T}${PRIV_BASE}/${incpath}"
803 - [[ -e "${EROOT%/}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${SITE_BASE}/${incpath}"
804 - done
805 - einfo "This is a temporary measure and you should aim to cleanup these paths"
806 - einfo "via world updates and perl-cleaner"
807 - myconf -Dinc_version_list="${inclist}"
808 - fi
809 -
810 - [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
811 -
812 - # Make sure we can do the final link #523730, need to set deployment
813 - # target to override hardcoded 10.3 which breaks on modern OSX
814 - [[ ${CHOST} == *-darwin* ]] && \
815 - myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
816 -
817 - # Older macOS with non-Apple GCC chokes on inline in system headers
818 - # using c89 mode as injected by cflags.SH
819 - [[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] && tc-is-gcc && \
820 - append-cflags -Dinline=__inline__
821 -
822 - # fix unaligned access misdetection
823 - # https://rt.perl.org/Public/Bug/Display.html?id=133495
824 - # https://rt.perl.org/Public/Bug/Display.html?id=133803
825 - # bug #676062, bug #688432
826 - use hppa || use sparc || [[ ${CHOST} == sparc*-solaris* ]] || \
827 - [[ ${CHOST} == armv5tel* ]] \
828 - && myconf "-Dd_u32align='define'"
829 -
830 - # Prefix: the host system needs not to follow Gentoo multilib stuff, and in
831 - # Prefix itself we don't do multilib either, so make sure perl can find
832 - # something compatible.
833 - if use prefix ; then
834 - # Set a hook to check for each detected library whether it actually works.
835 - export libscheck="
836 - ( echo 'main(){}' > '${T}'/conftest.c &&
837 - $(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
838 - ) || xxx=/dev/null"
839 -
840 - # Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
841 - local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
842 - myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
843 - elif [[ $(get_libdir) != "lib" ]] ; then
844 - # We need to use " and not ', as the written config.sh use ' ...
845 - myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
846 - fi
847 -
848 - # don't try building ODBM, bug #354453
849 - disabled_extensions="ODBM_File"
850 -
851 - if ! use gdbm ; then
852 - # workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
853 - disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
854 - fi
855 -
856 - myconf -Dnoextensions="${disabled_extensions}"
857 -
858 - [[ "${PV##*.}" == "9999" ]] && myconf -Dusedevel -Uversiononly
859 -
860 - [[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF}
861 - # allow fiddling via EXTRA_ECONF, bug 558070
862 - eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})"
863 -
864 - # setting -Dld= to tc-getLD breaks perl and all perl things
865 - # https://github.com/Perl/perl5/issues/17791#issuecomment-630145202
866 - myconf \
867 - -Duseshrplib \
868 - -Darchname="${myarch}" \
869 - -Dcc="$(tc-getCC)" \
870 - -Dar="$(tc-getAR)" \
871 - -Dnm="$(tc-getNM)" \
872 - -Dcpp="$(tc-getCPP)" \
873 - -Dranlib="$(tc-getRANLIB)" \
874 - -Doptimize="${CFLAGS}" \
875 - -Dldflags="${LDFLAGS}" \
876 - -Dprefix="${EPREFIX}"'/usr' \
877 - -Dsiteprefix="${EPREFIX}"'/usr/local' \
878 - -Dvendorprefix="${EPREFIX}"'/usr' \
879 - -Dscriptdir="${EPREFIX}"'/usr/bin' \
880 - -Dprivlib="${EPREFIX}${PRIV_LIB}" \
881 - -Darchlib="${EPREFIX}${ARCH_LIB}" \
882 - -Dsitelib="${EPREFIX}${SITE_LIB}" \
883 - -Dsitearch="${EPREFIX}${SITE_ARCH}" \
884 - -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
885 - -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
886 - -Dman1dir="${EPREFIX}"/usr/share/man/man1 \
887 - -Dman3dir="${EPREFIX}"/usr/share/man/man3 \
888 - -Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
889 - -Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
890 - -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
891 - -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
892 - -Dman1ext='1' \
893 - -Dman3ext='3pm' \
894 - -Dlibperl="${LIBPERL}" \
895 - -Dlocincpth="${EPREFIX}"'/usr/include ' \
896 - -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
897 - -Duselargefiles \
898 - -Dd_semctl_semun \
899 - -Dcf_by='Gentoo' \
900 - -Dmyhostname='localhost' \
901 - -Dperladmin='root@localhost' \
902 - -Ud_csh \
903 - -Dsh="${EPREFIX}"/bin/sh \
904 - -Dtargetsh="${EPREFIX}"/bin/sh \
905 - -Uusenm \
906 - "${myconf[@]}" \
907 - "${EXTRA_ECONF[@]}"
908 -
909 - if tc-is-cross-compiler; then
910 - ./configure \
911 - --target="${CHOST}" \
912 - --build="${CBUILD}" \
913 - -Dinstallprefix='' \
914 - -Dinstallusrbinperl='undef' \
915 - -Dusevendorprefix='define' \
916 - "${myconf[@]}" \
917 - || die "Unable to configure"
918 - else
919 - sh Configure \
920 - -des \
921 - -Dinstallprefix="${EPREFIX}"'/usr' \
922 - -Dinstallusrbinperl='n' \
923 - "${myconf[@]}" \
924 - || die "Unable to configure"
925 - fi
926 -}
927 -
928 -src_test() {
929 - export NO_GENTOO_NETWORK_TESTS=1;
930 - export GENTOO_ASSUME_SANDBOXED="${GENTOO_ASSUME_SANDBOXED:-1}"
931 - export GENTOO_NO_PORTING_TESTS="${GENTOO_NO_PORTING_TESTS:-1}"
932 - if [[ ${EUID} == 0 ]] ; then
933 - ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
934 - return 0
935 - fi
936 - use elibc_uclibc && export MAKEOPTS+=" -j1"
937 - TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed"
938 -}
939 -
940 -src_install() {
941 - local i
942 - local coredir="${ARCH_LIB}/CORE"
943 -
944 - emake DESTDIR="${D}" install
945 -
946 - rm -f "${ED}/usr/bin/perl${MY_PV}"
947 - ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die
948 -
949 - if ! tc-is-static-only ; then
950 - dolib.so "${ED}"${coredir}/${LIBPERL}
951 - rm -f "${ED}"${coredir}/${LIBPERL}
952 - ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
953 - ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
954 -
955 - ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
956 - ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
957 - ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
958 - fi
959 -
960 - rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
961 -
962 - # This removes ${D} from Config.pm
963 - for i in $(find "${D}" -iname "Config.pm" ) ; do
964 - einfo "Removing ${D} from ${i}..."
965 - sed -i -e "s:${D}::" "${i}" || die "Sed failed"
966 - done
967 -
968 - dodoc Changes* README AUTHORS
969 -
970 - if use doc ; then
971 - # HTML Documentation
972 - # We expect errors, warnings, and such with the following.
973 -
974 - dodir /usr/share/doc/${PF}/html
975 - LD_LIBRARY_PATH=. ./perl installhtml \
976 - --podroot='.' \
977 - --podpath='lib:ext:pod:vms' \
978 - --recurse \
979 - --htmldir="${ED}/usr/share/doc/${PF}/html"
980 - fi
981 -
982 - [[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local
983 -
984 - dual_scripts
985 -}
986 -
987 -pkg_preinst() {
988 - check_rebuild
989 -}
990 -
991 -pkg_postinst() {
992 - dual_scripts
993 -
994 - if [[ "${ROOT}" = "/" ]] ; then
995 - local INC DIR file
996 - INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
997 - einfo "Removing old .ph files"
998 - for DIR in ${INC} ; do
999 - if [[ -d "${DIR}" ]] ; then
1000 - for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
1001 - rm -f "${file}"
1002 - einfo "<< ${file}"
1003 - done
1004 - fi
1005 - done
1006 - # Silently remove the now empty dirs
1007 - for DIR in ${INC} ; do
1008 - if [[ -d "${DIR}" ]] ; then
1009 - find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
1010 - fi
1011 - done
1012 -
1013 - fi
1014 -}
1015 -
1016 -pkg_postrm() {
1017 - dual_scripts
1018 -}