[perl-namespace-clean] Update to 0.22

Paul Howarth pghmcfc at fedoraproject.org
Fri Jan 27 16:07:37 UTC 2012


commit 45a9ad32ef094aaebcd135f9e6a9dc2e23716ab9
Author: Paul Howarth <paul at city-fan.org>
Date:   Fri Jan 27 15:54:29 2012 +0000

    Update to 0.22
    
    - Update to 0.22
      - Limit the debugger workarounds to perls between 5.8.8 and 5.14, extend
        debugger support to all perl versions (CPAN RT#69862)
      - If possible, automatically install (but not load) the debugger workaround
        libraries on perls between 5.8.8 and 5.14 (CPAN RT#72368)
      - Add back dropped NAME section (CPAN RT#70259)
      - Simplify the ≥ 5.10 PP variant even more - move the hook from DESTROY
        into DELETE
      - Force explicit callback invocation order on 5.8 PP
      - Replace the %^H tie approach with fieldhashes, which fixes all known
        corner cases and caveats on supported perls ≥ 5.8.1 (CPAN RT#73402)
      - Compile away the debugger fixup on perls ≥ 5.15.5
    - Only BR:/R: Sub::Identify and Sub::Name for perl versions where they're
      actually needed
    - Reinstate compatibility with old distributions like EL-5
      - Patch test suite to work with Test::More < 0.88 if necessary
      - Filter dependency on Hash::Util::FieldHash on perl 5.8.x
      - Add back buildroot definition, %clean section, %defattr etc.
    - Only include tests if we have %{perl_default_filter} to avoid the unwanted
      requires/provides that come with them
    - Drop redundant buildreq perl(CPAN)
    - Make %files list more explicit
    - Use tabs

 .gitignore                                |    5 +-
 namespace-clean-0.22-old-Test::More.patch |   72 +++++++++
 perl-namespace-clean.spec                 |  222 +++++++++++++++++-----------
 3 files changed, 208 insertions(+), 91 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 2525e7a..30f0cce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1 @@
-namespace-clean-0.14.tar.gz
-namespace-clean-0.18.tar.gz
-/namespace-clean-0.20.tar.gz
-/namespace-clean-0.21.tar.gz
+/namespace-clean-[0-9.]*.tar.gz
diff --git a/namespace-clean-0.22-old-Test::More.patch b/namespace-clean-0.22-old-Test::More.patch
new file mode 100644
index 0000000..9a63b71
--- /dev/null
+++ b/namespace-clean-0.22-old-Test::More.patch
@@ -0,0 +1,72 @@
+diff -up namespace-clean-0.22/t/07-debugger.t.orig namespace-clean-0.22/t/07-debugger.t
+--- namespace-clean-0.22/t/07-debugger.t.orig	2011-12-21 09:50:20.000000000 +0000
++++ namespace-clean-0.22/t/07-debugger.t	2011-12-27 12:15:04.039679744 +0000
+@@ -17,6 +17,8 @@ BEGIN {
+ 
+ }
+ 
++plan tests => 4;
++
+ {
+     package Foo;
+ 
+@@ -35,5 +37,3 @@ ok( !Foo->can("foo"), "foo cleaned up" )
+ ok( !Foo->can("baz"), "baz cleaned up" );
+ 
+ Foo->bar();
+-
+-done_testing;
+diff -up namespace-clean-0.22/t/08-const-sub.t.orig namespace-clean-0.22/t/08-const-sub.t
+--- namespace-clean-0.22/t/08-const-sub.t.orig	2011-03-29 22:44:20.000000000 +0100
++++ namespace-clean-0.22/t/08-const-sub.t	2011-12-27 12:15:04.052679751 +0000
+@@ -1,7 +1,7 @@
+ use strict;
+ use warnings;
+ 
+-use Test::More 0.88;
++use Test::More tests => 2;
+ 
+ use constant CONST => 123;
+ use namespace::clean;
+@@ -10,5 +10,3 @@ my $x = CONST;
+ is $x, 123;
+ 
+ ok eval("!defined(&CONST)");
+-
+-done_testing;
+diff -up namespace-clean-0.22/t/09-fiddle-hinthash.t.orig namespace-clean-0.22/t/09-fiddle-hinthash.t
+--- namespace-clean-0.22/t/09-fiddle-hinthash.t.orig	2011-12-22 11:07:06.000000000 +0000
++++ namespace-clean-0.22/t/09-fiddle-hinthash.t	2011-12-27 12:15:43.780700500 +0000
+@@ -1,7 +1,7 @@
+ use strict;
+ use warnings;
+ 
+-use Test::More 0.88;
++use Test::More tests => 4;
+ 
+ {
+   package Bar;
+@@ -49,5 +49,3 @@ use Test::More 0.88;
+   }
+ }
+ 
+-
+-done_testing;
+diff -up namespace-clean-0.22/t/10-pure-perl.t.orig namespace-clean-0.22/t/10-pure-perl.t
+--- namespace-clean-0.22/t/10-pure-perl.t.orig	2011-12-22 11:20:21.000000000 +0000
++++ namespace-clean-0.22/t/10-pure-perl.t	2011-12-27 12:16:46.394733202 +0000
+@@ -8,6 +8,8 @@ plan skip_all => "PP tests already execu
+ eval { require B::Hooks::EndOfScope }
+   or plan skip_all => "PP tests already executed";
+ 
++plan tests => 11;
++
+ # the PP tests will run either wih D::H (mainly on smokers)
+ # or by setting the envvar (for users)
+ my $has_d_h = eval { require Devel::Hide };
+@@ -45,5 +47,3 @@ for my $fn (glob("$Bin/*.t")) {
+   wait;
+   ok (! $?, "Exit $? from: @cmd");
+ }
+-
+-done_testing;
diff --git a/perl-namespace-clean.spec b/perl-namespace-clean.spec
index 44a0a0c..ae2d0a7 100644
--- a/perl-namespace-clean.spec
+++ b/perl-namespace-clean.spec
@@ -1,38 +1,46 @@
-Name:           perl-namespace-clean
-Summary:        Keep your namespace tidy
-Version:        0.21
-Release:        3%{?dist}
-License:        GPL+ or Artistic
-Group:          Development/Libraries
-Source0:        http://search.cpan.org/CPAN/authors/id/R/RI/RIBASUSHI/namespace-clean-%{version}.tar.gz
-URL:            http://search.cpan.org/dist/namespace-clean
-Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
-BuildArch:      noarch
-
-BuildRequires:  perl(B::Hooks::EndOfScope) >= 0.07
-BuildRequires:  perl(constant)
-BuildRequires:  perl(CPAN)
-BuildRequires:  perl(Devel::Hide)
-BuildRequires:  perl(Exporter)
-BuildRequires:  perl(ExtUtils::MakeMaker)
-BuildRequires:  perl(FindBin)
-BuildRequires:  perl(Package::Stash) >= 0.23
-BuildRequires:  perl(Sub::Identify) >= 0.04
-BuildRequires:  perl(Sub::Name) >= 0.04
-BuildRequires:  perl(Test::More) >= 0.88
-BuildRequires:  perl(vars)
-
-# not automatically detected
-Requires:       perl(B::Hooks::EndOfScope) >= 0.07
-Requires:       perl(Sub::Identify) >= 0.04
-Requires:       perl(Sub::Name) >= 0.04
-
-# obsolete/provide old tests subpackage
-# can be removed during F19 development cycle
-Obsoletes:      %{name}-tests < 0.21-3
-Provides:       %{name}-tests = %{version}-%{release}
-
-%{?perl_default_filter}
+# 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)
+
+# With perl 5.8.9-5.12, we need Sub::Identify and Sub::Name
+%global fixup_rename_sub %(perl -e 'print (($] > 5.008_008_9 && $] < 5.013_006_1) ? 1 : 0);' 2>/dev/null || echo 0)
+
+Name:		perl-namespace-clean
+Summary:	Keep your namespace tidy
+Version:	0.22
+Release:	1%{?dist}
+License:	GPL+ or Artistic
+Group:		Development/Libraries
+URL:		http://search.cpan.org/dist/namespace-clean/
+Source0:	http://search.cpan.org/CPAN/authors/id/R/RI/RIBASUSHI/namespace-clean-%{version}.tar.gz
+Patch1:		namespace-clean-0.22-old-Test::More.patch
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
+BuildArch:	noarch
+BuildRequires:	perl(B::Hooks::EndOfScope) >= 0.07
+BuildRequires:	perl(constant)
+BuildRequires:	perl(Devel::Hide)
+BuildRequires:	perl(Exporter)
+BuildRequires:	perl(ExtUtils::MakeMaker)
+BuildRequires:	perl(FindBin)
+BuildRequires:	perl(Package::Stash) >= 0.23
+BuildRequires:	perl(Test::More)
+BuildRequires:	perl(vars)
+%if %{fixup_rename_sub}
+BuildRequires:	perl(Sub::Identify) >= 0.04
+BuildRequires:	perl(Sub::Name) >= 0.04
+Requires:	perl(Sub::Identify) >= 0.04
+Requires:	perl(Sub::Name) >= 0.04
+%endif
+Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+Requires:	perl(B::Hooks::EndOfScope) >= 0.07
+
+# Obsolete/Provide old tests subpackage
+# Can be removed during F19 development cycle
+%if 0%{?perl_default_filter:1}
+Obsoletes:	%{name}-tests < 0.21-3
+Provides:	%{name}-tests = %{version}-%{release}
+# Avoid unwanted requires/provides that come with the test suite
+%{perl_default_filter}
+%endif
 
 %description
 When you define a function, or import one, into a Perl package, it will
@@ -49,35 +57,75 @@ name, but they won't show up as methods on your class or instances.
 %prep
 %setup -q -n namespace-clean-%{version}
 
+# Patch test suite to work with Test::More < 0.88 if necessary
+%if %{old_test_more}
+%patch1 -p1
+%endif
+
+# The module doesn't try to use Hash::Util::FieldHash with 5.8.x
+%if %(perl -e 'print (($] < 5.009_003_1) ? 1 : 0);')
+%global perl_reqfilt /bin/sh -c "%{__perl_requires} | sed -e '/^perl(Hash::Util::FieldHash)/d'"
+%define __perl_requires %{perl_reqfilt}
+%endif
+
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
+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 {} ';'
 find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
-
-%{_fixperms} %{buildroot}/*
+%{_fixperms} %{buildroot}
 
 %check
 make test
 
+%clean
+rm -rf %{buildroot}
+
 %files
-%doc Changes t/
-%{perl_vendorlib}/*
-%{_mandir}/man3/*.3*
+%defattr(-,root,root,-)
+%doc Changes %{?perl_default_filter:t/}
+%{perl_vendorlib}/namespace/
+%{_mandir}/man3/namespace::clean.3pm*
 
 %changelog
-* Sun Jan 22 2012 Iain Arnell <iarnell at gmail.com> 0.21-3
-- drop tests subpackage; move tests to main package documentation
+* Fri Jan 27 2012 Paul Howarth <paul at city-fan.org> - 0.22-1
+- Update to 0.22
+  - Limit the debugger workarounds to perls between 5.8.8 and 5.14, extend
+    debugger support to all perl versions (CPAN RT#69862)
+  - If possible, automatically install (but not load) the debugger workaround
+    libraries on perls between 5.8.8 and 5.14 (CPAN RT#72368)
+  - Add back dropped NAME section (CPAN RT#70259)
+  - Simplify the ≥ 5.10 PP variant even more - move the hook from DESTROY
+    into DELETE
+  - Force explicit callback invocation order on 5.8 PP
+  - Replace the %^H tie approach with fieldhashes, which fixes all known
+    corner cases and caveats on supported perls ≥ 5.8.1 (CPAN RT#73402)
+  - Compile away the debugger fixup on perls ≥ 5.15.5
+- Only BR:/R: Sub::Identify and Sub::Name for perl versions where they're
+  actually needed
+- Reinstate compatibility with old distributions like EL-5
+  - Patch test suite to work with Test::More < 0.88 if necessary
+  - Filter dependency on Hash::Util::FieldHash on perl 5.8.x
+  - Add back buildroot definition, %%clean section, %%defattr etc.
+- Only include tests if we have %%{perl_default_filter} to avoid the unwanted
+  requires/provides that come with them
+- Drop redundant buildreq perl(CPAN)
+- Make %%files list more explicit
+- Use tabs
+
+* Sun Jan 22 2012 Iain Arnell <iarnell at gmail.com> - 0.21-3
+- Drop tests subpackage; move tests to main package documentation
 
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.21-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
-* Sun Oct 02 2011 Iain Arnell <iarnell at gmail.com> 0.21-1
-- update to latest upstream version
-- clean up spec for modern rpmbuild
+* Sun Oct 02 2011 Iain Arnell <iarnell at gmail.com> - 0.21-1
+- Update to latest upstream version
+- Clean up spec for modern rpmbuild
 
 * Wed Jul 20 2011 Petr Sabata <contyk at redhat.com> - 0.20-3
 - Perl mass rebuild
@@ -85,64 +133,64 @@ make test
 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.20-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
-* Sat Jan 08 2011 Iain Arnell <iarnell at gmail.com> 0.20-1
-- update to latest upstream version
-- update BR perl(Package::Stash) >= 0.22
+* Sat Jan 08 2011 Iain Arnell <iarnell at gmail.com> - 0.20-1
+- Update to latest upstream version
+- Update BR perl(Package::Stash) >= 0.22
 
 * Tue Dec 21 2010 Marcela Maslanova <mmaslano at redhat.com> - 0.18-2
-- 661697 rebuild for fixing problems with vendorach/lib
-
-* Sun Aug 01 2010 Iain Arnell <iarnell at gmail.com> 0.18-1
-- update by Fedora::App::MaintainerTools 0.006
-- updating to latest GA CPAN version (0.18)
-- added a new br on perl(Exporter) (version 0)
-- altered br on perl(ExtUtils::MakeMaker) (6.42 => 6.31)
-- added a new br on perl(Package::Stash) (version 0.03)
-- added a new br on perl(constant) (version 0)
-- added a new br on perl(vars) (version 0)
-- dropped old BR on perl(Symbol)
-- dropped old requires on perl(Symbol)
-- manually drop unnecesary requires
+- Rebuild to fix problems with vendorarch/lib (#661697)
+
+* Sun Aug 01 2010 Iain Arnell <iarnell at gmail.com> - 0.18-1
+- Update by Fedora::App::MaintainerTools 0.006
+- Updating to latest GA CPAN version (0.18)
+- Added a new br on perl(Exporter) (version 0)
+- Altered br on perl(ExtUtils::MakeMaker) (6.42 => 6.31)
+- Added a new br on perl(Package::Stash) (version 0.03)
+- Added a new br on perl(constant) (version 0)
+- Added a new br on perl(vars) (version 0)
+- Dropped old BR on perl(Symbol)
+- Dropped old requires on perl(Symbol)
+- Manually drop unnecessary requires
 
 * Tue May 04 2010 Marcela Maslanova <mmaslano at redhat.com> - 0.14-1
 - Mass rebuild with perl-5.12.0 & update
 
-* Tue Feb 23 2010 Chris Weyl <cweyl at alumni.drew.edu> 0.13-2
-- update by Fedora::App::MaintainerTools 0.003
+* Tue Feb 23 2010 Chris Weyl <cweyl at alumni.drew.edu> - 0.13-2
+- Update by Fedora::App::MaintainerTools 0.003
 - PERL_INSTALL_ROOT => DESTDIR
 
-* Fri Feb 05 2010 Chris Weyl <cweyl at alumni.drew.edu> 0.13-1
-- update filtering perl_default_filter
-- auto-update to 0.13 (by cpan-spec-update 0.01)
-- altered br on perl(ExtUtils::MakeMaker) (0 => 6.42)
-- added a new br on perl(Sub::Identify) (version 0.04)
-- added a new br on perl(Sub::Name) (version 0.04)
-- altered br on perl(Test::More) (0.62 => 0.88)
-- added a new br on CPAN (inc::Module::AutoInstall found)
-- added a new req on perl(B::Hooks::EndOfScope) (version 0.07)
-- added a new req on perl(Sub::Identify) (version 0.04)
-- added a new req on perl(Sub::Name) (version 0.04)
-- added a new req on perl(Symbol) (version 0)
+* Fri Feb 05 2010 Chris Weyl <cweyl at alumni.drew.edu> - 0.13-1
+- Update filtering perl_default_filter
+- Auto-update to 0.13 (by cpan-spec-update 0.01)
+- Altered br on perl(ExtUtils::MakeMaker) (0 => 6.42)
+- Added a new br on perl(Sub::Identify) (version 0.04)
+- Added a new br on perl(Sub::Name) (version 0.04)
+- Altered br on perl(Test::More) (0.62 => 0.88)
+- Added a new br on CPAN (inc::Module::AutoInstall found)
+- Added a new req on perl(B::Hooks::EndOfScope) (version 0.07)
+- Added a new req on perl(Sub::Identify) (version 0.04)
+- Added a new req on perl(Sub::Name) (version 0.04)
+- Added a new req on perl(Symbol) (version 0)
 
 * Mon Dec  7 2009 Stepan Kasal <skasal at redhat.com> - 0.11-3
-- rebuild against perl 5.10.1
+- Rebuild against perl 5.10.1
 
 * Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.11-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 
-* Thu Apr 02 2009 Chris Weyl <cweyl at alumni.drew.edu> 0.11-1
-- update to 0.11
+* Thu Apr 02 2009 Chris Weyl <cweyl at alumni.drew.edu> - 0.11-1
+- Update to 0.11
 
 * Thu Feb 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.09-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
 
-* Tue Dec 02 2008 Chris Weyl <cweyl at alumni.drew.edu> 0.09-1
-- update to 0.09
-- note BR change from Scope::Guard to B::Hooks::EndOfScope
+* Tue Dec 02 2008 Chris Weyl <cweyl at alumni.drew.edu> - 0.09-1
+- Update to 0.09
+- Note BR change from Scope::Guard to B::Hooks::EndOfScope
 
-* Mon Sep 08 2008 Chris Weyl <cweyl at alumni.drew.edu> 0.08-2
-- bump
+* Mon Sep 08 2008 Chris Weyl <cweyl at alumni.drew.edu> - 0.08-2
+- Bump
 
-* Sat Sep 06 2008 Chris Weyl <cweyl at alumni.drew.edu> 0.08-1
-- initial Fedora packaging
-- generated with cpan2dist (CPANPLUS::Dist::Fedora version 0.0.1)
+* Sat Sep 06 2008 Chris Weyl <cweyl at alumni.drew.edu> - 0.08-1
+- Initial Fedora packaging
+- Generated with cpan2dist (CPANPLUS::Dist::Fedora version 0.0.1)



More information about the perl-devel mailing list