Cope with missing Encode::Locale

This commit is contained in:
Petr Písař 2014-11-11 14:40:11 +01:00
parent 8542fd846d
commit 09b21878cd
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,36 @@
From 8907d813767b9b15426826693762fa7542afedc9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@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@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

View File

@ -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@redhat.com> - 7.02-1
- 7.02 bump
- Cope with missing Encode::Locale
* Wed Nov 05 2014 Petr Pisar <ppisar@redhat.com> - 7.00-2
- Fix building with older xsubpp