summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl-5.8.8/53_debian_mod_paths.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/perl/perl-5.8.8/53_debian_mod_paths.patch')
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/53_debian_mod_paths.patch107
1 files changed, 107 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/53_debian_mod_paths.patch b/meta/recipes-devtools/perl/perl-5.8.8/53_debian_mod_paths.patch
new file mode 100644
index 0000000000..df74bc598d
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/53_debian_mod_paths.patch
@@ -0,0 +1,107 @@
1Tweak @INC so that the ordering is:
2
3 etc (for config files)
4 site (5.8.1)
5 vendor (all)
6 core (5.8.1)
7 site (version-indep)
8 site (pre-5.8.1)
9
10The rationale being that an admin (via site), or module packager
11(vendor) can chose to shadow core modules when there is a newer
12version than is included in core.
13
14diff -Naur --exclude=debian perl-5.8.8.orig/perl.c perl-5.8.8/perl.c
15--- perl-5.8.8.orig/perl.c 2006-01-31 23:34:47.000000000 +1100
16+++ perl-5.8.8/perl.c 2006-02-02 23:36:38.000000000 +1100
17@@ -4776,9 +4776,14 @@
18 incpush(APPLLIB_EXP, TRUE, TRUE, TRUE);
19 #endif
20
21+#if 1
22+ /* for configuration where /usr is mounted ro (CPAN::Config, Net::Config) */
23+ incpush("/etc/perl", FALSE, FALSE, FALSE);
24+#else
25 #ifdef ARCHLIB_EXP
26 incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE);
27 #endif
28+#endif
29 #ifdef MACOS_TRADITIONAL
30 {
31 Stat_t tmpstatbuf;
32@@ -4803,11 +4808,13 @@
33 #ifndef PRIVLIB_EXP
34 # define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl"
35 #endif
36+#if 0
37 #if defined(WIN32)
38 incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE);
39 #else
40 incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE);
41 #endif
42+#endif
43
44 #ifdef SITEARCH_EXP
45 /* sitearch is always relative to sitelib on Windows for
46@@ -4850,6 +4857,61 @@
47 incpush(PERL_VENDORLIB_STEM, FALSE, TRUE, TRUE);
48 #endif
49
50+#if 1
51+ incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE);
52+ incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE);
53+
54+ /* Non-versioned site directory for local modules and for
55+ compatability with the previous packages' site dirs */
56+ incpush("/usr/local/lib/site_perl", TRUE, FALSE, FALSE);
57+
58+#ifdef PERL_INC_VERSION_LIST
59+ {
60+ struct stat s;
61+
62+ /* add small buffer in case old versions are longer than the
63+ current version */
64+ char sitearch[sizeof(SITEARCH_EXP)+16] = SITEARCH_EXP;
65+ char sitelib[sizeof(SITELIB_EXP)+16] = SITELIB_EXP;
66+ char const *vers[] = { PERL_INC_VERSION_LIST };
67+ char const **p;
68+
69+ char *arch_vers = strrchr(sitearch, '/');
70+ char *lib_vers = strrchr(sitelib, '/');
71+
72+ if (arch_vers && isdigit(*++arch_vers))
73+ *arch_vers = 0;
74+ else
75+ arch_vers = 0;
76+
77+ if (lib_vers && isdigit(*++lib_vers))
78+ *lib_vers = 0;
79+ else
80+ lib_vers = 0;
81+
82+ /* there is some duplication here as incpush does something
83+ similar internally, but required as sitearch is not a
84+ subdirectory of sitelib */
85+ for (p = vers; *p; p++)
86+ {
87+ if (arch_vers)
88+ {
89+ strcpy(arch_vers, *p);
90+ if (PerlLIO_stat(sitearch, &s) >= 0 && S_ISDIR(s.st_mode))
91+ incpush(sitearch, FALSE, FALSE, FALSE);
92+ }
93+
94+ if (lib_vers)
95+ {
96+ strcpy(lib_vers, *p);
97+ if (PerlLIO_stat(sitelib, &s) >= 0 && S_ISDIR(s.st_mode))
98+ incpush(sitelib, FALSE, FALSE, FALSE);
99+ }
100+ }
101+ }
102+#endif
103+#endif
104+
105 #ifdef PERL_OTHERLIBDIRS
106 incpush(PERL_OTHERLIBDIRS, TRUE, TRUE, TRUE);
107 #endif