summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl-5.14.3/debian/mod_paths.diff
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/perl/perl-5.14.3/debian/mod_paths.diff')
-rw-r--r--meta/recipes-devtools/perl/perl-5.14.3/debian/mod_paths.diff100
1 files changed, 100 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl-5.14.3/debian/mod_paths.diff b/meta/recipes-devtools/perl/perl-5.14.3/debian/mod_paths.diff
new file mode 100644
index 0000000..ceac541
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.14.3/debian/mod_paths.diff
@@ -0,0 +1,100 @@
1Upstream-Status:Inappropriate [debian patches]
2From 11633e598640b02e19329f323623af254fbac451 Mon Sep 17 00:00:00 2001
3From: Brendan O'Dea <bod@debian.org>
4Date: Fri, 18 Mar 2005 22:22:25 +1100
5Subject: Tweak @INC ordering for Debian
6
7Our order is:
8
9 etc (for config files)
10 site (5.8.1)
11 vendor (all)
12 core (5.8.1)
13 site (version-indep)
14 site (pre-5.8.1)
15
16The rationale being that an admin (via site), or module packager
17(vendor) can chose to shadow core modules when there is a newer
18version than is included in core.
19
20Patch-Name: debian/mod_paths.diff
21---
22 perl.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
23 1 files changed, 58 insertions(+), 0 deletions(-)
24
25diff --git a/perl.c b/perl.c
26index f756e02..d26dcb0 100644
27--- a/perl.c
28+++ b/perl.c
29@@ -4219,6 +4219,11 @@ S_init_perllib(pTHX)
30 INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE);
31 #endif
32
33+#ifdef DEBIAN
34+ /* for configuration where /usr is mounted ro (CPAN::Config, Net::Config) */
35+ S_incpush_use_sep(aTHX_ STR_WITH_LEN("/etc/perl"), 0x0);
36+#endif
37+
38 #ifdef SITEARCH_EXP
39 /* sitearch is always relative to sitelib on Windows for
40 * DLL-based path intuition to work correctly */
41@@ -4336,6 +4341,59 @@ S_init_perllib(pTHX)
42 INCPUSH_ADD_OLD_VERS|INCPUSH_CAN_RELOCATE);
43 #endif
44
45+#ifdef DEBIAN
46+ /* Non-versioned site directory for local modules and for
47+ compatability with the previous packages' site dirs */
48+ S_incpush_use_sep(aTHX_ STR_WITH_LEN("/usr/local/lib/site_perl"),
49+ INCPUSH_ADD_SUB_DIRS);
50+
51+#ifdef PERL_INC_VERSION_LIST
52+ {
53+ struct stat s;
54+
55+ /* add small buffer in case old versions are longer than the
56+ current version */
57+ char sitearch[sizeof(SITEARCH_EXP)+16] = SITEARCH_EXP;
58+ char sitelib[sizeof(SITELIB_EXP)+16] = SITELIB_EXP;
59+ char const *vers[] = { PERL_INC_VERSION_LIST };
60+ char const **p;
61+
62+ char *arch_vers = strrchr(sitearch, '/');
63+ char *lib_vers = strrchr(sitelib, '/');
64+
65+ if (arch_vers && isdigit(*++arch_vers))
66+ *arch_vers = 0;
67+ else
68+ arch_vers = 0;
69+
70+ if (lib_vers && isdigit(*++lib_vers))
71+ *lib_vers = 0;
72+ else
73+ lib_vers = 0;
74+
75+ /* there is some duplication here as incpush does something
76+ similar internally, but required as sitearch is not a
77+ subdirectory of sitelib */
78+ for (p = vers; *p; p++)
79+ {
80+ if (arch_vers)
81+ {
82+ strcpy(arch_vers, *p);
83+ if (PerlLIO_stat(sitearch, &s) >= 0 && S_ISDIR(s.st_mode))
84+ S_incpush_use_sep(aTHX_ sitearch, strlen(sitearch), 0x0);
85+ }
86+
87+ if (lib_vers)
88+ {
89+ strcpy(lib_vers, *p);
90+ if (PerlLIO_stat(sitelib, &s) >= 0 && S_ISDIR(s.st_mode))
91+ S_incpush_use_sep(aTHX_ sitelib, strlen(sitelib), 0x0);
92+ }
93+ }
94+ }
95+#endif
96+#endif
97+
98 #ifdef PERL_OTHERLIBDIRS
99 S_incpush_use_sep(aTHX_ STR_WITH_LEN(PERL_OTHERLIBDIRS),
100 INCPUSH_ADD_OLD_VERS|INCPUSH_ADD_ARCHONLY_SUB_DIRS