perl/perl-5.10.0-reorderINC.patch

60 lines
1.6 KiB
Diff

diff -up perl-5.10.0/perl.c.BAD perl-5.10.0/perl.c
--- perl-5.10.0/perl.c.BAD 2009-03-09 09:55:05.000000000 -0400
+++ perl-5.10.0/perl.c 2009-03-09 10:00:41.000000000 -0400
@@ -4753,9 +4753,6 @@ S_init_perllib(pTHX)
incpush(APPLLIB_EXP, TRUE, TRUE, TRUE, TRUE);
#endif
-#ifdef ARCHLIB_EXP
- incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE, TRUE);
-#endif
#ifdef MACOS_TRADITIONAL
{
Stat_t tmpstatbuf;
@@ -4764,6 +4761,10 @@ S_init_perllib(pTHX)
if (!macperl)
macperl = "";
+
+#ifdef ARCHLIB_EXP
+ incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE, TRUE);
+#endif
Perl_sv_setpvf(aTHX_ privdir, "%slib:", macperl);
if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode))
@@ -4777,14 +4778,6 @@ S_init_perllib(pTHX)
if (!PL_tainting)
incpush(":", FALSE, FALSE, TRUE, FALSE);
#else
-#ifndef PRIVLIB_EXP
-# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl"
-#endif
-#if defined(WIN32)
- incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE, TRUE);
-#else
- incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE, TRUE);
-#endif
#ifdef SITEARCH_EXP
/* sitearch is always relative to sitelib on Windows for
@@ -4828,6 +4821,19 @@ S_init_perllib(pTHX)
incpush(PERL_VENDORLIB_STEM, FALSE, TRUE, TRUE, TRUE);
#endif
+#ifdef ARCHLIB_EXP
+ incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE, TRUE);
+#endif
+
+#ifndef PRIVLIB_EXP
+# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl"
+#endif
+#if defined(WIN32)
+ incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE, TRUE);
+#else
+ incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE, TRUE);
+#endif
+
#ifdef PERL_OTHERLIBDIRS
incpush(PERL_OTHERLIBDIRS, TRUE, TRUE, TRUE, TRUE);
#endif