Replace ExtUtils::MakeMaker dependency with ExtUtils::MM::Utils

This commit is contained in:
Petr Písař 2016-04-18 15:19:36 +02:00
parent f5ab4f931e
commit f5fdd59580
2 changed files with 57 additions and 3 deletions

View File

@ -0,0 +1,46 @@
From d96fedc52a7326941ff9a4036bdf2c6ffe100b3b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Mon, 18 Apr 2016 15:15:44 +0200
Subject: [PATCH] Replace EU::MM dependnecy with EU::MM::Utils
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This allows to free from a run-time dependency on fat ExtUtils::MakeMaker.
<https://bugzilla.redhat.com/show_bug.cgi?id=1129443>
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
Makefile.PL | 1 +
lib/IPC/Cmd.pm | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile.PL b/Makefile.PL
index 540012e..a014be8 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -9,6 +9,7 @@ my $prereqs = {
'File::Spec' => 0,
'File::Temp' => 0,
'ExtUtils::MakeMaker' => 0,
+ 'ExtUtils::MM::Utils' => 0,
};
WriteMakefile1(
diff --git a/lib/IPC/Cmd.pm b/lib/IPC/Cmd.pm
index 13f3c6b..6191dc3 100644
--- a/lib/IPC/Cmd.pm
+++ b/lib/IPC/Cmd.pm
@@ -230,7 +230,7 @@ sub can_run {
}
require File::Spec;
- require ExtUtils::MakeMaker;
+ require ExtUtils::MM::Utils;
my @possibles;
--
2.5.5

View File

@ -2,23 +2,27 @@ Name: perl-IPC-Cmd
# Epoch to compete with perl.spec
Epoch: 1
Version: 0.94
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Finding and running system commands made easy
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/IPC-Cmd/
Source0: http://www.cpan.org/authors/id/B/BI/BINGOS/IPC-Cmd-%{version}.tar.gz
# Replace ExtUtils::MakeMaker dependency with ExtUtils::MM::Utils.
# This allows not to require perl-devel. Bug #1129443
Patch0: IPC-Cmd-0.94-Replace-EU-MM-dependnecy-with-EU-MM-Utils.patch
BuildArch: noarch
# Build:
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: make
BuildRequires: perl
BuildRequires: perl(ExtUtils::MakeMaker)
# Run-time:
BuildRequires: perl(Carp)
BuildRequires: perl(constant)
BuildRequires: perl(Exporter)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(ExtUtils::MM::Utils)
BuildRequires: perl(File::Spec)
BuildRequires: perl(FileHandle)
BuildRequires: perl(IO::Handle)
@ -44,7 +48,7 @@ BuildRequires: perl(Test::More)
BuildRequires: perl(warnings)
# Dependencies:
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(ExtUtils::MakeMaker)
Requires: perl(ExtUtils::MM::Utils)
Requires: perl(FileHandle)
Requires: perl(IO::Handle)
Requires: perl(IO::Select)
@ -64,6 +68,7 @@ if desired, but have them still work.
%prep
%setup -q -n IPC-Cmd-%{version}
%patch0 -p1
%build
perl Makefile.PL INSTALLDIRS=vendor
@ -83,6 +88,9 @@ make test
%{_mandir}/man3/IPC::Cmd.3*
%changelog
* Mon Apr 18 2016 Petr Pisar <ppisar@redhat.com> - 1:0.94-3
- Replace ExtUtils::MakeMaker dependency with ExtUtils::MM::Utils (bug #1129443)
* Mon Feb 15 2016 Petr Pisar <ppisar@redhat.com> - 1:0.94-2
- Weaken dependency on IPC::Run (bug #1307195)