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