From e562923a101133a5ff94e32787747f8cc5de4e50 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Fri, 24 Aug 2012 20:03:45 +0100 Subject: [PATCH] Drop EPEL-4 support - Drop EPEL-4 support - Drop %defattr, redundant since rpm 4.4 - Test::LeakTrace, Test::Requires and Test::Script are now universally available - A suitably recent version of ExtUtils::MakeMaker is now universally available - Don't need to remove empty directories from the buildroot --- Package-Stash-0.31-no-Test::Requires.patch | 11 ------ Package-Stash-0.32-EU::MM-version.patch | 30 ---------------- Package-Stash-0.32-no-Test::LeakTrace.patch | 26 -------------- perl-Package-Stash.spec | 40 +++++---------------- 4 files changed, 9 insertions(+), 98 deletions(-) delete mode 100644 Package-Stash-0.31-no-Test::Requires.patch delete mode 100644 Package-Stash-0.32-EU::MM-version.patch delete mode 100644 Package-Stash-0.32-no-Test::LeakTrace.patch diff --git a/Package-Stash-0.31-no-Test::Requires.patch b/Package-Stash-0.31-no-Test::Requires.patch deleted file mode 100644 index 0fb6de9..0000000 --- a/Package-Stash-0.31-no-Test::Requires.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Package-Stash/t/impl-selection/basic-xs.t -+++ Package-Stash/t/impl-selection/basic-xs.t -@@ -3,7 +3,7 @@ use strict; - use warnings; - use Test::More tests => 124; - use Test::Fatal; --use Test::Requires 'Package::Stash::XS'; -+use Package::Stash::XS; - - BEGIN { $Package::Stash::IMPLEMENTATION = 'XS' } - diff --git a/Package-Stash-0.32-EU::MM-version.patch b/Package-Stash-0.32-EU::MM-version.patch deleted file mode 100644 index 23093c7..0000000 --- a/Package-Stash-0.32-EU::MM-version.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- Package-Stash/Makefile.PL -+++ Package-Stash/Makefile.PL -@@ -3,7 +3,7 @@ - BEGIN { require 5.8.1; } - use strict; - use warnings; --use ExtUtils::MakeMaker 6.30; -+use ExtUtils::MakeMaker; - check_conflicts(); - - my %WriteMakefileArgs = ( -@@ -16,7 +16,7 @@ - }, - 'CONFIGURE_REQUIRES' => { - 'Dist::CheckConflicts' => '0.02', -- 'ExtUtils::MakeMaker' => '6.30' -+ 'ExtUtils::MakeMaker' => '0' - }, - 'DISTNAME' => 'Package-Stash', - 'EXE_FILES' => [ -@@ -52,6 +52,9 @@ - delete $WriteMakefileArgs{CONFIGURE_REQUIRES} - unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; - -+delete $WriteMakefileArgs{LICENSE} -+ unless eval { ExtUtils::MakeMaker->VERSION(6.30) }; -+ - $WriteMakefileArgs{PREREQ_PM}{'Package::Stash::XS'} = 0.24 - if can_cc(); - diff --git a/Package-Stash-0.32-no-Test::LeakTrace.patch b/Package-Stash-0.32-no-Test::LeakTrace.patch deleted file mode 100644 index a1a32b3..0000000 --- a/Package-Stash-0.32-no-Test::LeakTrace.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -up Package-Stash-0.32/t/author-leaks-debug.t.orig Package-Stash-0.32/t/author-leaks-debug.t ---- Package-Stash-0.32/t/author-leaks-debug.t.orig 2011-09-06 12:43:32.000000000 +0100 -+++ Package-Stash-0.32/t/author-leaks-debug.t 2011-09-06 12:45:29.866712947 +0100 -@@ -12,7 +12,8 @@ use warnings; - use lib 't/lib'; - use Test::More; - use Test::Fatal; --use Test::LeakTrace; -+eval "use Test::LeakTrace"; -+plan skip_all => "Test::LeakTrace required for this test" if $@; - - plan tests => 29; - -diff -up Package-Stash-0.32/t/author-leaks.t.orig Package-Stash-0.32/t/author-leaks.t ---- Package-Stash-0.32/t/author-leaks.t.orig 2011-09-06 12:43:32.000000000 +0100 -+++ Package-Stash-0.32/t/author-leaks.t 2011-09-06 12:45:58.177640368 +0100 -@@ -12,7 +12,8 @@ use warnings; - use lib 't/lib'; - use Test::More; - use Test::Fatal; --use Test::LeakTrace; -+eval "use Test::LeakTrace"; -+plan skip_all => "Test::LeakTrace required for this test" if $@; - - plan tests => 29; - diff --git a/perl-Package-Stash.spec b/perl-Package-Stash.spec index dfd307d..43359f9 100644 --- a/perl-Package-Stash.spec +++ b/perl-Package-Stash.spec @@ -1,21 +1,15 @@ # We need to patch the test suite if we have an old version of Test::More -%global old_test_more %(perl -MTest::More -e 'printf "%d\\n", $Test::More::VERSION < 0.88 ? 1 : 0;' 2>/dev/null || echo 0) - -# We don't really need ExtUtils::MakeMaker ≥ 6.30 -%global old_eumm %(perl -MExtUtils::MakeMaker -e 'printf "%d\\n", $ExtUtils::MakeMaker::VERSION < 6.30 ? 1 : 0;' 2>/dev/null || echo 0) +%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0) Name: perl-Package-Stash Version: 0.33 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Routines for manipulating stashes Group: Development/Libraries License: GPL+ or Artistic URL: http://search.cpan.org/dist/Package-Stash/ Source0: http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Package-Stash-%{version}.tar.gz -Patch0: Package-Stash-0.32-EU::MM-version.patch Patch1: Package-Stash-0.32-old-Test::More.patch -Patch2: Package-Stash-0.31-no-Test::Requires.patch -Patch3: Package-Stash-0.32-no-Test::LeakTrace.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildArch: noarch BuildRequires: perl(Carp) @@ -35,15 +29,9 @@ BuildRequires: perl(Test::More) BuildRequires: perl(Test::NoTabs) BuildRequires: perl(Test::Pod) BuildRequires: perl(Test::Pod::Coverage) -# Test::Requires not in EPEL-4 -%if "%{?rhel}" != "4" BuildRequires: perl(Test::Requires) -%endif -# Test::LeakTrace and Test::Script not in EPEL-4 or EPEL-5 -%if "%{?rhel}" != "4" && "%{?rhel}" != "5" BuildRequires: perl(Test::LeakTrace) BuildRequires: perl(Test::Script) -%endif Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) # For performance and consistency Requires: perl(Package::Stash::XS) >= 0.24 @@ -58,26 +46,11 @@ a simple API. %prep %setup -q -n Package-Stash-%{version} -# Don't really need ExtUtils::MakeMaker ≥ 6.30 -%if %{old_eumm} -%patch0 -p1 -%endif - # Compatibility with old Test::More versions %if %{old_test_more} %patch1 -p1 %endif -# Work around absence of Test::Requires in EPEL-4 -%if "%{?rhel}" == "4" -%patch2 -p1 -%endif - -# Skip the memory leak tests if we don't have Test::LeakTrace -%if "%{?rhel}" == "4" || "%{?rhel}" == "5" -%patch3 -p1 -%endif - %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} @@ -86,7 +59,6 @@ make %{?_smp_mflags} rm -rf %{buildroot} make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -exec rm -f {} \; -find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null %{_fixperms} %{buildroot} %check @@ -96,7 +68,6 @@ make test AUTHOR_TESTING=1 RELEASE_TESTING=1 rm -rf %{buildroot} %files -%defattr(-,root,root,-) %doc Changes LICENSE README %{_bindir}/package-stash-conflicts %{perl_vendorlib}/Package/ @@ -104,6 +75,13 @@ rm -rf %{buildroot} %{_mandir}/man3/Package::Stash::PP.3pm* %changelog +* Fri Aug 24 2012 Paul Howarth - 0.33-6 +- Drop EPEL-4 support + - Drop %%defattr, redundant since rpm 4.4 + - Test::LeakTrace, Test::Requires and Test::Script are now universally available + - A suitably recent version of ExtUtils::MakeMaker is now universally available +- Don't need to remove empty directories from the buildroot + * Tue Aug 14 2012 Petr Pisar - 0.33-5 - Specify all dependendencies