summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl-5.12.3/parallel_build_fix_4.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/perl/perl-5.12.3/parallel_build_fix_4.patch')
-rw-r--r--meta/recipes-devtools/perl/perl-5.12.3/parallel_build_fix_4.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl-5.12.3/parallel_build_fix_4.patch b/meta/recipes-devtools/perl/perl-5.12.3/parallel_build_fix_4.patch
new file mode 100644
index 0000000000..98bf0743fb
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.12.3/parallel_build_fix_4.patch
@@ -0,0 +1,57 @@
1Upstream-Status:Inappropriate [Backport]
2
3commit 43c0c913165d6abe1bc0cb45a784eb1c32c3700b
4Author: Nicholas Clark <nick@ccl4.org>
5Date: Mon Feb 14 09:06:42 2011 +0000
6
7 For miniperl, use the USE_SITECUSTOMIZE feature to load the build-time @INC
8
9 For miniperl (only), always enable USE_SITECUSTOMIZE, but change it to load
10 a buildcustomize.pl file from $INC[0], if present. The default @INC for
11 miniperl is '.', so by default this does nothing.
12
13diff --git a/perl.c b/perl.c
14index 8f8565d..6bb9f46 100644
15--- a/perl.c
16+++ b/perl.c
17@@ -24,6 +24,10 @@
18 * function of the interpreter; that can be found in perlmain.c
19 */
20
21+#ifdef PERL_IS_MINIPERL
22+# define USE_SITECUSTOMIZE
23+#endif
24+
25 #include "EXTERN.h"
26 #define PERL_IN_PERL_C
27 #include "perl.h"
28@@ -1973,15 +1977,26 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
29 }
30 }
31
32-#if defined(USE_SITECUSTOMIZE) && !defined(PERL_IS_MINIPERL)
33+#if defined(USE_SITECUSTOMIZE)
34 if (!minus_f) {
35- /* SITELIB_EXP is a function call on Win32.
36- The games with local $! are to avoid setting errno if there is no
37+ /* The games with local $! are to avoid setting errno if there is no
38 sitecustomize script. */
39+# ifdef PERL_IS_MINIPERL
40+ AV *const inc = GvAV(PL_incgv);
41+ SV **const inc0 = inc ? av_fetch(inc, 0, FALSE) : NULL;
42+
43+ if (inc0) {
44+ (void)Perl_av_create_and_unshift_one(aTHX_ &PL_preambleav,
45+ Perl_newSVpvf(aTHX_
46+ "BEGIN { do {local $!; -f '%"SVf"/buildcustomize.pl'} && do '%"SVf"/buildcustomize.pl' }", *inc0, *inc0));
47+ }
48+# else
49+ /* SITELIB_EXP is a function call on Win32. */
50 const char *const sitelib = SITELIB_EXP;
51 (void)Perl_av_create_and_unshift_one(aTHX_ &PL_preambleav,
52 Perl_newSVpvf(aTHX_
53 "BEGIN { do {local $!; -f '%s/sitecustomize.pl'} && do '%s/sitecustomize.pl' }", sitelib, sitelib));
54+# endif
55 }
56 #endif
57