From 91f22c53bfb8aa8fbe8fff6e7ca8ce505d5d1863 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Wed, 10 Jan 2024 02:38:30 +0300 Subject: [PATCH] import perl-Locale-US-3.04-13.el9 --- .gitignore | 1 + .perl-Locale-US.metadata | 1 + SOURCES/Locale-US-2.112140-rt56989.patch | 21 +++ SOURCES/locale_us.patch | 20 +++ SOURCES/perl-Locale-US.rpmlintrc | 3 + SOURCES/spelling.patch | 21 +++ SPECS/perl-Locale-US.spec | 158 +++++++++++++++++++++++ 7 files changed, 225 insertions(+) create mode 100644 .gitignore create mode 100644 .perl-Locale-US.metadata create mode 100644 SOURCES/Locale-US-2.112140-rt56989.patch create mode 100644 SOURCES/locale_us.patch create mode 100644 SOURCES/perl-Locale-US.rpmlintrc create mode 100644 SOURCES/spelling.patch create mode 100644 SPECS/perl-Locale-US.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1ce2fe2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/Locale-US-3.04.tar.gz diff --git a/.perl-Locale-US.metadata b/.perl-Locale-US.metadata new file mode 100644 index 0000000..ea76f1f --- /dev/null +++ b/.perl-Locale-US.metadata @@ -0,0 +1 @@ +e8a53b36a6774588522e26c6fa79671b28d42895 SOURCES/Locale-US-3.04.tar.gz diff --git a/SOURCES/Locale-US-2.112140-rt56989.patch b/SOURCES/Locale-US-2.112140-rt56989.patch new file mode 100644 index 0000000..92698cb --- /dev/null +++ b/SOURCES/Locale-US-2.112140-rt56989.patch @@ -0,0 +1,21 @@ +--- Locale-US/t/1.t ++++ Locale-US/t/1.t +@@ -6,7 +6,7 @@ + # change 'tests => 1' to 'tests => last_test_to_print'; + + use Test; +-BEGIN { plan tests => 3 }; ++BEGIN { plan tests => 4 }; + use Locale::US; + ok(1); # If we made it this far, we're ok. + +@@ -32,4 +32,8 @@ ok ( + $u->{state2code}{$state}, $code + ); + +- ++# rt #56989 Locale::US fails after second call to new ++my $v = Locale::US->new(); ++ok ( ++ $v->{code2state}{$code}, $state ++); diff --git a/SOURCES/locale_us.patch b/SOURCES/locale_us.patch new file mode 100644 index 0000000..0e213f5 --- /dev/null +++ b/SOURCES/locale_us.patch @@ -0,0 +1,20 @@ +diff -up Locale-US-1.2/US.pm.orig Locale-US-1.2/US.pm +--- Locale-US-1.2/US.pm.orig 2007-07-17 01:06:51.000000000 +0200 ++++ Locale-US-1.2/US.pm 2011-01-27 06:19:26.000000000 +0100 +@@ -36,6 +36,7 @@ sub new { + + my $class = shift; + my $self = {} ; ++ my $start_pos = tell( DATA ); + + while ( ) { + chomp; +@@ -46,6 +47,8 @@ sub new { + $self->{state2code}{$state} = $code; + } + ++ seek( DATA, $start_pos, 0 ); ++ + # warn Dumper $self; + bless $self, $class; + } diff --git a/SOURCES/perl-Locale-US.rpmlintrc b/SOURCES/perl-Locale-US.rpmlintrc new file mode 100644 index 0000000..463fd58 --- /dev/null +++ b/SOURCES/perl-Locale-US.rpmlintrc @@ -0,0 +1,3 @@ +from Config import * +addFilter("spelling-error %description -l en_US versa -> ") +addFilter("spelling-error Summary\(en_US\) versa -> ") diff --git a/SOURCES/spelling.patch b/SOURCES/spelling.patch new file mode 100644 index 0000000..f84900f --- /dev/null +++ b/SOURCES/spelling.patch @@ -0,0 +1,21 @@ +diff -up Locale-US-1.2/US.pm.orig Locale-US-1.2/US.pm +--- Locale-US-1.2/US.pm.orig 2011-03-22 17:34:05.000000000 +0100 ++++ Locale-US-1.2/US.pm 2011-03-22 17:34:41.000000000 +0100 +@@ -152,7 +152,7 @@ Locale::US - two letter codes for state + + =head1 ABSTRACT + +-Map from US two-letter codes to statees and vice versa. ++Map from US two-letter codes to states and vice versa. + + =head1 DESCRIPTION + +@@ -188,7 +188,7 @@ http://www.usps.gov/ncsc/lookups/usps_ab + + Online file with the USPS two-letter codes for the United States and its possessions. + +-=head1 AUXILLIARY CODE: ++=head1 AUXILIARY CODE: + + lynx -dump http://www.usps.gov/ncsc/lookups/usps_abbreviations.htm > kruft.txt + kruft2codes.pl diff --git a/SPECS/perl-Locale-US.spec b/SPECS/perl-Locale-US.spec new file mode 100644 index 0000000..56a494a --- /dev/null +++ b/SPECS/perl-Locale-US.spec @@ -0,0 +1,158 @@ +Name: perl-Locale-US +Version: 3.04 +Release: 13%{?dist} +Summary: Two letter codes for state identification in the United States and vice versa +License: GPL+ or Artistic +URL: https://metacpan.org/release/Locale-US +Source0: https://cpan.metacpan.org/modules/by-module/Locale/Locale-US-%{version}.tar.gz +Patch1: Locale-US-2.112140-rt56989.patch +BuildArch: noarch +# Build +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: make +BuildRequires: perl-generators +BuildRequires: perl-interpreter +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: sed +# Run-time +BuildRequires: perl(Data::Section::Simple) +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +# Tests +BuildRequires: perl(Test) +# Dependencies +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) + +%description +Map from US two-letter codes to states and vice versa. + +%prep +%setup -q -n Locale-US-%{version} + +# Add regression test for CPAN RT#56989 +%patch1 -p1 + +# Doesn't actually use Data::Dumper +sed -i -e '/use Data::Dumper/d' lib/Locale/US.pm t/1.t + +# Script should be executable, even if it's just a doc +chmod -c +x kruft2codes.pl + +%build +perl Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + +%install +make pure_install DESTDIR=%{buildroot} +find %{buildroot} -type f -name .packlist -delete +%{_fixperms} -c %{buildroot} + +%check +make test + +%files +%if 0%{?_licensedir:1} +%license LICENSE +%else +%doc LICENSE +%endif +%doc Changes README codes.dat kruft.txt kruft2codes.pl +%{perl_vendorlib}/Locale/ +%{_mandir}/man3/Locale::US*.3* + +%changelog +* Wed Jan 10 2024 MSVSphere Packaging Team - 3.04-13 +- Rebuilt for MSVSphere 9.3 + +* Tue Oct 15 2019 Paul Howarth - 3.04-13 +- Spec tidy-up + - Use author-independent source URL + - Simplify find command using -delete + - Fix permissions verbosely + +* Fri Jul 26 2019 Fedora Release Engineering - 3.04-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri May 31 2019 Jitka Plesnikova - 3.04-11 +- Perl 5.30 rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 3.04-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 3.04-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Jun 28 2018 Jitka Plesnikova - 3.04-8 +- Perl 5.28 rebuild + +* Thu Feb 08 2018 Fedora Release Engineering - 3.04-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 3.04-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sun Jun 04 2017 Jitka Plesnikova - 3.04-5 +- Perl 5.26 rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 3.04-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Sun May 15 2016 Jitka Plesnikova - 3.04-3 +- Perl 5.24 rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 3.04-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Sep 2 2015 Paul Howarth - 3.04-1 +- Update to 3.04 + - New upstream maintainer Mike Accardo +- This release by ACCARDO → update source URL +- Remove old spec cruft +- Add regression test for CPAN RT#56989 +- Use %%license where possible + +* Thu Jun 18 2015 Fedora Release Engineering - 2.112150-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri Jun 05 2015 Jitka Plesnikova - 2.112150-10 +- Perl 5.22 rebuild + +* Wed Aug 27 2014 Jitka Plesnikova - 2.112150-9 +- Perl 5.20 rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 2.112150-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Aug 03 2013 Fedora Release Engineering - 2.112150-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Jul 18 2013 Petr Pisar - 2.112150-6 +- Perl 5.18 rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 2.112150-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Jul 20 2012 Fedora Release Engineering - 2.112150-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jun 12 2012 Petr Pisar - 2.112150-3 +- Perl 5.16 rebuild +- Specify all dependencies + +* Fri Jan 13 2012 Fedora Release Engineering - 2.112150-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Sun Aug 28 2011 Iain Arnell 2.112150-1 +- update to latest upstream +- drop unnecessary patches + +* Wed Jun 15 2011 Marcela Mašláňová - 1.2-3 +- Perl mass rebuild + +* Tue Mar 22 2011 Iain Arnell 1.2-2 +- fix spelling in pod (rt#62218) +- install kruft2codes.pl as doc + +* Thu Jan 27 2011 Iain Arnell 1.2-1 +- Specfile autogenerated by cpanspec 1.78.