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