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