Fix building with older xsubpp
This commit is contained in:
parent
f2acf1f093
commit
bd7e2b7c41
@ -0,0 +1,88 @@
|
||||
From f91757e508a44c4e77488b9dfe1e4929adfa19a3 Mon Sep 17 00:00:00 2001
|
||||
From: Ed J <mohawk2@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@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@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@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
|
||||
|
@ -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@redhat.com> - 7.00-2
|
||||
- Fix building with older xsubpp
|
||||
|
||||
* Mon Oct 27 2014 Petr Pisar <ppisar@redhat.com> - 7.00-1
|
||||
- 7.00 bump
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user