4911e4a
%if ! (0%{?rhel})
510f6a7
# Run extra test
510f6a7
%bcond_without perl_Package_Stash_XS_enables_extra_test
510f6a7
# Run optional test
510f6a7
%bcond_without perl_Package_Stash_XS_enables_optional_test
4911e4a
%else
4911e4a
%bcond_with perl_Package_Stash_XS_enables_extra_test
4911e4a
%bcond_with perl_Package_Stash_XS_enables_optional_test
4911e4a
%endif
510f6a7
4f3db6b
Name:		perl-Package-Stash-XS
d3a39fb
Version:	0.28
6ae4385
Release:	17%{?dist}
4f3db6b
Summary:	Faster and more correct implementation of the Package::Stash API
4f3db6b
Group:		Development/Libraries
4f3db6b
License:	GPL+ or Artistic
4f3db6b
URL:		http://search.cpan.org/dist/Package-Stash-XS/
4f3db6b
Source0:	http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Package-Stash-XS-%{version}.tar.gz
995a0b5
Patch1:		Package-Stash-XS-0.27-old-Test::More.patch
ddf96d2
# Module Build
ddf96d2
BuildRequires:	coreutils
ddf96d2
BuildRequires:	findutils
ddf96d2
BuildRequires:	gcc
ddf96d2
BuildRequires:	make
07b525e
BuildRequires:	perl-interpreter >= 3:5.8.1
ddf96d2
%if "%{?rhel}" != "5"
ddf96d2
BuildRequires:	perl-devel
ddf96d2
%endif
b241a0e
BuildRequires:	perl-generators
ddf96d2
BuildRequires:	perl(ExtUtils::MakeMaker) >= 6.30
ddf96d2
# Module Runtime
ddf96d2
BuildRequires:	perl(strict)
ddf96d2
BuildRequires:	perl(warnings)
ddf96d2
BuildRequires:	perl(XSLoader)
ddf96d2
# Test Suite
ddf96d2
BuildRequires:	perl(B)
4dab8b5
BuildRequires:	perl(base)
de03ba2
BuildRequires:	perl(constant)
ddf96d2
BuildRequires:	perl(File::Find)
a12bed2
BuildRequires:	perl(File::Temp)
de03ba2
BuildRequires:	perl(lib)
ddf96d2
BuildRequires:	perl(Scalar::Util)
ddf96d2
BuildRequires:	perl(Symbol)
ddf96d2
BuildRequires:	perl(Test::Fatal)
ddf96d2
BuildRequires:	perl(Test::More)
ddf96d2
BuildRequires:	perl(Test::Requires)
510f6a7
%if %{with perl_Package_Stash_XS_enables_optional_test}
ddf96d2
# Optional Tests
b241a0e
%if 0%{?fedora} > 15 || 0%{?rhel} > 6
5996998
BuildRequires:	perl(Package::Anon)
5996998
%endif
ddf96d2
%if "%{?rhel}" != "5"
ddf96d2
BuildRequires:	perl(Variable::Magic)
ddf96d2
%endif
510f6a7
%endif
510f6a7
%if %{with perl_Package_Stash_XS_enables_extra_test}
ddf96d2
# Author Tests
34081ad
%if ! (0%{?rhel} >= 7)
a12bed2
BuildRequires:	perl(Test::LeakTrace)
34081ad
%endif
ddf96d2
# Release Tests
ddf96d2
BuildRequires:	perl(Pod::Coverage::TrustPod)
ddf96d2
BuildRequires:	perl(Test::EOL)
4f3db6b
BuildRequires:	perl(Test::NoTabs)
4f3db6b
BuildRequires:	perl(Test::Pod)
4f3db6b
BuildRequires:	perl(Test::Pod::Coverage)
510f6a7
%endif
ddf96d2
# Dependencies
06d92df
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
4f3db6b
4f3db6b
# Don't "provide" private Perl libs
4f3db6b
%{?perl_default_filter}
4f3db6b
4f3db6b
%description
4f3db6b
This is a back-end for Package::Stash, which provides the functionality in a
4f3db6b
way that's less buggy and much faster. It will be used by default if it's
4f3db6b
installed, and should be preferred in all environments with a compiler.
4f3db6b
4f3db6b
%prep
4f3db6b
%setup -q -n Package-Stash-XS-%{version}
4f3db6b
4f3db6b
# Patch test suite to work with old Test::More versions if necessary
a12bed2
%if "%{?rhel}" == "5"
4f3db6b
%patch1 -p1
4f3db6b
%endif
4f3db6b
4f3db6b
%build
4f3db6b
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
4f3db6b
make %{?_smp_mflags}
4f3db6b
4f3db6b
%install
4f3db6b
rm -rf %{buildroot}
4f3db6b
make pure_install DESTDIR=%{buildroot}
ddf96d2
find %{buildroot} -type f -name .packlist -delete
b241a0e
find %{buildroot} -type f -name '*.bs' -empty -delete
e8f0a3b
%{_fixperms} %{buildroot}
4f3db6b
4f3db6b
%check
4dab8b5
make test
510f6a7
%if %{with perl_Package_Stash_XS_enables_extra_test}
34081ad
%if ! (0%{?rhel} >= 7)
4dab8b5
make test TEST_FILES="$(echo $(find xt/ -name '*.t'))"
34081ad
%else
4dab8b5
make test TEST_FILES="$(echo $(find xt/release/ -name '*.t'))"
34081ad
%endif
510f6a7
%endif
4f3db6b
4f3db6b
%files
ddf96d2
%if 0%{?_licensedir:1}
ddf96d2
%license LICENSE
ddf96d2
%else
ddf96d2
%doc LICENSE
ddf96d2
%endif
ddf96d2
%doc Changes README
4f3db6b
%{perl_vendorarch}/auto/Package/
4f3db6b
%{perl_vendorarch}/Package/
ddf96d2
%{_mandir}/man3/Package::Stash::XS.3*
4f3db6b
4f3db6b
%changelog
6ae4385
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-17
6ae4385
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
6ae4385
f3b25bc
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-16
f3b25bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
f3b25bc
cac51bc
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-15
cac51bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
cac51bc
618bdc1
* Mon Jun 05 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.28-14
618bdc1
- Perl 5.26 rebuild
618bdc1
adedc5e
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-13
adedc5e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
adedc5e
b241a0e
* Thu Jul 21 2016 Paul Howarth <paul@city-fan.org> - 0.28-12
b241a0e
- Fix FTBFS when perl is not in the SRPM build root
b241a0e
bfe6fdf
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.28-11
bfe6fdf
- Perl 5.24 rebuild
bfe6fdf
ddf96d2
* Tue Apr 19 2016 Paul Howarth <paul@city-fan.org> - 0.28-10
ddf96d2
- Classify buildreqs by usage
ddf96d2
- Use %%license where possible
ddf96d2
- Simplify find commands using -empty and -delete
ddf96d2
9995fc7
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-9
9995fc7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
9995fc7
8df84b6
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.28-8
8df84b6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
8df84b6
c32ae43
* Sat Jun 06 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.28-7
c32ae43
- Perl 5.22 rebuild
c32ae43
c517de1
* Fri Aug 29 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.28-6
c517de1
- Perl 5.20 rebuild
c517de1
f881b0f
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.28-5
f881b0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
f881b0f
a3aa621
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.28-4
a3aa621
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a3aa621
bfaab96
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.28-3
bfaab96
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
bfaab96
797ada3
* Fri Jul 26 2013 Petr Pisar <ppisar@redhat.com> - 0.28-2
797ada3
- Perl 5.18 rebuild
797ada3
d3a39fb
* Tue Jul 16 2013 Paul Howarth <paul@city-fan.org> - 0.28-1
d3a39fb
- Update to 0.28
d3a39fb
  - Fix test issue
