From 1f702d09fc39b497cb58bb264b7b7848889ebdc9 Mon Sep 17 00:00:00 2001
From: Paul Howarth <[email protected]>
Date: Thu, 4 Aug 2016 09:27:37 +0100
Subject: Avoid relying on . being in @INC (CPAN RT#116566)
---
Class-C3-XS-0.13-rt116566.patch | 71 +++++++++++++++++++++++++++++++++++++++++
perl-Class-C3-XS.spec | 18 ++++++++---
2 files changed, 85 insertions(+), 4 deletions(-)
create mode 100644 Class-C3-XS-0.13-rt116566.patch
diff --git a/Class-C3-XS-0.13-rt116566.patch b/Class-C3-XS-0.13-rt116566.patch
new file mode 100644
index 0000000..29582b5
--- /dev/null
+++ b/Class-C3-XS-0.13-rt116566.patch
@@ -0,0 +1,71 @@
+--- t/05_MRO.t
++++ t/05_MRO.t
+@@ -5,9 +5,11 @@ use warnings;
+
+ use Test::More tests => 3;
+
++use lib 't/lib';
++
+ BEGIN {
+ use_ok('Class::C3::XS');
+- use_ok('t::lib::F');
++ use_ok('F');
+ }
+
+ =pod
+@@ -24,7 +26,7 @@ From the parrot test t/pmc/object-meths.
+ =cut
+
+ is_deeply(
+- [ Class::C3::XS::calculateMRO('t::lib::F') ],
+- [ qw(t::lib::F t::lib::C t::lib::D t::lib::A t::lib::B t::lib::E) ],
+- '... got the right MRO for t::lib::F');
++ [ Class::C3::XS::calculateMRO('F') ],
++ [ qw(F C D A B E) ],
++ '... got the right MRO for F');
+
+--- t/lib/A.pm
++++ t/lib/A.pm
+@@ -1,3 +1,3 @@
+-package t::lib::A;
++package A;
+ our @ISA = qw//;
+ 1;
+--- t/lib/B.pm
++++ t/lib/B.pm
+@@ -1,3 +1,3 @@
+-package t::lib::B;
++package B;
+ our @ISA = qw//;
+ 1;
+--- t/lib/C.pm
++++ t/lib/C.pm
+@@ -1,3 +1,3 @@
+-package t::lib::C;
+-use base ('t::lib::A', 't::lib::B');
++package C;
++use base ('A', 'B');
+ 1;
+--- t/lib/D.pm
++++ t/lib/D.pm
+@@ -1,3 +1,3 @@
+-package t::lib::D;
+-use base ('t::lib::A', 't::lib::E');
++package D;
++use base ('A', 'E');
+ 1;
+--- t/lib/E.pm
++++ t/lib/E.pm
+@@ -1,3 +1,3 @@
+-package t::lib::E;
++package E;
+ our @ISA = qw//;
+ 1;
+--- t/lib/F.pm
++++ t/lib/F.pm
+@@ -1,3 +1,3 @@
+-package t::lib::F;
+-use base ('t::lib::C', 't::lib::D');
++package F;
++use base ('C', 'D');
+ 1;
diff --git a/perl-Class-C3-XS.spec b/perl-Class-C3-XS.spec
index dfdb785..018409f 100644
--- a/perl-Class-C3-XS.spec
+++ b/perl-Class-C3-XS.spec
@@ -1,11 +1,12 @@
Name: perl-Class-C3-XS
Version: 0.13
-Release: 21%{?dist}
+Release: 22%{?dist}
Summary: XS speedups for Class::C3
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Class-C3-XS/
Source0:
http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/Class-C3-XS-%{version}.tar.gz
+Patch0: Class-C3-XS-0.13-rt116566.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
# Module Build
BuildRequires: coreutils
@@ -15,8 +16,8 @@ BuildRequires: make
BuildRequires: perl
%if 0%{?fedora} > 6 || 0%{?rhel} > 5
BuildRequires: perl-devel
-BuildRequires: perl-generators
%endif
+BuildRequires: perl-generators
# Dependencies of bundled Module::Install
BuildRequires: perl(Config)
BuildRequires: perl(Cwd)
@@ -56,6 +57,10 @@ it can find it. Do not use this package directly, use
Class::C3 instead.
%prep
%setup -q -n Class-C3-XS-%{version}
+# Avoid relying on . being in @INC (CPAN RT#116566)
+# https://github.com/karenetheridge/Class-C3-XS/commit/a01258d4
+%patch0
+
%build
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
@@ -63,8 +68,8 @@ 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} -type f -name .packlist -delete
+find %{buildroot} -type f -name '*.bs' -empty -delete
%{_fixperms} %{buildroot}
%check
@@ -80,6 +85,11 @@ rm -rf %{buildroot}
%{_mandir}/man3/Class::C3::XS.3*
%changelog
+* Thu Aug 4 2016 Paul Howarth <[email protected]> - 0.13-22
+- Avoid relying on . being in @INC (CPAN RT#116566)
+- BR: perl-generators
+- Simplify find commands using -empty and -delete
+
* Sun May 15 2016 Jitka Plesnikova <[email protected]> - 0.13-21
- Perl 5.24 rebuild
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl-Class-C3-XS.git/commit/?h=f25&id=1f702d09fc39b497cb58bb264b7b7848889ebdc9
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
[email protected]
https://lists.fedoraproject.org/admin/lists/[email protected]