[perl] Fix searching for Unicode::Collate::Locale data

Petr Pisar ppisar at fedoraproject.org
Mon Feb 6 12:53:25 UTC 2012


commit 39fd37654278af08b0418b8e86e428d520a6cbf8
Author: Petr Písař <ppisar at redhat.com>
Date:   Mon Feb 6 13:47:23 2012 +0100

    Fix searching for Unicode::Collate::Locale data

 perl-5.14.2-locale-search-inc.patch |   26 ++++++++++++++++++++++++++
 perl.spec                           |   11 ++++++++++-
 2 files changed, 36 insertions(+), 1 deletions(-)
---
diff --git a/perl-5.14.2-locale-search-inc.patch b/perl-5.14.2-locale-search-inc.patch
new file mode 100644
index 0000000..65bc86e
--- /dev/null
+++ b/perl-5.14.2-locale-search-inc.patch
@@ -0,0 +1,26 @@
+diff --git a/cpan/Unicode-Collate/Collate/Locale.pm b/cpan/Unicode-Collate/Collate/Locale.pm
+index b26db00..35f4fb3 100644
+--- a/cpan/Unicode-Collate/Collate/Locale.pm
++++ b/cpan/Unicode-Collate/Collate/Locale.pm
+@@ -8,7 +8,6 @@ our $VERSION = '0.73';
+ 
+ use File::Spec;
+ 
+-(my $ModPath = $INC{'Unicode/Collate/Locale.pm'}) =~ s/\.pm$//;
+ my $PL_EXT  = '.pl';
+ 
+ my %LocaleFile = map { ($_, $_) } qw(
+@@ -56,7 +55,12 @@ sub _fetchpl {
+     my $f = $LocaleFile{$accepted};
+     return if !$f;
+     $f .= $PL_EXT;
+-    my $path = File::Spec->catfile($ModPath, $f);
++    my $path;
++    for my $incpath (@INC) {
++	$path = File::Spec->catfile($incpath, 'Unicode', 'Collate', 'Locale', $f);
++	last if -f $path;
++	$path = undef;
++    }
+     my $h = do $path;
+     croak "Unicode/Collate/Locale/$f can't be found" if !$h;
+     return $h;
diff --git a/perl.spec b/perl.spec
index b1517e8..65d74a5 100644
--- a/perl.spec
+++ b/perl.spec
@@ -24,7 +24,7 @@
 Name:           perl
 Version:        %{perl_version}
 # release number must be even higher, because dual-lived modules will be broken otherwise
-Release:        210%{?dist}
+Release:        211%{?dist}
 Epoch:          %{perl_epoch}
 Summary:        Practical Extraction and Report Language
 Group:          Development/Languages
@@ -84,6 +84,10 @@ Patch11:        perl-5.14.2-Don-t-leak-memory-when-accessing-named-capt.patch
 # Fix interrupted reading, rhbz#767931, fixed after 5.15.3.
 Patch12:        perl-5.14.2-add-a-couple-missing-LEAVEs-in-perlio_async_run.patch
 
+# Fix searching for Unicode::Collate::Locale data, rhbz#756118, CPANRT#72666,
+# fixed in Unicode-Collate-0.87.
+Patch13:        perl-5.14.2-locale-search-inc.patch
+
 # Update some of the bundled modules
 # see http://fedoraproject.org/wiki/Perl/perl.spec for instructions
 
@@ -1248,6 +1252,7 @@ tarball from perl.org.
 %patch10 -p1
 %patch11 -p1
 %patch12 -p1
+%patch13 -p1
 
 #copy the example script
 cp -a %{SOURCE5} .
@@ -1450,6 +1455,7 @@ pushd %{build_archlib}/CORE/
     'Fedora Patch10: Change Perl_repeatcpy() to allow count above 2^31' \
     'Fedora Patch11: Fix leak with non-matching named captures' \
     'Fedora Patch12: Fix interrupted reading' \
+    'Fedora Patch13: Fix searching for Unicode::Collate::Locale data' \
     %{nil}
 
 rm patchlevel.bak
@@ -2407,6 +2413,9 @@ sed \
 
 # Old changelog entries are preserved in CVS.
 %changelog
+* Mon Feb 06 2012 Petr Pisar <ppisar at redhat.com> - 4:5.14.2-211
+- Fix searching for Unicode::Collate::Locale data (bug #756118)
+
 * Tue Jan 10 2012 Paul Howarth <paul at city-fan.org> - 4:5.14.2-210
 - Rebuild again now that perl dependency generator is fixed (#772632, #772699)
 


More information about the scm-commits mailing list