d3a39fb
995a0b5
* Tue Jul 16 2013 Paul Howarth <paul@city-fan.org> - 0.27-1
995a0b5
- Update to 0.27
995a0b5
  - Handle magic more correctly in add_symbol and get_or_add_symbol
995a0b5
- Add upstream patch to avoid build dependency on Package::Stash
995a0b5
- BR: perl(Variable::Magic) for the test suite
995a0b5
- Update patch for building with old Test::More versions
995a0b5
5996998
* Thu Jan 24 2013 Paul Howarth <paul@city-fan.org> - 0.26-2
5996998
- BR: perl(Package::Anon) if we have Perl ≥ 5.14
5996998
4dab8b5
* Fri Jan  4 2013 Paul Howarth <paul@city-fan.org> - 0.26-1
4dab8b5
- Update to 0.26
4dab8b5
  - Internal refactorings to support Package::Anon stashes
4dab8b5
- BR: perl(base) and perl(Test::Requires) for test suite
4dab8b5
- Update patch for old distro compatibility
4dab8b5
- Explicitly run the release/author tests
4dab8b5
34081ad
* Mon Aug 27 2012 Petr Pisar <ppisar@redhat.com> - 0.25-7
34081ad
- Disable author tests on RHEL >= 7
34081ad
a12bed2
* Sat Aug 25 2012 Paul Howarth <paul@city-fan.org> - 0.25-6
a12bed2
- Drop EPEL-4 support
a12bed2
  - Test::LeakTrace now universally available
a12bed2
  - Suitably recent version of ExtUtils::MakeMaker now universally available
a12bed2
  - Drop %%defattr, redundant since rpm 4.4
a12bed2
- BR: perl(File::Temp)
a12bed2
- Don't need to remove empty directories from the buildroot
a12bed2
de03ba2
* Tue Aug 14 2012 Petr Pisar <ppisar@redhat.com> - 0.25-5
de03ba2
- Specify all dependencies
de03ba2
06a7f67
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.25-4
06a7f67
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
06a7f67
6497799
* Tue Jun 19 2012 Petr Pisar <ppisar@redhat.com> - 0.25-3
6497799
- Perl 5.16 rebuild
6497799
e8f0a3b
* Thu Jan 12 2012 Paul Howarth <paul@city-fan.org> - 0.25-2
e8f0a3b
- Use %%{_fixperms} macro instead of our own chmod incantation
e8f0a3b
d408e62
* Tue Sep  6 2011 Paul Howarth <paul@city-fan.org> - 0.25-1
d408e62
- Update to 0.25
d408e62
  - Invalid package names (for instance, Foo:Bar) are not allowed
d408e62
  - Invalid stash entry names (anything containing ::) are not allowed
d408e62
- Update patches to apply cleanly
d408e62
06d92df
* Tue Aug  9 2011 Paul Howarth <paul@city-fan.org> - 0.23-1
06d92df
- Update to 0.23
06d92df
  - Fix the test for scalar values, again
06d92df
  - Disallow assigning globrefs to scalar glob slots (this doesn't actually
06d92df
    make any sense)
06d92df
- Update patches for old ExtUtils::MakeMaker and Test::More versions
06d92df
- perl(Pod::Coverage::TrustPod) now available in EPEL-4 too
06d92df
- Don't use macros for commands
06d92df
Petr Sabata 69f740c
* Tue Jul 19 2011 Petr Sabata <contyk@redhat.com> - 0.22-2
Petr Sabata 69f740c
- Perl mass rebuild
Petr Sabata 69f740c
802846c
* Sat Mar  5 2011 Paul Howarth <paul@city-fan.org> - 0.22-1
802846c
- Update to 0.22
802846c
  - Make the namespace cache lazy and weak, in case the stash is deleted
802846c
  - However, this doesn't work on 5.8, so disable the namespace caching
802846c
    entirely there
802846c
- Update patches to apply cleanly
802846c
a26f1d5
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.21-2
a26f1d5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
a26f1d5
4e95f4d
* Tue Jan 25 2011 Paul Howarth <paul@city-fan.org> - 0.21-1
4e95f4d
- Update to 0.21
4e95f4d
  - Make the leak tests author-only, since some smokers run release tests
4e95f4d
  - Fix some XS forward compat stuff
4e95f4d
- Update patches to apply cleanly
4e95f4d
03c81b6
* Wed Jan 12 2011 Paul Howarth <paul@city-fan.org> - 0.20-1
03c81b6
- Update to 0.20
03c81b6
  - Lower perl prereq to 5.8.1
03c81b6
  - Make the leak tests release-only
03c81b6
- Update patches to apply cleanly
03c81b6
- Drop no-Test::Requires patch, no longer needed
03c81b6
- Drop buildreq perl(Test::Requires), no longer needed
03c81b6
- Add patch to skip memory leak tests if we don't have Test::LeakTrace
03c81b6
36de3cd
* Thu Jan  6 2011 Paul Howarth <paul@city-fan.org> - 0.19-1
36de3cd
- Update to 0.19 (more correct validity test for scalars)
36de3cd
- Update patch for old Test::More versions
36de3cd
4f3db6b
* Wed Nov 17 2010 Paul Howarth <paul@city-fan.org> - 0.17-2
06d92df
- Sanitize spec for Fedora submission
4f3db6b
4f3db6b
* Wed Nov 17 2010 Paul Howarth <paul@city-fan.org> - 0.17-1
4f3db6b
- Initial RPM build