From 0cb9fb7bcd43d88cd6e0c85c3a6fca6f38bca125 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Thu, 24 May 2018 12:15:43 +0200 Subject: [PATCH] Upgrade to 1.26 as provided in perl-5.28.0-RC1 --- ...-1.25-Fixes-for-removal-dot-from-INC.patch | 12 -- Unicode-Normalize-1.25-Upgrade-to-1.26.patch | 111 ++++++++++++++++++ perl-Unicode-Normalize.spec | 17 ++- 3 files changed, 122 insertions(+), 18 deletions(-) delete mode 100644 Unicode-Normalize-1.25-Fixes-for-removal-dot-from-INC.patch create mode 100644 Unicode-Normalize-1.25-Upgrade-to-1.26.patch diff --git a/Unicode-Normalize-1.25-Fixes-for-removal-dot-from-INC.patch b/Unicode-Normalize-1.25-Fixes-for-removal-dot-from-INC.patch deleted file mode 100644 index e34e2b1..0000000 --- a/Unicode-Normalize-1.25-Fixes-for-removal-dot-from-INC.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up Unicode-Normalize-1.25/Makefile.PL.orig Unicode-Normalize-1.25/Makefile.PL ---- Unicode-Normalize-1.25/Makefile.PL.orig 2017-05-12 10:24:13.296305863 +0200 -+++ Unicode-Normalize-1.25/Makefile.PL 2017-05-12 10:25:28.275822594 +0200 -@@ -8,7 +8,7 @@ my $mm_ver = ExtUtils::MakeMaker->VERSIO - if (-f "Normalize.xs") { - print STDERR "Making header files for XS...\n"; - -- do 'mkheader' or die $@ || "mkheader: $!"; -+ do './mkheader' or die $@ || "mkheader: $!"; - - $clean = { FILES => 'unfcan.h unfcmb.h unfcmp.h unfcpt.h unfexc.h' }; - } diff --git a/Unicode-Normalize-1.25-Upgrade-to-1.26.patch b/Unicode-Normalize-1.25-Upgrade-to-1.26.patch new file mode 100644 index 0000000..f443b59 --- /dev/null +++ b/Unicode-Normalize-1.25-Upgrade-to-1.26.patch @@ -0,0 +1,111 @@ +From 5ee924afc3aff6f8030a3a5523bb7d3f7f69fc52 Mon Sep 17 00:00:00 2001 +From: Jitka Plesnikova +Date: Thu, 24 May 2018 12:07:22 +0200 +Subject: [PATCH] Upgrade to 1.26 + +--- + Changes | 3 +++ + Makefile.PL | 2 +- + Normalize.pm | 22 +++++++++++----------- + 3 files changed, 15 insertions(+), 12 deletions(-) + +diff --git a/Changes b/Changes +index ead5b3e..22ec16e 100644 +--- a/Changes ++++ b/Changes +@@ -1,5 +1,8 @@ + Revision history for Perl extension Unicode::Normalize. + ++1.26 *** RELEASE DATE HERE *** ++ - Switch to XSLoader from Dynaloader ++ + 1.25 Wed Dec 16 03:05:57 UTC 2015 + - Fix Normalize.xs to work on releases earlier than 5.8. The problem was + introduced in this module's version 1.24 +diff --git a/Makefile.PL b/Makefile.PL +index 44a4b8d..18bc2e2 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -8,7 +8,7 @@ my $mm_ver = ExtUtils::MakeMaker->VERSION; + if (-f "Normalize.xs") { + print STDERR "Making header files for XS...\n"; + +- do 'mkheader' or die $@ || "mkheader: $!"; ++ do './mkheader' or die $@ || "mkheader: $!"; + + $clean = { FILES => 'unfcan.h unfcmb.h unfcmp.h unfcpt.h unfexc.h' }; + } +diff --git a/Normalize.pm b/Normalize.pm +index ff6c0f0..adf3db5 100644 +--- a/Normalize.pm ++++ b/Normalize.pm +@@ -16,7 +16,7 @@ use Carp; + + no warnings 'utf8'; + +-our $VERSION = '1.25'; ++our $VERSION = '1.26'; + our $PACKAGE = __PACKAGE__; + + our @EXPORT = qw( NFC NFD NFKC NFKD ); +@@ -56,9 +56,9 @@ require Exporter; + + ##### The above part is common to XS and PP ##### + +-our @ISA = qw(Exporter DynaLoader); +-require DynaLoader; +-bootstrap Unicode::Normalize $VERSION; ++our @ISA = qw(Exporter); ++use XSLoader (); ++XSLoader::load( 'Unicode::Normalize', $VERSION ); + + ##### The below part is common to XS and PP ##### + +@@ -161,7 +161,7 @@ Unicode::Normalize - Unicode Normalization Forms + + Parameters: + +-C<$string> is used as a string under character semantics (see F). ++C<$string> is used as a string under character semantics (see L). + + C<$code_point> should be an unsigned integer representing a Unicode code point. + +@@ -238,8 +238,8 @@ the decomposition is compatibility decomposition. + + The string returned is not always in NFD/NFKD. Reordering may be required. + +- $NFD_string = reorder(decompose($string)); # eq. to NFD() +- $NFKD_string = reorder(decompose($string, TRUE)); # eq. to NFKD() ++ $NFD_string = reorder(decompose($string)); # eq. to NFD() ++ $NFKD_string = reorder(decompose($string, TRUE)); # eq. to NFKD() + + =item C<$reordered_string = reorder($string)> + +@@ -277,12 +277,12 @@ should be equal to the entire C<$normalized>. + When you have a C<$normalized> string and an C<$unnormalized> string + following it, a simple concatenation is wrong: + +- $concat = $normalized . normalize($form, $unnormalized); # wrong! ++ $concat = $normalized . normalize($form, $unnormalized); # wrong! + + Instead of it, do like this: + +- ($processed, $unprocessed) = splitOnLastStarter($normalized); +- $concat = $processed . normalize($form, $unprocessed.$unnormalized); ++ ($processed, $unprocessed) = splitOnLastStarter($normalized); ++ $concat = $processed . normalize($form,$unprocessed.$unnormalized); + + C should be called with a pre-normalized parameter + C<$normalized>, that is in the same form as C<$form> you want. +@@ -548,7 +548,7 @@ compiled into your perl. The following table lists the default Unicode + version that comes with various perl versions. (It is possible to change + the Unicode version in any perl version to be any earlier Unicode version, + so one could cause Unicode 3.2 to be used in any perl version starting with +-5.8.0. See C<$Config{privlib}>/F. ++5.8.0. Read F/unicore/README.perl> for details. + + perl's version implemented Unicode version + 5.6.1 3.0.1 +-- +2.14.3 + diff --git a/perl-Unicode-Normalize.spec b/perl-Unicode-Normalize.spec index 9ba1a0c..2820a8e 100644 --- a/perl-Unicode-Normalize.spec +++ b/perl-Unicode-Normalize.spec @@ -1,11 +1,13 @@ +%global base_version 1.25 Name: perl-Unicode-Normalize -Version: 1.25 -Release: 397%{?dist} +Version: 1.26 +Release: 1%{?dist} Summary: Unicode Normalization Forms License: GPL+ or Artistic URL: http://search.cpan.org/dist/Unicode-Normalize/ -Source0: http://www.cpan.org/authors/id/K/KH/KHW/Unicode-Normalize-%{version}.tar.gz -Patch0: Unicode-Normalize-1.25-Fixes-for-removal-dot-from-INC.patch +Source0: http://www.cpan.org/authors/id/K/KH/KHW/Unicode-Normalize-%{base_version}.tar.gz +# Unbundled from perl 5.28.0-RC1 +Patch0: Unicode-Normalize-1.25-Upgrade-to-1.26.patch BuildRequires: findutils BuildRequires: gcc BuildRequires: make @@ -23,8 +25,8 @@ BuildRequires: perl(SelectSaver) BuildRequires: perl(strict) BuildRequires: perl(warnings) # Run-time: -BuildRequires: perl(DynaLoader) BuildRequires: perl(Exporter) +BuildRequires: perl(XSLoader) Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Conflicts: perl < 4:5.22.0-347 @@ -33,7 +35,7 @@ This package provides Perl functions that can convert strings into various Unicode normalization forms as defined in Unicode Standard Annex #15. %prep -%setup -q -n Unicode-Normalize-%{version} +%setup -q -n Unicode-Normalize-%{base_version} %patch0 -p1 %build @@ -56,6 +58,9 @@ make test %{_mandir}/man3/* %changelog +* Thu May 24 2018 Jitka Plesnikova - 1.26-1 +- Upgrade to 1.26 as provided in perl-5.28.0-RC1 + * Wed Mar 07 2018 Petr Pisar - 1.25-397 - Modernize spec file