commit 97eadfe4530ffba2c78f4f2df9dd3e8efc54312d Author: Petr Šabata <contyk@xxxxxxxxxx> Date: Tue Dec 2 11:43:27 2014 +0100 Fix build with Lingua::EN::Numbers >= 2.00 (#1153134) - Modernize the package ...-Easy-2009110701-abandon-the-oo-interface.patch | 24 ++++++++++++++ perl-Lingua-EN-Numbers-Easy.spec | 34 ++++++++++++------- 2 files changed, 45 insertions(+), 13 deletions(-) --- diff --git a/Lingua-EN-Numbers-Easy-2009110701-abandon-the-oo-interface.patch b/Lingua-EN-Numbers-Easy-2009110701-abandon-the-oo-interface.patch new file mode 100644 index 0000000..a368531 --- /dev/null +++ b/Lingua-EN-Numbers-Easy-2009110701-abandon-the-oo-interface.patch @@ -0,0 +1,24 @@ +diff --git a/lib/Lingua/EN/Numbers/Easy.pm b/lib/Lingua/EN/Numbers/Easy.pm +index 6926c14..7b2a9a8 100644 +--- a/lib/Lingua/EN/Numbers/Easy.pm ++++ b/lib/Lingua/EN/Numbers/Easy.pm +@@ -7,7 +7,7 @@ no warnings 'syntax'; + our $VERSION = '2009110701'; + our %N; + +-use Lingua::EN::Numbers 1.01; ++use Lingua::EN::Numbers 1.01 qw(num2en); + + sub import { + my ($pkg, $hash) = grep {$_ ne 'American' and +@@ -27,8 +27,8 @@ sub FETCH { + my $self = shift; + my $value = shift; + return $self -> {$value} if exists $self -> {$value}; +- (my $n = Lingua::EN::Numbers -> new) -> parse ($value) or return; +- $self -> {$value} = lc $n -> get_string; ++ my $n = num2en($value) or return; ++ $self -> {$value} = lc $n; + } + + sub STORE {die} diff --git a/perl-Lingua-EN-Numbers-Easy.spec b/perl-Lingua-EN-Numbers-Easy.spec index 38f2fc5..e570a58 100644 --- a/perl-Lingua-EN-Numbers-Easy.spec +++ b/perl-Lingua-EN-Numbers-Easy.spec @@ -1,19 +1,25 @@ Name: perl-Lingua-EN-Numbers-Easy Version: 2009110701 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Hash access to Lingua::EN::Numbers objects License: MIT -Group: Development/Libraries URL: http://search.cpan.org/dist/Lingua-EN-Numbers-Easy/ Source0: http://www.cpan.org/authors/id/A/AB/ABIGAIL/Lingua-EN-Numbers-Easy-%{version}.tar.gz +Patch0: Lingua-EN-Numbers-Easy-2009110701-abandon-the-oo-interface.patch BuildArch: noarch -BuildRequires: perl >= 0:5.006 -BuildRequires: perl(ExtUtils::MakeMaker) +# Build +BuildRequires: perl +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +# Runtime +BuildRequires: perl(Lingua::EN::Numbers) +# Tests only +BuildRequires: perl(Test::Kwalitee) BuildRequires: perl(Test::More) -BuildRequires: perl(Lingua::EN::Numbers) >= 1.01 -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) - -%{?perl_default_filter} # Filters (not)shared c libs +BuildRequires: perl(Test::Pod) >= 1.00 +BuildRequires: perl(Test::Pod::Coverage) >= 1.00 +Requires: perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version)) %description Lingua::EN::Numbers is a module that translates numbers to English words. @@ -23,27 +29,29 @@ to words using a tied hash, which can be interpolated. %prep %setup -q -n Lingua-EN-Numbers-Easy-%{version} +%patch0 -p1 %build -%{__perl} Makefile.PL INSTALLDIRS=vendor +perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 make %{?_smp_mflags} %install make pure_install DESTDIR=%{buildroot} - -find %{buildroot} -type f -name .packlist -exec rm -f {} \; - %{_fixperms} %{buildroot}/* %check make test %files -%doc Changes +%doc Changes README %{perl_vendorlib}/* %{_mandir}/man3/* %changelog +* Tue Dec 02 2014 Petr Šabata <contyk@xxxxxxxxxx> - 2009110701-9 +- Fix build with Lingua::EN::Numbers >= 2.00 (#1153134) +- Modernize the package + * Wed Aug 27 2014 Jitka Plesnikova <jplesnik@xxxxxxxxxx> - 2009110701-8 - Perl 5.20 rebuild -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel