From 7a1d7b2614491a69e9977d358364c854ba8a3736 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
Date: Tue, 16 Feb 2016 11:58:19 +0100
Subject: Unbundle Perl modules

---
 perl-MongoDB.spec | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/perl-MongoDB.spec b/perl-MongoDB.spec
index 447251e..baa0a2a 100644
--- a/perl-MongoDB.spec
+++ b/perl-MongoDB.spec
@@ -25,16 +25,14 @@ BuildRequires:  openssl-devel
 BuildRequires:  perl
 BuildRequires:  perl(Config)
 BuildRequires:  perl(Config::AutoConf) >= 0.22
-BuildRequires:  perl(CPAN)
 BuildRequires:  perl(Cwd)
-BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.76
-BuildRequires:  perl(ExtUtils::MM_Unix)
-BuildRequires:  perl(Fcntl)
-BuildRequires:  perl(File::Basename)
-BuildRequires:  perl(File::Find)
-BuildRequires:  perl(File::Path)
 BuildRequires:  perl(File::Spec)
 BuildRequires:  perl(File::Spec::Functions)
+BuildRequires:  perl(inc::Module::Install)
+BuildRequires:  perl(Module::Install::Base)
+BuildRequires:  perl(Module::Install::Compiler)
+BuildRequires:  perl(Module::Install::Metadata)
+BuildRequires:  perl(Module::Install::WriteAll)
 BuildRequires:  perl(Path::Tiny) >= 0.052
 BuildRequires:  perl(strict)
 BuildRequires:  perl(vars)
@@ -103,6 +101,18 @@ The perl database access module for MongoDB.
 %patch0 -p1
 rm -r bson yajl
 sed -i -e '/^bson\//d' -e '/^yajl\//d' MANIFEST
+# Remove bundled modules
+find inc/Module -type f \! -name Mongo.pm \
+    -exec rm -- {} \; -exec sed -i '\,{},d' MANIFEST \;
+# The inc::Module::Install cannot bootstrap with private extensions,
+# it needs double init:
+mv inc inc.old
+sed -i -e 's/^mongo;$/#mongo;/' Makefile.PL
+perl Makefile.PL --ssl --sasl
+sed -i -e 's/^#mongo;$/mongo;/' Makefile.PL
+rmdir inc/.author
+cp -r inc.old/* inc
+rm -r inc.old
 
 %build
 perl Makefile.PL --ssl --sasl INSTALLDIRS=vendor OPTIMIZE="%{optflags}" 
NO_PACKLIST=1
@@ -140,6 +150,7 @@ exit $test_rc
 %changelog
 * Tue Feb 16 2016 Petr Pisar <ppi...@redhat.com> - 0.708.4.0-4
 - Unbundle libbson
+- Unbundle Perl modules
 
 * Thu Feb 04 2016 Fedora Release Engineering <rel...@fedoraproject.org> - 
0.708.4.0-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
-- 
cgit v0.11.2


        
http://pkgs.fedoraproject.org/cgit/perl-MongoDB.git/commit/?h=master&id=7a1d7b2614491a69e9977d358364c854ba8a3736
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Reply via email to