[perl-ExtUtils-MakeMaker] Cope with missing Encode::Locale

Petr Pisar ppisar at fedoraproject.org
Tue Nov 11 13:47:53 UTC 2014


commit 09b21878cdd0590d3d4d5745f547e82da78fff07
Author: Petr Písař <ppisar at redhat.com>
Date:   Tue Nov 11 14:40:11 2014 +0100

    Cope with missing Encode::Locale

 ...-encoded-chunk-if-Locale-Encode-is-not-av.patch |   36 ++++++++++++++++++++
 perl-ExtUtils-MakeMaker.spec                       |    4 ++
 2 files changed, 40 insertions(+), 0 deletions(-)
---
diff --git a/ExtUtils-MakeMaker-7.02-Write-UTF-8-encoded-chunk-if-Locale-Encode-is-not-av.patch b/ExtUtils-MakeMaker-7.02-Write-UTF-8-encoded-chunk-if-Locale-Encode-is-not-av.patch
new file mode 100644
index 0000000..563ba4b
--- /dev/null
+++ b/ExtUtils-MakeMaker-7.02-Write-UTF-8-encoded-chunk-if-Locale-Encode-is-not-av.patch
@@ -0,0 +1,36 @@
+From 8907d813767b9b15426826693762fa7542afedc9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Tue, 11 Nov 2014 14:30:08 +0100
+Subject: [PATCH] Write UTF-8-encoded chunk if Locale::Encode is not available
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+CPAN RT#100268
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ lib/ExtUtils/MakeMaker.pm | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm
+index 86e6d83..248e8f4 100644
+--- a/lib/ExtUtils/MakeMaker.pm
++++ b/lib/ExtUtils/MakeMaker.pm
+@@ -1195,11 +1195,11 @@ sub flush {
+     binmode $fh, ':encoding(locale)' if $CAN_DECODE;
+ 
+     for my $chunk (@{$self->{RESULT}}) {
+-        my $to_write = "$chunk\n";
++        my $to_write = "$chunk";
+         if (!$CAN_DECODE && $] > 5.008) {
+             utf8::encode $to_write;
+         }
+-        print $fh "$chunk\n"
++        print $fh "$to_write\n"
+             or die "Can't write to MakeMaker.tmp: $!";
+     }
+ 
+-- 
+1.9.3
+
diff --git a/perl-ExtUtils-MakeMaker.spec b/perl-ExtUtils-MakeMaker.spec
index c233060..aab4eb5 100644
--- a/perl-ExtUtils-MakeMaker.spec
+++ b/perl-ExtUtils-MakeMaker.spec
@@ -18,6 +18,8 @@ Patch1:         %{cpan_name}-7.00-Link-to-libperl-explicitly-on-Linux.patch
 Patch2:         ExtUtils-MakeMaker-7.00-Unbundle-version.patch
 # Unbundle Encode::Locale module
 Patch3:         ExtUtils-MakeMaker-7.00-Unbundle-Encode-Locale.patch
+# Cope with missing Encode::Locale, CPAN RT#100268
+Patch4:         ExtUtils-MakeMaker-7.02-Write-UTF-8-encoded-chunk-if-Locale-Encode-is-not-av.patch
 BuildArch:      noarch
 BuildRequires:  perl
 # Makefile.Pl uses ExtUtils::MakeMaker from ./lib
@@ -110,6 +112,7 @@ Dougherty and the perl5-porters.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 # Remove bundled modules
 rm -rf bundled
 sed -i -e '/^bundled\// d' MANIFEST
@@ -142,6 +145,7 @@ make test
 %changelog
 * Tue Nov 11 2014 Petr Pisar <ppisar at redhat.com> - 7.02-1
 - 7.02 bump
+- Cope with missing Encode::Locale
 
 * Wed Nov 05 2014 Petr Pisar <ppisar at redhat.com> - 7.00-2
 - Fix building with older xsubpp



More information about the perl-devel mailing list