From a887a75a4f61a1da0ef76bc714a8108978185373 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
Date: Wed, 17 Jun 2015 07:40:02 +0200
Subject: Specify all dependencies

---
 ....12-Do-not-auto-install-modules-from-CPAN.patch | 26 +++++++++
 perl-Test-Dependencies.spec                        | 62 +++++++++++++++-------
 2 files changed, 68 insertions(+), 20 deletions(-)
 create mode 100644 
Test-Dependencies-0.12-Do-not-auto-install-modules-from-CPAN.patch

diff --git a/Test-Dependencies-0.12-Do-not-auto-install-modules-from-CPAN.patch 
b/Test-Dependencies-0.12-Do-not-auto-install-modules-from-CPAN.patch
new file mode 100644
index 0000000..0a662be
--- /dev/null
+++ b/Test-Dependencies-0.12-Do-not-auto-install-modules-from-CPAN.patch
@@ -0,0 +1,26 @@
+From d0a1c478dd161e9020dd956eb1534265a80eaa35 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
+Date: Wed, 17 Jun 2015 07:32:49 +0200
+Subject: [PATCH] Do not auto-install modules from CPAN
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Petr Písař <ppi...@redhat.com>
+---
+ Makefile.PL | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Makefile.PL b/Makefile.PL
+index 76793d0..1a6a1e9 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -18,5 +18,4 @@ build_requires('Test::Builder::Tester' => 0.64);
+ 
+ no_index directory => "t-data";
+ 
+-auto_install;
+ WriteAll;
+-- 
+2.1.0
+
diff --git a/perl-Test-Dependencies.spec b/perl-Test-Dependencies.spec
index 5627fa6..82c648b 100644
--- a/perl-Test-Dependencies.spec
+++ b/perl-Test-Dependencies.spec
@@ -6,23 +6,38 @@ License:    GPL+ or Artistic
 Group:      Development/Libraries
 Summary:    Ensure that your Makefile.PL specifies all module dependencies 
 Source:     
http://search.cpan.org/CPAN/authors/id/Z/ZE/ZEV/Test-Dependencies-%{version}.tar.gz
 
+# Disable installing missing modules from CPAN
+Patch0:     Test-Dependencies-0.12-Do-not-auto-install-modules-from-CPAN.patch
 Url:        http://search.cpan.org/dist/Test-Dependencies
-Requires:   perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo 
$version))
 BuildArch:  noarch
-
-BuildRequires: perl(ExtUtils::MakeMaker) 
-BuildRequires: perl(B::PerlReq)
-BuildRequires: perl(File::Find::Rule)
-BuildRequires: perl(IPC::Cmd)
-BuildRequires: perl(Module::CoreList)
-BuildRequires: perl(PerlReq::Utils)
-BuildRequires: perl(Pod::Strip)
-BuildRequires: perl(Test::Builder::Module)
-BuildRequires: perl(Test::Builder::Tester) >= 0.64
-BuildRequires: perl(YAML)
-BuildRequires: perl(Test::More)
-BuildRequires: perl(Test::Pod)
-BuildRequires: perl(Test::Pod::Coverage)
+BuildRequires:  findutils
+BuildRequires:  make
+BuildRequires:  perl
+BuildRequires:  perl(inc::Module::Install)
+BuildRequires:  perl(Module::Install::Metadata)
+BuildRequires:  perl(Module::Install::WriteAll)
+BuildRequires:  sed
+# Run-time:
+BuildRequires:  perl(B::PerlReq)
+BuildRequires:  perl(base)
+BuildRequires:  perl(Carp)
+BuildRequires:  perl(Exporter)
+BuildRequires:  perl(File::Find::Rule)
+BuildRequires:  perl(IPC::Cmd)
+BuildRequires:  perl(Module::CoreList)
+BuildRequires:  perl(PerlReq::Utils)
+BuildRequires:  perl(Pod::Strip)
+BuildRequires:  perl(strict)
+BuildRequires:  perl(Test::Builder::Module)
+BuildRequires:  perl(warnings)
+BuildRequires:  perl(YAML)
+# Tests:
+BuildRequires:  perl(Test::Builder::Tester) >= 0.64
+BuildRequires:  perl(Test::More)
+# Optional tests:
+BuildRequires:  perl(Test::Pod) >= 1.14
+BuildRequires:  perl(Test::Pod::Coverage) >= 1.04
+Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
 
 %description
 Makes sure that all of the modules that are 'use'd are listed in the
@@ -33,23 +48,29 @@ more time but is more accurate.
 
 %prep
 %setup -q -n Test-Dependencies-%{version}
+%patch0 -p1
+# Remove bundled modules
+rm -r ./inc
+sed -i -e '/^inc\//d' MANIFEST
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
+perl Makefile.PL INSTALLDIRS=vendor
+# Hide ExtUtils::MakeMaker dependency declaration in META.yml from
+# Test::Dependencies tests. System Module::Install::Makefile write it there
+# but Test::Dependencies ignores ./inc. This is need for unbundling ./inc.
+# CPAN RT#105285
+sed -i -e '/ExtUtils::MakeMaker:/d' META.yml
 make %{?_smp_mflags}
 
 %install
-make pure_install PERL_INSTALL_ROOT=%{buildroot}
+make pure_install DESTDIR=%{buildroot}
 find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
-find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
-
 %{_fixperms} %{buildroot}/*
 
 %check
 make test
 
 %files
-%defattr(-,root,root,-)
 %doc README Changes 
 %{perl_vendorlib}/*
 %{_mandir}/man3/*.3*
@@ -57,6 +78,7 @@ make test
 %changelog
 * Wed Jun 17 2015 Petr Pisar <ppi...@redhat.com> - 0.12-11
 - Perl 5.22 rebuild
+- Specify all dependencies
 
 * Fri Aug 29 2014 Jitka Plesnikova <jples...@redhat.com> - 0.12-10
 - Perl 5.20 rebuild
-- 
cgit v0.12


        
http://pkgs.fedoraproject.org/cgit/perl-Test-Dependencies.git/commit/?h=el6&id=a887a75a4f61a1da0ef76bc714a8108978185373
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Reply via email to