diff --git a/Encode-2.96-Fix-https-rt.cpan.org-Ticket-Display.html-id-124399.patch b/Encode-2.96-Fix-https-rt.cpan.org-Ticket-Display.html-id-124399.patch new file mode 100644 index 0000000..863a030 --- /dev/null +++ b/Encode-2.96-Fix-https-rt.cpan.org-Ticket-Display.html-id-124399.patch @@ -0,0 +1,40 @@ +From cfaedb2beda37cbc3575ee818c3c83ea87673c32 Mon Sep 17 00:00:00 2001 +From: Karl Williamson +Date: Wed, 14 Feb 2018 15:47:46 -0700 +Subject: [PATCH] Fix https://rt.cpan.org/Ticket/Display.html?id=124399 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Encode 2.95 broke this module, which is testing for a particular warning +message. It was not my intent to change any part of the API with the +commits that comprise 2.95, and it turns out that the message is +different only in one or two perl versions where an interaction with a +deprecation caused the new message to be displayed. + +The commit here just keeps the old code being used into the 5.27 series. +It probably could work starting in 5.27.2, but its easier to use a +marker of the existence of a newer function, and since the affected +versions are all development releases, I went with the marker. + +Signed-off-by: Petr Písař +--- + Encode.xs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Encode.xs b/Encode.xs +index 91c5257..13eb15d 100644 +--- a/Encode.xs ++++ b/Encode.xs +@@ -387,7 +387,7 @@ strict_utf8(pTHX_ SV* sv) + } + + /* Modern perls have the capability to do this more efficiently and portably */ +-#ifdef is_utf8_string_loc_flags ++#ifdef utf8n_to_uvchr_msgs + # define CAN_USE_BASE_PERL + #endif + +-- +2.13.6 + diff --git a/perl-Encode.spec b/perl-Encode.spec index 8a6a82f..a6a0df4 100644 --- a/perl-Encode.spec +++ b/perl-Encode.spec @@ -8,7 +8,7 @@ Version: %{cpan_version} # perl-encoding sub-package has independent version which does not change # often and consecutive builds would clash on perl-encoding NEVRA. This is the # same case as in perl.spec. -Release: 1%{?dist} +Release: 2%{?dist} Summary: Character encodings in Perl # ucm: UCD # bin/encguess: Artistic 2.0 @@ -16,6 +16,8 @@ Summary: Character encodings in Perl License: (GPL+ or Artistic) and Artistic 2.0 and UCD URL: http://search.cpan.org/dist/Encode/ Source0: http://www.cpan.org/authors/id/D/DA/DANKOGAI/Encode-%{cpan_version}.tar.gz +# Preserve a warning on Perl 5.26.1, bug #1544345, CPAN RT#124399 +Patch0: Encode-2.96-Fix-https-rt.cpan.org-Ticket-Display.html-id-124399.patch BuildRequires: findutils BuildRequires: gcc BuildRequires: make @@ -126,6 +128,7 @@ your own encoding to perl. No knowledge of XS is necessary. %prep %setup -q -n Encode-%{cpan_version} +%patch0 -p1 %build # Additional scripts can be installed by appending MORE_SCRIPTS, UCM files by @@ -166,6 +169,9 @@ make test %{perl_vendorarch}/Encode/encode.h %changelog +* Mon Feb 19 2018 Petr Pisar - 4:2.96-2 +- Preserve a warning on Perl 5.26.1 (bug #1544345) + * Mon Feb 12 2018 Petr Pisar - 4:2.96-1 - 2.96 bump