Created
July 25, 2011 03:48
-
-
Save tochiz/1103529 to your computer and use it in GitHub Desktop.
Gentoo Prefix perl nm ar search error fix patch.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ruN perl-5.12.3.orig/cpan/Archive-Tar/t/02_methods.t perl-5.12.3/cpan/Archive-Tar/t/02_methods. | |
t | |
--- perl-5.12.3.orig/cpan/Archive-Tar/t/02_methods.t 2011-07-25 11:23:59.000000000 +0900 | |
+++ perl-5.12.3/cpan/Archive-Tar/t/02_methods.t 2011-07-25 12:24:01.000000000 +0900 | |
@@ -70,6 +70,20 @@ | |
my $TOO_LONG = ($^O eq 'MSWin32' or $^O eq 'cygwin' or $^O eq 'VMS') | |
&& length( cwd(). $LONG_FILE ) > 247; | |
+if(!$TOO_LONG) { | |
+ my $alt = File::Spec->catfile( cwd(), $LONG_FILE); | |
+ eval 'mkpath([$alt]);'; | |
+ if($@) | |
+ { | |
+ $TOO_LONG = 1; | |
+ } | |
+ else | |
+ { | |
+ $@ = ''; | |
+ my $base = File::Spec->catfile( cwd(), 'directory'); | |
+ rmtree $base; | |
+ } | |
+} | |
### warn if we are going to skip long file names | |
if ($TOO_LONG) { | |
diag("No long filename support - long filename extraction disabled") if ! $ENV{PERL_CORE}; | |
diff -ruN perl-5.12.3.orig/ext/ODBM_File/hints/linux.pl perl-5.12.3/ext/ODBM_File/hints/linux.pl | |
--- perl-5.12.3.orig/ext/ODBM_File/hints/linux.pl 2011-07-25 11:24:00.000000000 +0900 | |
+++ perl-5.12.3/ext/ODBM_File/hints/linux.pl 2011-07-25 12:24:01.000000000 +0900 | |
@@ -1,8 +1,8 @@ | |
# uses GDBM dbm compatibility feature - at least on SuSE 8.0 | |
$self->{LIBS} = ['-lgdbm']; | |
-# Debian/Ubuntu have /usr/lib/libgdbm_compat.so.3* but not this file, | |
+# Debian/Ubuntu have libgdbm_compat.so but not this file, | |
# so linking may fail | |
-if (-e '/usr/lib/libgdbm_compat.so' or -e '/usr/lib64/libgdbm_compat.so') { | |
- $self->{LIBS}->[0] .= ' -lgdbm_compat'; | |
+foreach (split / /, $Config{libpth}) { | |
+ $self->{LIBS}->[0] .= ' -lgdbm_compat' if -e $_.'/libgdbm_compat.so'; | |
} | |
diff -ruN perl-5.12.3.orig/hints/darwin.sh perl-5.12.3/hints/darwin.sh | |
--- perl-5.12.3.orig/hints/darwin.sh 2011-07-25 11:24:01.000000000 +0900 | |
+++ perl-5.12.3/hints/darwin.sh 2011-07-25 12:24:01.000000000 +0900 | |
@@ -13,11 +13,16 @@ | |
perl_subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $src/patchlevel.h` | |
version="${perl_revision}.${perl_version}.${perl_subversion}" | |
-# Pretend that Darwin doesn't know about those system calls [perl #24122] | |
-d_setregid='undef' | |
-d_setreuid='undef' | |
-d_setrgid='undef' | |
-d_setruid='undef' | |
+# Pretend that Darwin doesn't know about those system calls in Tiger | |
+# (10.4/darwin 8) and earlier [perl #24122] | |
+case "$osvers" in | |
+[1-8].*) | |
+ d_setregid='undef' | |
+ d_setreuid='undef' | |
+ d_setrgid='undef' | |
+ d_setruid='undef' | |
+ ;; | |
+esac | |
# This was previously used in all but causes three cases | |
# (no -Ddprefix=, -Dprefix=/usr, -Dprefix=/some/thing/else) | |
@@ -68,8 +73,10 @@ | |
# Since we can build fat, the archname doesn't need the processor type | |
archname='darwin'; | |
-# nm works. | |
-usenm='true'; | |
+# nm isn't known to work after Snow Leopard and XCode 4; testing with OS X 10.5 | |
+# and Xcode 3 shows a working nm, but pretending it doesn't work produces no | |
+# problems. | |
+usenm='false'; | |
case "$optimize" in | |
'') | |
@@ -121,20 +128,22 @@ | |
esac | |
# Avoid Apple's cpp precompiler, better for extensions | |
-cppflags="${cppflags} -no-cpp-precomp" | |
+if [ "X`echo | ${cc} -no-cpp-precomp -E - 2>&1 >/dev/null`" = "X" ]; then | |
+ cppflags="${cppflags} -no-cpp-precomp" | |
-# This is necessary because perl's build system doesn't | |
-# apply cppflags to cc compile lines as it should. | |
-ccflags="${ccflags} ${cppflags}" | |
+ # This is necessary because perl's build system doesn't | |
+ # apply cppflags to cc compile lines as it should. | |
+ ccflags="${ccflags} ${cppflags}" | |
+fi | |
# Known optimizer problems. | |
-case "`${cc:-gcc} -v 2>&1`" in | |
+case "`cc -v 2>&1`" in | |
*"3.1 20020105"*) toke_cflags='optimize=""' ;; | |
esac | |
# Shared library extension is .dylib. | |
# Bundle extension is .bundle. | |
-ld="${cc:-gcc}"; | |
+ld='cc'; | |
so='dylib'; | |
dlext='bundle'; | |
usedl='define'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment