updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / perl-shared / archlinux-inc-order.patch
bloba0c7a9c92d10135bd28c51b9c68b5fb0f1acc99f
1 Tweak @INC so that the ordering is:
2 site (5.8.8)
3 vendor (all)
4 core (5.8.8)
5 obsolete (pre-5.8.8-9) vendor builds
7 The rationale being that an admin (via site), or module packager (vendor) can
8 chose to shadow core modules when there is a newer version than is included in
9 core.
11 Thanks to Charles Mauch (xterminus) for his work on the initial patch.
13 --- perl.c.orig 2006-01-31 07:34:47.000000000 -0500
14 +++ perl.c 2007-10-31 22:46:56.000000000 -0400
15 @@ -4771,44 +4771,12 @@
17 /* Use the ~-expanded versions of APPLLIB (undocumented),
18 ARCHLIB PRIVLIB SITEARCH SITELIB VENDORARCH and VENDORLIB
19 + Arch Linux: SITEARCH SITELIB VENDORARCH VENDORLIB ARCHLIB PRIVLIB OTHER
21 #ifdef APPLLIB_EXP
22 incpush(APPLLIB_EXP, TRUE, TRUE, TRUE);
23 #endif
25 -#ifdef ARCHLIB_EXP
26 - incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE);
27 -#endif
28 -#ifdef MACOS_TRADITIONAL
29 - {
30 - Stat_t tmpstatbuf;
31 - SV * privdir = NEWSV(55, 0);
32 - char * macperl = PerlEnv_getenv("MACPERL");
34 - if (!macperl)
35 - macperl = "";
37 - Perl_sv_setpvf(aTHX_ privdir, "%slib:", macperl);
38 - if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode))
39 - incpush(SvPVX(privdir), TRUE, FALSE, TRUE);
40 - Perl_sv_setpvf(aTHX_ privdir, "%ssite_perl:", macperl);
41 - if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode))
42 - incpush(SvPVX(privdir), TRUE, FALSE, TRUE);
44 - SvREFCNT_dec(privdir);
45 - }
46 - if (!PL_tainting)
47 - incpush(":", FALSE, FALSE, TRUE);
48 -#else
49 -#ifndef PRIVLIB_EXP
50 -# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl"
51 -#endif
52 -#if defined(WIN32)
53 - incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE);
54 -#else
55 - incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE);
56 -#endif
58 #ifdef SITEARCH_EXP
59 /* sitearch is always relative to sitelib on Windows for
60 * DLL-based path intuition to work correctly */
61 @@ -4850,6 +4818,40 @@
62 incpush(PERL_VENDORLIB_STEM, FALSE, TRUE, TRUE);
63 #endif
65 +/* Arch Linux: core libs after site and vendor libs. */
66 +#ifdef ARCHLIB_EXP
67 + incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE);
68 +#endif
69 +#ifdef MACOS_TRADITIONAL
70 + {
71 + Stat_t tmpstatbuf;
72 + SV * privdir = NEWSV(55, 0);
73 + char * macperl = PerlEnv_getenv("MACPERL");
75 + if (!macperl)
76 + macperl = "";
78 + Perl_sv_setpvf(aTHX_ privdir, "%slib:", macperl);
79 + if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode))
80 + incpush(SvPVX(privdir), TRUE, FALSE, TRUE);
81 + Perl_sv_setpvf(aTHX_ privdir, "%ssite_perl:", macperl);
82 + if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode))
83 + incpush(SvPVX(privdir), TRUE, FALSE, TRUE);
85 + SvREFCNT_dec(privdir);
86 + }
87 + if (!PL_tainting)
88 + incpush(":", FALSE, FALSE, TRUE);
89 +#else
90 +#ifndef PRIVLIB_EXP
91 +# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl"
92 +#endif
93 +#if defined(WIN32)
94 + incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE);
95 +#else
96 + incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE);
97 +#endif
99 #ifdef PERL_OTHERLIBDIRS
100 incpush(PERL_OTHERLIBDIRS, TRUE, TRUE, TRUE);
101 #endif