[perl-ExtUtils-MakeMaker] Fix building with older xsubpp
Petr Pisar
ppisar at fedoraproject.org
Wed Nov 5 11:57:50 UTC 2014
commit bd7e2b7c412bbe77b2d923f8f3b538afc01a7ad2
Author: Petr Písař <ppisar at redhat.com>
Date: Wed Nov 5 12:49:57 2014 +0100
Fix building with older xsubpp
...03-fix_m_strict_to_xsubpp_causes_problems.patch | 88 ++++++++++++++++++++
perl-ExtUtils-MakeMaker.spec | 9 ++-
2 files changed, 96 insertions(+), 1 deletions(-)
---
diff --git a/ExtUtils-MakeMaker-7.01_03-fix_m_strict_to_xsubpp_causes_problems.patch b/ExtUtils-MakeMaker-7.01_03-fix_m_strict_to_xsubpp_causes_problems.patch
new file mode 100644
index 0000000..97cff34
--- /dev/null
+++ b/ExtUtils-MakeMaker-7.01_03-fix_m_strict_to_xsubpp_causes_problems.patch
@@ -0,0 +1,88 @@
+From f91757e508a44c4e77488b9dfe1e4929adfa19a3 Mon Sep 17 00:00:00 2001
+From: Ed J <mohawk2 at users.noreply.github.com>
+Date: Fri, 31 Oct 2014 03:22:52 +0000
+Subject: [PATCH 1/2] Revert "Simulate Module::Install $(PERL) changing."
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This reverts commit 1e0d49b8c19fd0ca142b41b8a445d30b93e46679.
+(On e.g. Perl 5.10.1 adding -Mstrict to xsubpp causes problems)
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ t/xs.t | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/t/xs.t b/t/xs.t
+index e021932..cdeb6dd 100644
+--- a/t/xs.t
++++ b/t/xs.t
+@@ -40,15 +40,6 @@ SKIP: {
+ skip 'perl Makefile.PL failed', 2;
+ }
+
+- # now simulate what Module::Install does, and edit $(PERL) to add flags
+- open my $fh, '<', 'Makefile';
+- my $mtext = join '', <$fh>;
+- close $fh;
+- $mtext =~ s/^(\s*PERL\s*=.*)$/$1 -Mstrict/m;
+- open $fh, '>', 'Makefile';
+- print $fh $mtext;
+- close $fh;
+-
+ my $make = make_run();
+ my $make_out = run("$make");
+ unless (is( $?, 0, ' make exited normally' )) {
+--
+1.9.3
+
+
+From d20eca9e8041a3ac2b3d780a42ee0e7314234c99 Mon Sep 17 00:00:00 2001
+From: Ed J <mohawk2 at users.noreply.github.com>
+Date: Fri, 31 Oct 2014 03:42:44 +0000
+Subject: [PATCH 2/2] Add compat-test for Module::Install behaviour to
+ t/basic.t
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ t/basic.t | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/t/basic.t b/t/basic.t
+index f18859c..a0a6f91 100644
+--- a/t/basic.t
++++ b/t/basic.t
+@@ -3,6 +3,11 @@
+ # This test puts MakeMaker through the paces of a basic perl module
+ # build, test and installation of the Big::Fat::Dummy module.
+
++# Module::Install relies on being able to patch the generated Makefile
++# to add flags to $(PERL)
++# This test includes adding ' -Iinc' to $(PERL), and checking 'make install'
++# after that works. Done here as back-compat is considered basic.
++
+ BEGIN {
+ unshift @INC, 't/lib';
+ }
+@@ -133,6 +138,14 @@ like( $test_out, qr/All tests successful/, ' successful' );
+ is( $?, 0, ' exited normally' ) ||
+ diag $test_out;
+
++# now simulate what Module::Install does, and edit $(PERL) to add flags
++open my $fh, '<', $makefile;
++my $mtext = join '', <$fh>;
++close $fh;
++$mtext =~ s/^(\s*PERL\s*=.*)$/$1 -Iinc/m;
++open $fh, '>', $makefile;
++print $fh $mtext;
++close $fh;
+
+ my $install_out = run("$make install");
+ is( $?, 0, 'install' ) || diag $install_out;
+--
+1.9.3
+
diff --git a/perl-ExtUtils-MakeMaker.spec b/perl-ExtUtils-MakeMaker.spec
index 44c5c6e..c454186 100644
--- a/perl-ExtUtils-MakeMaker.spec
+++ b/perl-ExtUtils-MakeMaker.spec
@@ -3,7 +3,7 @@
Name: perl-%{cpan_name}
Version: %(echo '%{cpan_version}' | tr _ .)
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Create a module Makefile
License: GPL+ or Artistic
Group: Development/Libraries
@@ -18,6 +18,9 @@ Patch1: %{cpan_name}-7.00-Link-to-libperl-explicitly-on-Linux.patch
Patch2: ExtUtils-MakeMaker-7.00-Unbundle-version.patch
# Unbundle Encode::Locale module
Patch3: ExtUtils-MakeMaker-7.00-Unbundle-Encode-Locale.patch
+# Rebuilding EU-MM with xsubpp from perl-5.20 core causes test failure because
+# shellbang prologue is not strict-safe, in 7.01_04.
+Patch4: ExtUtils-MakeMaker-7.01_03-fix_m_strict_to_xsubpp_causes_problems.patch
BuildArch: noarch
BuildRequires: perl
# Makefile.Pl uses ExtUtils::MakeMaker from ./lib
@@ -110,6 +113,7 @@ Dougherty and the perl5-porters.
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
# Remove bundled modules
rm -rf bundled
sed -i -e '/^bundled\// d' MANIFEST
@@ -140,6 +144,9 @@ make test
%{_mandir}/man3/*
%changelog
+* Wed Nov 05 2014 Petr Pisar <ppisar at redhat.com> - 7.00-2
+- Fix building with older xsubpp
+
* Mon Oct 27 2014 Petr Pisar <ppisar at redhat.com> - 7.00-1
- 7.00 bump
More information about the perl-devel
mailing list