summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl-5.20.0/debian/enc2xs_inc.diff
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/perl/perl-5.20.0/debian/enc2xs_inc.diff')
-rw-r--r--meta/recipes-devtools/perl/perl-5.20.0/debian/enc2xs_inc.diff70
1 files changed, 70 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl-5.20.0/debian/enc2xs_inc.diff b/meta/recipes-devtools/perl/perl-5.20.0/debian/enc2xs_inc.diff
new file mode 100644
index 0000000000..4650b0bef8
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.20.0/debian/enc2xs_inc.diff
@@ -0,0 +1,70 @@
1From 98e7248580af353d781b24715b42af5b6a4caf35 Mon Sep 17 00:00:00 2001
2From: Brendan O'Dea <bod@debian.org>
3Date: Tue, 8 Mar 2005 19:30:38 +1100
4Subject: Tweak enc2xs to follow symlinks and ignore missing @INC directories.
5
6Bug-Debian: http://bugs.debian.org/290336
7
8- ignore missing directories,
9- follow symlinks (/usr/share/perl/5.8 -> 5.8.4).
10- filter "." out when running "enc2xs -C", it's unnecessary and causes
11 issues with follow => 1 (see #603686 and [rt.cpan.org #64585])
12
13Patch-Name: debian/enc2xs_inc.diff
14---
15 cpan/Encode/bin/enc2xs | 8 ++++----
16 t/porting/customized.t | 3 +++
17 2 files changed, 7 insertions(+), 4 deletions(-)
18
19diff --git a/cpan/Encode/bin/enc2xs b/cpan/Encode/bin/enc2xs
20index c44487d..a9af54f 100644
21--- a/cpan/Encode/bin/enc2xs
22+++ b/cpan/Encode/bin/enc2xs
23@@ -929,11 +929,11 @@ use vars qw(
24 sub find_e2x{
25 eval { require File::Find; };
26 my (@inc, %e2x_dir);
27- for my $inc (@INC){
28+ for my $inc (grep -d, @INC){
29 push @inc, $inc unless $inc eq '.'; #skip current dir
30 }
31 File::Find::find(
32- sub {
33+ { wanted => sub {
34 my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
35 $atime,$mtime,$ctime,$blksize,$blocks)
36 = lstat($_) or return;
37@@ -943,7 +943,7 @@ sub find_e2x{
38 $e2x_dir{$File::Find::dir} ||= $mtime;
39 }
40 return;
41- }, @inc);
42+ }, follow => 1}, @inc);
43 warn join("\n", keys %e2x_dir), "\n";
44 for my $d (sort {$e2x_dir{$a} <=> $e2x_dir{$b}} keys %e2x_dir){
45 $_E2X = $d;
46@@ -1010,7 +1010,7 @@ sub make_configlocal_pm {
47 $LocalMod{$enc} ||= $mod;
48 }
49 };
50- File::Find::find({wanted => $wanted}, @INC);
51+ File::Find::find({wanted => $wanted, follow => 1}, grep -d && !/^\./, @INC);
52 $_ModLines = "";
53 for my $enc ( sort keys %LocalMod ) {
54 $_ModLines .=
55diff --git a/t/porting/customized.t b/t/porting/customized.t
56index a769c58..6b9977f 100644
57--- a/t/porting/customized.t
58+++ b/t/porting/customized.t
59@@ -99,8 +99,11 @@ foreach my $module ( sort keys %Modules ) {
60 print $data_fh join(' ', $module, $file, $id), "\n";
61 next;
62 }
63+SKIP: {
64+ skip("$file modified for Debian", 1) if $file eq 'cpan/Encode/bin/enc2xs';
65 my $should_be = $customised{ $module }->{ $file };
66 is( $id, $should_be, "SHA for $file matches stashed SHA" );
67+}
68 }
69 }
70