From 8816cdd3e940c3382028a7982b84bd9c00fa0e02 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 01 2019 19:48:58 +0000 Subject: import perl-Module-Implementation-0.06-6.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b06979e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/Module-Implementation-0.06.tar.gz diff --git a/.perl-Module-Implementation.metadata b/.perl-Module-Implementation.metadata new file mode 100644 index 0000000..debe554 --- /dev/null +++ b/.perl-Module-Implementation.metadata @@ -0,0 +1 @@ +bf3f7a443f18c78a72f62d151d46ed2a81ef701d SOURCES/Module-Implementation-0.06.tar.gz diff --git a/SOURCES/Module-Implementation-0.05-old-Test::More.patch b/SOURCES/Module-Implementation-0.05-old-Test::More.patch new file mode 100644 index 0000000..5d7fb41 --- /dev/null +++ b/SOURCES/Module-Implementation-0.05-old-Test::More.patch @@ -0,0 +1,168 @@ +diff -up Module-Implementation-0.05/t/basic.t.orig Module-Implementation-0.05/t/basic.t +--- Module-Implementation-0.05/t/basic.t.orig 2012-02-09 14:49:29.000000000 +0000 ++++ Module-Implementation-0.05/t/basic.t 2012-02-10 10:53:07.453271294 +0000 +@@ -1,7 +1,7 @@ + use strict; + use warnings; + +-use Test::More 0.88; ++use Test::More tests => 5; + + { + package T; +@@ -33,5 +33,3 @@ use Test::More 0.88; + 'T::_implementation returns default implementation' + ); + } +- +-done_testing(); +diff -up Module-Implementation-0.05/t/both-fail.t.orig Module-Implementation-0.05/t/both-fail.t +--- Module-Implementation-0.05/t/both-fail.t.orig 2012-02-09 14:49:29.000000000 +0000 ++++ Module-Implementation-0.05/t/both-fail.t 2012-02-10 10:53:07.461271306 +0000 +@@ -1,7 +1,7 @@ + use strict; + use warnings; + +-use Test::More 0.88; ++use Test::More tests => 1; + use Test::Fatal; + + { +@@ -24,5 +24,3 @@ use Test::Fatal; + 'Got an exception when all implementations fail to load' + ); + } +- +-done_testing(); +diff -up Module-Implementation-0.05/t/env-value.t.orig Module-Implementation-0.05/t/env-value.t +--- Module-Implementation-0.05/t/env-value.t.orig 2012-02-09 14:49:29.000000000 +0000 ++++ Module-Implementation-0.05/t/env-value.t 2012-02-10 10:53:07.462271308 +0000 +@@ -1,7 +1,7 @@ + use strict; + use warnings; + +-use Test::More 0.88; ++use Test::More tests => 4; + + { + package T; +@@ -35,5 +35,3 @@ use Test::More 0.88; + 'T::_implementation returns implementation set in ENV' + ); + } +- +-done_testing(); +diff -up Module-Implementation-0.05/t/more-symbols.t.orig Module-Implementation-0.05/t/more-symbols.t +--- Module-Implementation-0.05/t/more-symbols.t.orig 2012-02-09 14:49:29.000000000 +0000 ++++ Module-Implementation-0.05/t/more-symbols.t 2012-02-10 10:53:07.462271308 +0000 +@@ -1,7 +1,7 @@ + use strict; + use warnings; + +-use Test::More 0.88; ++use Test::More tests => 7; + + { + package T; +@@ -43,5 +43,3 @@ use Test::More 0.88; + '%T::HASH was copied from implementation' + ); + } +- +-done_testing(); +diff -up Module-Implementation-0.05/t/one-impl-fails1.t.orig Module-Implementation-0.05/t/one-impl-fails1.t +--- Module-Implementation-0.05/t/one-impl-fails1.t.orig 2012-02-09 14:49:29.000000000 +0000 ++++ Module-Implementation-0.05/t/one-impl-fails1.t 2012-02-10 10:53:07.462271308 +0000 +@@ -1,7 +1,7 @@ + use strict; + use warnings; + +-use Test::More 0.88; ++use Test::More tests => 2; + + { + package T; +@@ -24,5 +24,3 @@ use Test::More 0.88; + ok( T->can('return_42'), 'T package has a return_42 sub' ); + ok( !T->can('return_package'), 'T package has a return_package sub' ); + } +- +-done_testing(); +diff -up Module-Implementation-0.05/t/one-impl-fails2.t.orig Module-Implementation-0.05/t/one-impl-fails2.t +--- Module-Implementation-0.05/t/one-impl-fails2.t.orig 2012-02-09 14:49:29.000000000 +0000 ++++ Module-Implementation-0.05/t/one-impl-fails2.t 2012-02-10 10:53:07.463271310 +0000 +@@ -1,7 +1,7 @@ + use strict; + use warnings; + +-use Test::More 0.88; ++use Test::More tests => 2; + + { + package T; +@@ -24,5 +24,3 @@ use Test::More 0.88; + ok( T->can('return_42'), 'T package has a return_42 sub' ); + ok( !T->can('return_package'), 'T package has a return_package sub' ); + } +- +-done_testing(); +diff -up Module-Implementation-0.05/t/release-cpan-changes.t.orig Module-Implementation-0.05/t/release-cpan-changes.t +--- Module-Implementation-0.05/t/release-cpan-changes.t.orig 2012-02-09 14:49:29.000000000 +0000 ++++ Module-Implementation-0.05/t/release-cpan-changes.t 2012-02-10 10:53:07.463271310 +0000 +@@ -1,15 +1,11 @@ + #!perl + ++use Test::More; ++ + BEGIN { +- unless ($ENV{RELEASE_TESTING}) { +- require Test::More; +- Test::More::plan(skip_all => 'these tests are for release candidate testing'); +- } ++ plan skip_all => 'these tests are for release candidate testing' unless ($ENV{RELEASE_TESTING}); ++ eval 'use Test::CPAN::Changes'; ++ plan skip_all => 'Test::CPAN::Changes required for this test' if $@; + } + +- +-use Test::More; +-eval 'use Test::CPAN::Changes'; +-plan skip_all => 'Test::CPAN::Changes required for this test' if $@; + changes_ok(); +-done_testing(); +diff -up Module-Implementation-0.05/t/requested-fails.t.orig Module-Implementation-0.05/t/requested-fails.t +--- Module-Implementation-0.05/t/requested-fails.t.orig 2012-02-09 14:49:29.000000000 +0000 ++++ Module-Implementation-0.05/t/requested-fails.t 2012-02-10 10:53:07.463271310 +0000 +@@ -1,7 +1,7 @@ + use strict; + use warnings; + +-use Test::More 0.88; ++use Test::More tests => 1; + use Test::Fatal; + + { +@@ -26,5 +26,3 @@ use Test::Fatal; + 'Got an exception when implementation requested in env value fails to load' + ); + } +- +-done_testing(); +diff -up Module-Implementation-0.05/t/taint.t.orig Module-Implementation-0.05/t/taint.t +--- Module-Implementation-0.05/t/taint.t.orig 2012-02-09 14:49:29.000000000 +0000 ++++ Module-Implementation-0.05/t/taint.t 2012-02-10 10:53:42.164322515 +0000 +@@ -7,7 +7,7 @@ use Test::Requires { + 'Test::Taint' => '0', + }; + +-use Test::More 0.88; ++use Test::More tests => 3; + use Test::Fatal; + + taint_checking_ok(); +@@ -42,5 +42,3 @@ taint_checking_ok(); + 'T::_implementation returns implementation set in ENV' + ); + } +- +-done_testing(); diff --git a/SPECS/perl-Module-Implementation.spec b/SPECS/perl-Module-Implementation.spec new file mode 100644 index 0000000..2fb0af1 --- /dev/null +++ b/SPECS/perl-Module-Implementation.spec @@ -0,0 +1,152 @@ +# We need to patch the test suite if we have an old version of Test::More +%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0) + +# Test::CPAN::Changes isn't available in EPEL < 7, due to requirement of perl(version) ≥ 0.79 +%global cpan_changes_available %(expr 0%{?fedora} + 0%{?rhel} '>' 6) + +#TODO: BR: Test::Pod::No404s when available +#TODO: BR: Test::Pod::LinkCheck when available + +Name: perl-Module-Implementation +Version: 0.06 +Release: 6%{?dist} +Summary: Loads one of several alternate underlying implementations for a module +Group: Development/Libraries +License: Artistic 2.0 +URL: http://search.cpan.org/dist/perl-Module-Implementation/ +Source0: http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Module-Implementation-%{version}.tar.gz +Patch1: Module-Implementation-0.05-old-Test::More.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) +BuildArch: noarch +# =================================================================== +# Build requirements +# =================================================================== +BuildRequires: perl(ExtUtils::MakeMaker) +# =================================================================== +# Module requirements +# =================================================================== +BuildRequires: perl(Carp) +BuildRequires: perl(Module::Runtime) >= 0.012 +BuildRequires: perl(Try::Tiny) +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +# =================================================================== +# Test suite requirements +# =================================================================== +BuildRequires: perl(lib) +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::More) +BuildRequires: perl(Test::Requires) +BuildRequires: perl(Test::Taint) +# =================================================================== +# Author/Release test requirements +# =================================================================== +%if %{cpan_changes_available} +BuildRequires: perl(Test::CPAN::Changes) +%endif +BuildRequires: perl(Test::EOL) +BuildRequires: perl(Test::NoTabs) +BuildRequires: perl(Test::Pod) +BuildRequires: perl(Test::Spelling) +# Can't use aspell-en from EPEL-7 as BR: for RHEL-7 package so skip the spell +# check test there; test would fail rather than skip without Test::Spelling so +# we need to keep that as a buildreq +%if 0%{?rhel} < 7 +BuildRequires: aspell-en +%endif +# =================================================================== +# Runtime requirements +# =================================================================== +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: perl(Carp) + +%description +This module abstracts out the process of choosing one of several underlying +implementations for a module. This can be used to provide XS and pure Perl +implementations of a module, or it could be used to load an implementation +for a given OS or any other case of needing to provide multiple +implementations. + +This module is only useful when you know all the implementations ahead of +time. If you want to load arbitrary implementations then you probably want +something like a plugin system, not this module. + +%prep +%setup -q -n Module-Implementation-%{version} + +# We have to patch the test suite if we have an old Test::More +%if %{old_test_more} +%patch1 -p1 +%endif + +%build +perl Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + +%install +rm -rf %{buildroot} +make pure_install DESTDIR=%{buildroot} +find %{buildroot} -type f -name .packlist -exec rm -f {} \; +%{_fixperms} %{buildroot} + +%check +make test RELEASE_TESTING=1 + +%clean +rm -rf %{buildroot} + +%files +%doc Changes LICENSE README +%{perl_vendorlib}/Module/ +%{_mandir}/man3/Module::Implementation.3pm* + +%changelog +* Fri Dec 27 2013 Daniel Mach - 0.06-6 +- Mass rebuild 2013-12-27 + +* Wed Aug 15 2012 Daniel Mach - 0.06-5.1 +- Rebuild for perl 5.16 + +* Fri Jul 20 2012 Fedora Release Engineering - 0.06-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Jun 13 2012 Petr Pisar - 0.06-4 +- Perl 5.16 rebuild + +* Thu Jun 7 2012 Paul Howarth - 0.06-3 +- Drop %%defattr, redundant since rpm 4.4 +- Don't need to remove empty directories from buildroot +- Add commentary regarding conditionalized buildreqs + +* Thu Jun 7 2012 Marcela Mašláňová - 0.06-2 +- Conditionalize aspell-en dependency + +* Sun Feb 12 2012 Paul Howarth - 0.06-1 +- Update to 0.06 + - Require Module::Runtime 0.012, which has a number of useful bug fixes + +* Fri Feb 10 2012 Paul Howarth - 0.05-1 +- Update to 0.05 + - Make Test::Taint an optional dependency; it requires XS, and requiring a + compiler for Module::Implementation defeats its purpose (CPAN RT#74817) +- BR: perl(Test::Requires) +- Update patch for building with old Test::More versions + +* Thu Feb 9 2012 Paul Howarth - 0.04-1 +- Update to 0.04 + - This module no longer installs an _implementation() subroutine in callers; + instead, you can call Module::Implementation::implementation_for($package) + to get the implementation used for a given package +- Update patch for building with old Test::More versions + +* Wed Feb 8 2012 Paul Howarth - 0.03-3 +- Incorporate feedback from package review (#788258) + - Correct License tag, which should be Artistic 2.0 + - BR: perl(lib) for test suite + - Explicitly require perl(Carp), not automatically detected + +* Tue Feb 7 2012 Paul Howarth - 0.03-2 +- Sanitize for Fedora submission + +* Tue Feb 7 2012 Paul Howarth - 0.03-1 +- Initial RPM version