Blame SOURCES/perl-5.22.1-Provide-ExtUtils-MM-methods-as-standalone-ExtUtils-M.patch

243a19
From 9575301256f67116eccdbb99b38fc804ba3dcf53 Mon Sep 17 00:00:00 2001
243a19
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
243a19
Date: Mon, 18 Apr 2016 16:24:03 +0200
243a19
Subject: [PATCH] Provide ExtUtils::MM methods as standalone
243a19
 ExtUtils::MM::Utils
243a19
MIME-Version: 1.0
243a19
Content-Type: text/plain; charset=UTF-8
243a19
Content-Transfer-Encoding: 8bit
243a19
243a19
If you cannot afford depending on ExtUtils::MakeMaker, you can
243a19
depend on ExtUtils::MM::Utils instead.
243a19
243a19
<https://bugzilla.redhat.com/show_bug.cgi?id=1129443>
243a19
243a19
Signed-off-by: Petr Písař <ppisar@redhat.com>
243a19
---
243a19
 MANIFEST                                         |  1 +
243a19
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm | 68 ++++++++++++++++++++++++
243a19
 2 files changed, 69 insertions(+)
243a19
 create mode 100644 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm
243a19
243a19
diff --git a/MANIFEST b/MANIFEST
243a19
index 6af238c..d4f0c56 100644
243a19
--- a/MANIFEST
243a19
+++ b/MANIFEST
243a19
@@ -1045,6 +1045,7 @@ cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm			MakeMaker methods for OS/2
243a19
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm			MakeMaker methods for OS/2
243a19
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm			MakeMaker methods for QNX
243a19
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm			MakeMaker methods for Unix
243a19
+cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm		Independed MM methods
243a19
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm			MakeMaker methods for U/WIN
243a19
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm			MakeMaker methods for VMS
243a19
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm			MakeMaker methods for VOS
243a19
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm
243a19
new file mode 100644
243a19
index 0000000..6bbc0d8
243a19
--- /dev/null
243a19
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm
243a19
@@ -0,0 +1,68 @@
243a19
+package ExtUtils::MM::Utils;
243a19
+
243a19
+require 5.006;
243a19
+
243a19
+use strict;
243a19
+use vars qw($VERSION);
243a19
+$VERSION = '7.11_06';
243a19
+$VERSION = eval $VERSION;  ## no critic [BuiltinFunctions::ProhibitStringyEval]
243a19
+
243a19
+=head1 NAME
243a19
+
243a19
+ExtUtils::MM::Utils - ExtUtils::MM methods without dependency on ExtUtils::MakeMaker
243a19
+
243a19
+=head1 SYNOPSIS
243a19
+
243a19
+    require ExtUtils::MM::Utils;
243a19
+    MM->maybe_command($file);
243a19
+
243a19
+=head1 DESCRIPTION
243a19
+
243a19
+This is a collection of L<ExtUtils::MM> subroutines that are used by many
243a19
+other modules but that do not need full-featured L<ExtUtils::MakeMaker>. The
243a19
+issue with L<ExtUtils::MakeMaker> is it pulls in Perl header files and that is
243a19
+an overkill for small subroutines.
243a19
+
243a19
+An example is the L<IPC::Cmd> that caused installing GCC just because of
243a19
+three-line I<maybe_command()> from L<ExtUtils::MM_Unix>.
243a19
+
243a19
+The intentions is to use L<ExtUtils::MM::Utils> instead of
243a19
+L<ExtUtils::MakeMaker> for these trivial methods. You can still call them via
243a19
+L<MM> class name.
243a19
+
243a19
+=head1 METHODS
243a19
+
243a19
+=over 4
243a19
+
243a19
+=item maybe_command
243a19
+
243a19
+Returns true, if the argument is likely to be a command.
243a19
+
243a19
+=cut
243a19
+
243a19
+if (!exists $INC{'ExtUtils/MM.pm'}) {
243a19
+    *MM::maybe_command = *ExtUtils::MM::maybe_command = \&maybe_command;
243a19
+}
243a19
+
243a19
+sub maybe_command {
243a19
+    my($self,$file) = @_;
243a19
+    return $file if -x $file && ! -d $file;
243a19
+    return;
243a19
+}
243a19
+
243a19
+1;
243a19
+
243a19
+=back
243a19
+
243a19
+=head1 BUGS
243a19
+
243a19
+These methods are copied from L<ExtUtils::MM_Unix>. Other operating systems
243a19
+are not supported yet. The reason is this
243a19
+L
243a19
+distributions|https://bugzilla.redhat.com/show_bug.cgi?id=1129443>.
243a19
+
243a19
+=head1 SEE ALSO
243a19
+
243a19
+L<ExtUtils::MakeMaker>, L<ExtUtils::MM>
243a19
+
243a19
+=cut
243a19
-- 
243a19
2.5.5
243a19