632bab
# We need to patch the test suite if we have an old version of Test::More
632bab
%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0)
632bab
# Run extra test
632bab
%if ! (0%{?rhel})
632bab
%bcond_without perl_Package_Stash_enables_extra_test
632bab
%else
632bab
%bcond_with perl_Package_Stash_enables_extra_test
632bab
%endif
632bab
# Run optional test
632bab
%if ! (0%{?rhel})
632bab
%bcond_without perl_Package_Stash_enables_optional_test
632bab
%else
632bab
%bcond_with perl_Package_Stash_enables_optional_test
632bab
%endif
632bab
632bab
Name:		perl-Package-Stash
632bab
Version:	0.37
632bab
Release:	9%{?dist}
632bab
Summary:	Routines for manipulating stashes
632bab
Group:		Development/Libraries
632bab
License:	GPL+ or Artistic
632bab
URL:		http://search.cpan.org/dist/Package-Stash/
632bab
Source0:	http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Package-Stash-%{version}.tar.gz
632bab
Patch1:		Package-Stash-0.37-old-Test::More.patch
632bab
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
632bab
BuildArch:	noarch
632bab
# Module Build
632bab
BuildRequires:	perl-interpreter
632bab
BuildRequires:	perl-generators
632bab
BuildRequires:	perl(Config)
632bab
BuildRequires:	perl(ExtUtils::MakeMaker)
632bab
BuildRequires:	perl(File::Spec)
632bab
BuildRequires:	perl(Text::ParseWords)
632bab
# Module Runtime
632bab
BuildRequires:	perl(B)
632bab
BuildRequires:	perl(Carp)
632bab
BuildRequires:	perl(constant)
632bab
BuildRequires:	perl(Dist::CheckConflicts) >= 0.02
632bab
BuildRequires:	perl(Getopt::Long)
632bab
BuildRequires:	perl(Module::Implementation) >= 0.06
632bab
BuildRequires:	perl(Package::Stash::XS) >= 0.26
632bab
BuildRequires:	perl(Scalar::Util)
632bab
BuildRequires:	perl(strict)
632bab
BuildRequires:	perl(Symbol)
632bab
BuildRequires:	perl(warnings)
632bab
# Test Suite
632bab
BuildRequires:	perl(base)
632bab
BuildRequires:	perl(IO::Handle)
632bab
BuildRequires:	perl(IPC::Open3)
632bab
BuildRequires:	perl(lib)
632bab
BuildRequires:	perl(Test::Fatal)
632bab
BuildRequires:	perl(Test::More)
632bab
BuildRequires:	perl(Test::Requires)
632bab
%if %{with perl_Package_Stash_enables_optional_test}
632bab
# Optional Tests
632bab
BuildRequires:	perl(Package::Anon)
632bab
BuildRequires:	perl(Variable::Magic)
632bab
%endif
632bab
%if %{with perl_Package_Stash_enables_extra_test}
632bab
# Extra Tests
632bab
BuildRequires:	perl(Pod::Coverage::TrustPod)
632bab
BuildRequires:	perl(Test::EOL)
632bab
BuildRequires:	perl(Test::LeakTrace)
632bab
BuildRequires:	perl(Test::NoTabs)
632bab
BuildRequires:	perl(Test::Pod) >= 1.41
632bab
BuildRequires:	perl(Test::Pod::Coverage) >= 1.08
632bab
%endif
632bab
# Runtime
632bab
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
632bab
# For performance and consistency
632bab
Requires:	perl(Package::Stash::XS) >= 0.26
632bab
# Not found by rpm auto-provides
632bab
Provides:	perl(Package::Stash::Conflicts) = 0
632bab
632bab
%description
632bab
Manipulating stashes (Perl's symbol tables) is occasionally necessary, but
632bab
incredibly messy, and easy to get wrong. This module hides all of that behind
632bab
a simple API.
632bab
632bab
%prep
632bab
%setup -q -n Package-Stash-%{version}
632bab
632bab
# Compatibility with old Test::More versions
632bab
%if %{old_test_more}
632bab
%patch1
632bab
%endif
632bab
632bab
%build
632bab
perl Makefile.PL INSTALLDIRS=vendor
632bab
make %{?_smp_mflags}
632bab
632bab
%install
632bab
rm -rf %{buildroot}
632bab
make pure_install DESTDIR=%{buildroot}
632bab
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
632bab
%{_fixperms} %{buildroot}
632bab
632bab
%check
632bab
make test
632bab
# Extra Tests: Pod Coverage test fails due to lack of POD for Package::Stash::Conflicts
632bab
%if %{with perl_Package_Stash_enables_extra_test}
632bab
make test TEST_FILES="$(echo $(find xt/ -name '*.t' | grep -v pod-coverage))"
632bab
%endif
632bab
632bab
%clean
632bab
rm -rf %{buildroot}
632bab
632bab
%files
632bab
%if 0%{?_licensedir:1}
632bab
%license LICENSE
632bab
%else
632bab
%doc LICENSE
632bab
%endif
632bab
%doc Changes README
632bab
%{_bindir}/package-stash-conflicts
632bab
%{perl_vendorlib}/Package/
632bab
%{_mandir}/man1/package-stash-conflicts.1*
632bab
%{_mandir}/man3/Package::Stash.3pm*
632bab
%{_mandir}/man3/Package::Stash::PP.3pm*
632bab
632bab
%changelog
632bab
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-9
632bab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
632bab
632bab
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-8
632bab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
632bab
632bab
* Mon Jun 05 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.37-7
632bab
- Perl 5.26 rebuild
632bab
632bab
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-6
632bab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
632bab
632bab
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.37-5
632bab
- Perl 5.24 rebuild
632bab
632bab
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-4
632bab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
632bab
632bab
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.37-3
632bab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
632bab
632bab
* Sat Jun 06 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.37-2
632bab
- Perl 5.22 rebuild
632bab
632bab
* Tue Sep 23 2014 Paul Howarth <paul@city-fan.org> - 0.37-1
632bab
- Update to 0.37
632bab
  - Fix spurious warning in taint mode (GH#12)
632bab
- Update patch for building with old Test::More versions
632bab
- No documentation for Package::Stash::Conflicts in this release
632bab
- Classify buildreqs by usage
632bab
- Use %%license where possible
632bab
- Don't try to run the extra tests for EL builds as we won't have the
632bab
  dependencies
632bab
632bab
* Fri Aug 29 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.36-3
632bab
- Perl 5.20 rebuild
632bab
632bab
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.36-2
632bab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
632bab
632bab
* Wed Sep  4 2013 Paul Howarth <paul@city-fan.org> - 0.36-1
632bab
- Update to 0.36
632bab
  - Support building with PUREPERL_ONLY
632bab
- BR: perl(Config), perl(Text::ParseWords) and perl(Variable::Magic)
632bab
- Update patch for building with old Test::More version in EPEL-5
632bab
632bab
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.35-3
632bab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
632bab
632bab
* Mon Jul 29 2013 Petr Pisar <ppisar@redhat.com> - 0.35-2
632bab
- Perl 5.18 rebuild
632bab
632bab
* Wed Jul 10 2013 Paul Howarth <paul@city-fan.org> - 0.35-1
632bab
- Update to 0.35
632bab
  - Remove old, deprecated API
632bab
- BR: perl(Getopt::Long)
632bab
- perl(Package::DeprecationManager) is no longer needed
632bab
632bab
* Thu Jan 24 2013 Paul Howarth <paul@city-fan.org> - 0.34-2
632bab
- BR: perl(Package::Anon) if we have Perl ≥ 5.14
632bab
632bab
* Sun Jan  6 2013 Paul Howarth <paul@city-fan.org> - 0.34-1
632bab
- Update to 0.34
632bab
  - Support anonymous stashes on newer perl versions
632bab
  - Prevent harmful effects from invalid settings for
632bab
    $ENV{PACKAGE_STASH_IMPLEMENTATION}
632bab
  - Switch to Module::Implementation
632bab
- BR: perl(Module::Implementation) ≥ 0.06
632bab
- BR: perl(base) for test suite
632bab
- Bump Package::Stash::XS version requirement to 0.26
632bab
- Explicitly run extra tests (except on RHEL ≥ 7, where the necessary
632bab
  build dependencies may not be available)
632bab
- Update patch for building with old Test::More version in EPEL-5
632bab
632bab
* Mon Aug 27 2012 Petr Pisar <ppisar@redhat.com> - 0.33-7
632bab
- Disable author tests on RHEL >= 7
632bab
632bab
* Fri Aug 24 2012 Paul Howarth <paul@city-fan.org> - 0.33-6
632bab
- Drop EPEL-4 support
632bab
  - Drop %%defattr, redundant since rpm 4.4
632bab
  - Test::LeakTrace, Test::Requires and Test::Script are now universally available
632bab
  - A suitably recent version of ExtUtils::MakeMaker is now universally available
632bab
- Don't need to remove empty directories from the buildroot
632bab
632bab
* Tue Aug 14 2012 Petr Pisar <ppisar@redhat.com> - 0.33-5
632bab
- Specify all dependendencies
632bab
632bab
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.33-4
632bab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
632bab
632bab
* Tue Jun 19 2012 Petr Pisar <ppisar@redhat.com> - 0.33-3
632bab
- Perl 5.16 rebuild
632bab
632bab
* Thu Jan 12 2012 Paul Howarth <paul@city-fan.org> - 0.33-2
632bab
- Fedora 17 mass rebuild
632bab
632bab
* Thu Sep 29 2011 Paul Howarth <paul@city-fan.org> - 0.33-1
632bab
- Update to 0.33
632bab
  - Add conflict on MooseX::Method::Signatures 0.36
632bab
- BR: perl(Carp)
632bab
632bab
* Tue Sep  6 2011 Paul Howarth <paul@city-fan.org> - 0.32-1
632bab
- Update to 0.32
632bab
  - Bring the behavior of has_symbol for nonexistant scalars into line with the
632bab
    XS version
632bab
  - Invalid package names (for instance, Foo:Bar) are not allowed
632bab
  - Invalid stash entry names (anything containing ::) are not allowed
632bab
- Update patches to apply cleanly
632bab
- Bump perl(Package::Stash::XS) version requirement to 0.24
632bab
632bab
* Tue Aug  9 2011 Paul Howarth <paul@city-fan.org> - 0.31-1
632bab
- Update to 0.31
632bab
  - Fix ->add_symbol('$foo', qr/sdlfk/) on 5.12+
632bab
  - Fix ->add_symbol('$foo', \v1.2.3) on 5.10+
632bab
- Update patch for old Test::More versions
632bab
- Update patch for no Test::Requires
632bab
632bab
* Thu Jul 21 2011 Paul Howarth <paul@city-fan.org> - 0.30-2
632bab
- Perl mass rebuild
632bab
632bab
* Thu Jul 21 2011 Paul Howarth <paul@city-fan.org> - 0.30-1
632bab
- Update to 0.30
632bab
  - Fix compiler detection in Makefile.PL
632bab
- Update patch for old ExtUtils::MakeMaker versions
632bab
- Drop usage of macros for commands
632bab
- Drop redundant %%{?perl_default_filter}
632bab
- perl(Pod::Coverage::TrustPod) now available everywhere
632bab
632bab
* Tue Jul 19 2011 Petr Sabata <contyk@redhat.com> - 0.29-2
632bab
- Perl mass rebuild
632bab
632bab
* Wed Apr  6 2011 Paul Howarth <paul@city-fan.org> - 0.29-1
632bab
- Update to 0.29
632bab
  - Really skip the package-stash-conflict script in the compile test
632bab
632bab
* Wed Mar 30 2011 Paul Howarth <paul@city-fan.org> - 0.28-1
632bab
- Update to 0.28
632bab
  - META.json fixes
632bab
- Update patch for old ExtUtils::MakeMaker versions to apply cleanly
632bab
632bab
* Mon Mar 28 2011 Paul Howarth <paul@city-fan.org> - 0.27-1
632bab
- Update to 0.27
632bab
  - Skip the package-stash-conflicts script in the compile test
632bab
632bab
* Sat Mar  5 2011 Paul Howarth <paul@city-fan.org> - 0.26-1
632bab
- Update to 0.26
632bab
  - Make the namespace cache lazy and weak, in case the stash is deleted
632bab
  - However, this doesn't work on 5.8, so disable the namespace caching
632bab
    entirely there
632bab
- Update patches to apply cleanly
632bab
- Bump perl(Package::Stash::XS) version requirement to 0.22
632bab
- Bump perl(Dist::CheckConflicts) version requirement to 0.02
632bab
632bab
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.25-2
632bab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
632bab
632bab
* Tue Jan 25 2011 Paul Howarth <paul@city-fan.org> - 0.25-1
632bab
- Update to 0.25 (make the leak tests author-only, since some smokers run
632bab
  release tests)
632bab
- Update patches to apply cleanly
632bab
- Bump perl(Package::Stash::XS) version requirement to 0.21
632bab
- Drop buildreq perl(Test::Exception), no longer needed
632bab
632bab
* Tue Jan 18 2011 Paul Howarth <paul@city-fan.org> - 0.24-1
632bab
- Update to 0.24 (reinstate Test::Requires dependency)
632bab
632bab
* Wed Jan 12 2011 Paul Howarth <paul@city-fan.org> - 0.23-1
632bab
- Update to 0.23
632bab
  - Lower perl prereq to 5.8.1
632bab
  - Make the leak tests release-only
632bab
- Update patches to apply cleanly
632bab
- Add patch to skip memory leak tests if we don't have Test::LeakTrace
632bab
632bab
* Thu Jan  6 2011 Paul Howarth <paul@city-fan.org> - 0.22-1
632bab
- Update to 0.22 (bump Package::Stash::XS version requirement since a bug was
632bab
  fixed there)
632bab
- Update patches for old ExtUtils::MakeMaker and Test::More versions
632bab
- BR/R perl(Package::Stash::XS) >= 0.19
632bab
- Content-free manpages for package-stash-conflicts and
632bab
  Package::Stash::Conflicts dropped upstream
632bab
632bab
* Tue Jan  4 2011 Paul Howarth <paul@city-fan.org> - 0.20-1
632bab
- Update to 0.20
632bab
  - Methods were renamed for brevity: s/_package//
632bab
  - Convert Package::Stash into a module which loads either the XS or pure perl
632bab
    implementation, depending on what's available
632bab
  - Use Test::Fatal instead of Test::Exception
632bab
  - Use Dist::CheckConflicts
632bab
  - Silence deprecation warnings for the method renaming for now
632bab
- New script and manpage: package-stash-conflicts
632bab
- New modules and manpages: Package::Stash::Conflicts and Package::Stash::PP
632bab
- New build requirements:
632bab
  - perl(Dist::CheckConflicts)
632bab
  - perl(Package::DeprecationManager)
632bab
  - perl(Package::Stash::XS)
632bab
  - perl(Test::LeakTrace)
632bab
  - perl(Test::Requires)
632bab
  - perl(Test::Script)
632bab
- Update patches for old ExtUtils::MakeMaker and Test::More versions
632bab
- Add new patch to work around absence of Test::Requires in EPEL-4
632bab
- Require perl(Package::Stash::XS) for performance and consistency
632bab
- Manually provide perl(Package::Stash::Conflicts), hidden from auto-provides
632bab
632bab
* Tue Dec 21 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.08-2
632bab
- Rebuild to fix problems with vendorarch/lib (#661697)
632bab
632bab
* Mon Sep 20 2010 Paul Howarth <paul@city-fan.org> - 0.08-1
632bab
- Update to 0.08 (re-enable the caching of the stash)
632bab
- Update patch for old ExtUtils::MakeMaker and Test::More versions
632bab
632bab
* Wed Jun 16 2010 Paul Howarth <paul@city-fan.org> - 0.05-1
632bab
- Update to 0.05
632bab
  - Bump Test::More requirement for done_testing
632bab
  - Update packaging stuff
632bab
- BR: perl(Test::EOL) and perl(Test::NoTabs)
632bab
- Unify spec for all active branches, adding patches for back-compatibility
632bab
632bab
* Mon Jun 14 2010 Paul Howarth <paul@city-fan.org> - 0.04-1
632bab
- Update to 0.04 (get_package_symbol now doesn't autovivify stash entries; a
632bab
  new method get_or_add_package_symbol can now be used for that behavior)
632bab
632bab
* Mon Jun 14 2010 Paul Howarth <paul@city-fan.org> - 0.03-2
632bab
- Incorporate package review suggestions (#602597)
632bab
  - Use %%{?perl_default_filter}
632bab
  - Use DESTDIR instead of PERL_INSTALL_ROOT
632bab
632bab
* Mon Jun  7 2010 Paul Howarth <paul@city-fan.org> - 0.03-1
632bab
- Initial RPM version