commit 4f3db6b0c18a8232d64eccdf686c0df76e476219 Author: Paul Howarth <paul@xxxxxxxxxxxx> Date: Mon Dec 6 16:27:30 2010 +0000 Initial import of perl-Package-Stash-XS-0.17-2 This is a back-end for Package::Stash, which provides the functionality in a way that's less buggy and much faster. It will be used by default if it's installed, and should be preferred in all environments with a compiler. .gitignore | 1 + Package-Stash-XS-0.17-no-Test-Requires.patch | 26 ++++ Package-Stash-XS-0.17-old-Test::More.patch | 206 ++++++++++++++++++++++++++ Package-Stash-XS-0.17-old-eumm.patch | 30 ++++ perl-Package-Stash-XS.spec | 87 +++++++++++ sources | 1 + 6 files changed, 351 insertions(+), 0 deletions(-) --- diff --git a/.gitignore b/.gitignore index e69de29..629fb76 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/Package-Stash-XS-0.17.tar.gz diff --git a/Package-Stash-XS-0.17-no-Test-Requires.patch b/Package-Stash-XS-0.17-no-Test-Requires.patch new file mode 100644 index 0000000..bc62150 --- /dev/null +++ b/Package-Stash-XS-0.17-no-Test-Requires.patch @@ -0,0 +1,26 @@ +diff -up Package-Stash-XS-0.17/t/20-leaks.t.orig Package-Stash-XS-0.17/t/20-leaks.t +--- Package-Stash-XS-0.17/t/20-leaks.t.orig 2010-11-17 12:13:08.000000000 +0000 ++++ Package-Stash-XS-0.17/t/20-leaks.t 2010-11-17 12:13:36.937820610 +0000 +@@ -4,7 +4,8 @@ use warnings; + use lib 't/lib'; + use Test::More; + use Test::Fatal; +-use Test::Requires 'Test::LeakTrace'; ++eval "use Test::LeakTrace"; ++plan skip_all => "Test::LeakTrace required for this test" if $@; + + use Package::Stash; + use Symbol; +diff -up Package-Stash-XS-0.17/t/21-leaks-debug.t.orig Package-Stash-XS-0.17/t/21-leaks-debug.t +--- Package-Stash-XS-0.17/t/21-leaks-debug.t.orig 2010-11-17 12:13:08.000000000 +0000 ++++ Package-Stash-XS-0.17/t/21-leaks-debug.t 2010-11-17 12:13:50.722253597 +0000 +@@ -4,7 +4,8 @@ use warnings; + use lib 't/lib'; + use Test::More; + use Test::Fatal; +-use Test::Requires 'Test::LeakTrace'; ++eval "use Test::LeakTrace"; ++plan skip_all => "Test::LeakTrace required for this test" if $@; + + BEGIN { $^P |= 0x210 } # PERLDBf_SUBLINE + diff --git a/Package-Stash-XS-0.17-old-Test::More.patch b/Package-Stash-XS-0.17-old-Test::More.patch new file mode 100644 index 0000000..406299c --- /dev/null +++ b/Package-Stash-XS-0.17-old-Test::More.patch @@ -0,0 +1,206 @@ +diff -up Package-Stash-XS-0.17/t/01-basic.t.orig Package-Stash-XS-0.17/t/01-basic.t +--- Package-Stash-XS-0.17/t/01-basic.t.orig 2010-11-16 21:41:01.000000000 +0000 ++++ Package-Stash-XS-0.17/t/01-basic.t 2010-11-17 12:11:30.370843769 +0000 +@@ -2,7 +2,7 @@ + use strict; + use warnings; + use lib 't/lib'; +-use Test::More; ++use Test::More tests => 122; + use Test::Fatal; + + use Package::Stash; +@@ -416,5 +416,3 @@ like(exception { + "list_all_symbols CODE", + ); + } +- +-done_testing; +diff -up Package-Stash-XS-0.17/t/02-extension.t.orig Package-Stash-XS-0.17/t/02-extension.t +--- Package-Stash-XS-0.17/t/02-extension.t.orig 2010-11-16 21:41:01.000000000 +0000 ++++ Package-Stash-XS-0.17/t/02-extension.t 2010-11-17 12:11:30.370843769 +0000 +@@ -2,7 +2,7 @@ + use strict; + use warnings; + use lib 't/lib'; +-use Test::More; ++use Test::More tests => 15; + use Test::Fatal; + + { +@@ -70,5 +70,3 @@ is(exception { + }, undef, '... created %Foo::baz successfully'); + + ok(!defined($Foo::{baz}), '... the %baz slot has still not been created'); +- +-done_testing; +diff -up Package-Stash-XS-0.17/t/03-io.t.orig Package-Stash-XS-0.17/t/03-io.t +--- Package-Stash-XS-0.17/t/03-io.t.orig 2010-11-16 21:41:01.000000000 +0000 ++++ Package-Stash-XS-0.17/t/03-io.t 2010-11-17 12:11:30.373843863 +0000 +@@ -2,7 +2,7 @@ + use strict; + use warnings; + use lib 't/lib'; +-use Test::More; ++use Test::More tests => 11; + use Test::Fatal; + + { +@@ -47,5 +47,3 @@ use Package::Stash; + ok($stash->has_symbol('baz'), "has baz"); + is($stash->get_symbol('baz'), *Foo::foo{IO}, "got the right baz"); + } +- +-done_testing; +diff -up Package-Stash-XS-0.17/t/04-get.t.orig Package-Stash-XS-0.17/t/04-get.t +--- Package-Stash-XS-0.17/t/04-get.t.orig 2010-11-16 21:41:01.000000000 +0000 ++++ Package-Stash-XS-0.17/t/04-get.t 2010-11-17 12:11:30.395844555 +0000 +@@ -2,7 +2,7 @@ + use strict; + use warnings; + use lib 't/lib'; +-use Test::More; ++use Test::More tests => 36; + + use Package::Stash; + use Scalar::Util; +@@ -182,5 +182,3 @@ use Scalar::Util; + "stash has the right variable"); + } + } +- +-done_testing; +diff -up Package-Stash-XS-0.17/t/05-isa.t.orig Package-Stash-XS-0.17/t/05-isa.t +--- Package-Stash-XS-0.17/t/05-isa.t.orig 2010-11-16 21:41:01.000000000 +0000 ++++ Package-Stash-XS-0.17/t/05-isa.t 2010-11-17 12:11:30.396844586 +0000 +@@ -2,7 +2,7 @@ + use strict; + use warnings; + use lib 't/lib'; +-use Test::More; ++use Test::More tests => 1; + + use Package::Stash; + +@@ -17,6 +17,7 @@ use Package::Stash; + my $stash = Package::Stash->new('Foo'); + my @ISA = ('Bar'); + @{$stash->get_or_add_symbol('@ISA')} = @ISA; ++SKIP: { ++skip "Test::More >= 0.88 needed for isa_ok() tests on classes", 1 if $Test::More::VERSION < 0.88; + isa_ok('Foo', 'Bar'); +- +-done_testing; ++} +diff -up Package-Stash-XS-0.17/t/06-addsub.t.orig Package-Stash-XS-0.17/t/06-addsub.t +--- Package-Stash-XS-0.17/t/06-addsub.t.orig 2010-11-16 21:41:01.000000000 +0000 ++++ Package-Stash-XS-0.17/t/06-addsub.t 2010-11-17 12:11:30.396844586 +0000 +@@ -2,7 +2,7 @@ + use strict; + use warnings; + use lib 't/lib'; +-use Test::More; ++use Test::More tests => 7; + use Test::Fatal; + + BEGIN { $^P |= 0x210 } # PERLDBf_SUBLINE +@@ -42,5 +42,3 @@ $foo_stash->add_symbol( + + is $DB::sub{'Foo::dunk'}, sprintf "%s:%d-%d", "FileName", 100, 199, + '... got the right %DB::sub value for dunk with specified args'; +- +-done_testing; +diff -up Package-Stash-XS-0.17/t/07-edge-cases.t.orig Package-Stash-XS-0.17/t/07-edge-cases.t +--- Package-Stash-XS-0.17/t/07-edge-cases.t.orig 2010-11-16 21:41:01.000000000 +0000 ++++ Package-Stash-XS-0.17/t/07-edge-cases.t 2010-11-17 12:11:30.397844618 +0000 +@@ -2,7 +2,7 @@ + use strict; + use warnings; + use lib 't/lib'; +-use Test::More; ++use Test::More tests => 11; + + use Package::Stash; + +@@ -51,5 +51,3 @@ is(ref($constant), 'CODE', "expanded a c + # was here) + is(ref($stash->get_symbol('$glob')), '', "nothing yet"); + is(ref($stash->get_or_add_symbol('$glob')), 'SCALAR', "got an empty scalar"); +- +-done_testing; +diff -up Package-Stash-XS-0.17/t/10-synopsis.t.orig Package-Stash-XS-0.17/t/10-synopsis.t +--- Package-Stash-XS-0.17/t/10-synopsis.t.orig 2010-11-16 21:41:01.000000000 +0000 ++++ Package-Stash-XS-0.17/t/10-synopsis.t 2010-11-17 12:11:30.397844618 +0000 +@@ -2,7 +2,7 @@ + use strict; + use warnings; + use lib 't/lib'; +-use Test::More; ++use Test::More tests => 3; + + use Package::Stash; + +@@ -15,5 +15,3 @@ $stash->add_symbol('%foo', {bar => 1}); + ok(!$stash->has_symbol('$foo'), "doesn't have anything in scalar slot"); + my $namespace = $stash->namespace; + is_deeply(*{ $namespace->{foo} }{HASH}, {bar => 1}, "namespace works properly"); +- +-done_testing; +diff -up Package-Stash-XS-0.17/t/20-leaks.t.orig Package-Stash-XS-0.17/t/20-leaks.t +--- Package-Stash-XS-0.17/t/20-leaks.t.orig 2010-11-16 21:41:01.000000000 +0000 ++++ Package-Stash-XS-0.17/t/20-leaks.t 2010-11-17 12:12:10.737112352 +0000 +@@ -9,6 +9,8 @@ use Test::Requires 'Test::LeakTrace'; + use Package::Stash; + use Symbol; + ++plan tests => 25; ++ + { + package Bar; + } +@@ -136,7 +138,10 @@ use Symbol; + ok($foo->has_symbol('@ISA')); + is(ref($foo->get_symbol('@ISA')), 'ARRAY'); + is_deeply($foo->get_symbol('@ISA'), ['Exporter']); ++ SKIP: { ++ skip "Test::More >= 0.88 needed for isa_ok() tests on classes", 1 if $Test::More::VERSION < 0.88; + isa_ok('Foo', 'Exporter'); ++ } + } + + { +@@ -190,5 +195,3 @@ use Symbol; + eval { $foo->get_or_add_symbol('&blorg') }; + } "doesn't leak on errors"; + } +- +-done_testing; +diff -up Package-Stash-XS-0.17/t/21-leaks-debug.t.orig Package-Stash-XS-0.17/t/21-leaks-debug.t +--- Package-Stash-XS-0.17/t/21-leaks-debug.t.orig 2010-11-16 21:41:01.000000000 +0000 ++++ Package-Stash-XS-0.17/t/21-leaks-debug.t 2010-11-17 12:12:31.234756439 +0000 +@@ -11,6 +11,8 @@ BEGIN { $^P |= 0x210 } # PERLDBf_SUBLINE + use Package::Stash; + use Symbol; + ++plan tests => 25; ++ + { + package Bar; + } +@@ -138,7 +140,10 @@ use Symbol; + ok($foo->has_symbol('@ISA')); + is(ref($foo->get_symbol('@ISA')), 'ARRAY'); + is_deeply($foo->get_symbol('@ISA'), ['Exporter']); ++ SKIP: { ++ skip "Test::More >= 0.88 needed for isa_ok() tests on classes", 1 if $Test::More::VERSION < 0.88; + isa_ok('Foo', 'Exporter'); ++ } + } + + { +@@ -192,5 +197,3 @@ use Symbol; + eval { $foo->get_or_add_symbol('&blorg') }; + } "doesn't leak on errors"; + } +- +-done_testing; diff --git a/Package-Stash-XS-0.17-old-eumm.patch b/Package-Stash-XS-0.17-old-eumm.patch new file mode 100644 index 0000000..fb4c09a --- /dev/null +++ b/Package-Stash-XS-0.17-old-eumm.patch @@ -0,0 +1,30 @@ +--- Package-Stash-XS-0.17/Makefile.PL 2010-11-16 21:41:01.000000000 +0000 ++++ Package-Stash-XS-0.17/Makefile.PL 2010-11-17 11:08:49.844078063 +0000 +@@ -4,7 +4,7 @@ + + BEGIN { require 5.8.3; } + +-use ExtUtils::MakeMaker 6.31; ++use ExtUtils::MakeMaker 6.17; + + + +@@ -17,7 +17,7 @@ + 'Test::Requires' => '0' + }, + 'CONFIGURE_REQUIRES' => { +- 'ExtUtils::MakeMaker' => '6.31' ++ 'ExtUtils::MakeMaker' => '6.17' + }, + 'DISTNAME' => 'Package-Stash-XS', + 'EXE_FILES' => [], +@@ -47,6 +47,9 @@ + delete $WriteMakefileArgs{CONFIGURE_REQUIRES} + unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; + ++delete $WriteMakefileArgs{LICENSE} ++ unless eval { ExtUtils::MakeMaker->VERSION(6.31) }; ++ + WriteMakefile(%WriteMakefileArgs); + + diff --git a/perl-Package-Stash-XS.spec b/perl-Package-Stash-XS.spec new file mode 100644 index 0000000..8e3784b --- /dev/null +++ b/perl-Package-Stash-XS.spec @@ -0,0 +1,87 @@ +Name: perl-Package-Stash-XS +Version: 0.17 +Release: 2%{?dist} +Summary: Faster and more correct implementation of the Package::Stash API +Group: Development/Libraries +License: GPL+ or Artistic +URL: http://search.cpan.org/dist/Package-Stash-XS/ +Source0: http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Package-Stash-XS-%{version}.tar.gz +Patch0: Package-Stash-XS-0.17-old-eumm.patch +Patch1: Package-Stash-XS-0.17-old-Test::More.patch +Patch2: Package-Stash-XS-0.17-no-Test-Requires.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: perl >= 3:5.8.3 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::EOL) +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::More) +BuildRequires: perl(Test::NoTabs) +BuildRequires: perl(Test::Pod) +BuildRequires: perl(Test::Pod::Coverage) +# Some test suite requirements not universally available +%if "%{?rhel}" != "4" && "%{?rhel}" != "5" +BuildRequires: perl(Test::LeakTrace) >= 0.11 +%endif +%if "%{?rhel}" != "4" +BuildRequires: perl(Pod::Coverage::TrustPod) +BuildRequires: perl(Test::Requires) +%endif +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +# Don't "provide" private Perl libs +%{?perl_default_filter} + +%description +This is a back-end for Package::Stash, which provides the functionality in a +way that's less buggy and much faster. It will be used by default if it's +installed, and should be preferred in all environments with a compiler. + +%prep +%setup -q -n Package-Stash-XS-%{version} + +# Don't really need ExtUtils::MakeMaker >= 6.31 +%if "%{?rhel}" == "4" || "%{?rhel}" == "5" +%patch0 -p1 +%endif + +# Patch test suite to work with old Test::More versions if necessary +%if "%{?rhel}" == "4" || "%{?rhel}" == "5" +%patch1 -p1 +%endif + +# Work around absence of Test::Requires in EPEL-4 +%if "%{?rhel}" == "4" +%patch2 -p1 +%endif + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +make %{?_smp_mflags} + +%install +rm -rf %{buildroot} +make pure_install DESTDIR=%{buildroot} +find %{buildroot} -type f -name .packlist -exec rm -f {} ';' +find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';' +find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null +chmod -R u+w %{buildroot} + +%check +make test RELEASE_TESTING=1 + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc Changes LICENSE README +%{perl_vendorarch}/auto/Package/ +%{perl_vendorarch}/Package/ +%{_mandir}/man3/Package::Stash::XS.3pm* + +%changelog +* Wed Nov 17 2010 Paul Howarth <paul@xxxxxxxxxxxx> - 0.17-2 +- Santitize spec for Fedora submission + +* Wed Nov 17 2010 Paul Howarth <paul@xxxxxxxxxxxx> - 0.17-1 +- Initial RPM build diff --git a/sources b/sources index e69de29..99bb5aa 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +5430594809936af4add03e627c43a42a Package-Stash-XS-0.17.tar.gz -- 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