aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/perl/perl-5.8.8/64_debian_enc2xs_inc.patch
blob: c207a9380a8423b9bd34634f1255e19ac4ae6005 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Tweak enc2xs to handle Debian @INC:  ignore missing directories,
follow symlinks (/usr/share/perl/5.8 -> 5.8.4).

diff -Naur --exclude=debian perl-5.8.8.orig/ext/Encode/bin/enc2xs perl-5.8.8/ext/Encode/bin/enc2xs
--- perl-5.8.8.orig/ext/Encode/bin/enc2xs	2004-09-03 01:53:51.000000000 +1000
+++ perl-5.8.8/ext/Encode/bin/enc2xs	2006-02-03 00:21:32.000000000 +1100
@@ -909,10 +909,11 @@
     eval { require File::Find; };
     my (@inc, %e2x_dir);
     for my $inc (@INC){
+	next unless -d $inc; # skip non-existent directories
 	push @inc, $inc unless $inc eq '.'; #skip current dir
     }
     File::Find::find(
-	     sub {
+	     { wanted => sub {
 		 my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
 		     $atime,$mtime,$ctime,$blksize,$blocks)
 		     = lstat($_) or return;
@@ -922,7 +923,7 @@
 		     $e2x_dir{$File::Find::dir} ||= $mtime;
 		 }
 		 return;
-	     }, @inc);
+	     }, follow => 1}, @inc);
     warn join("\n", keys %e2x_dir), "\n";
     for my $d (sort {$e2x_dir{$a} <=> $e2x_dir{$b}} keys %e2x_dir){
 	$_E2X = $d;