!2 upgrade version to 0.42.31
From: @tong_1001 Reviewed-by: @small_leek Signed-off-by: @small_leek
This commit is contained in:
commit
60f70c703e
@ -5,27 +5,27 @@ Subject: [PATCH] Do not need a compiler if c_source is an empty list
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
|
||||
c_source used to be string, then it allowed a reference to an array.
|
||||
But in case the array was empty, auto_require() still enabled
|
||||
needs_compiler property and thus implied probing a compiler and
|
||||
a failure if none was available.
|
||||
|
||||
|
||||
Minilla generates these Build.PLs for pure-Perl distributions. See
|
||||
KAZUHO/Server-Starter-0.34.
|
||||
|
||||
|
||||
This patch makes Module::Build not require C compiler for
|
||||
c_source = [].
|
||||
|
||||
|
||||
Petr Písař: Ported to 0.4224.
|
||||
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
lib/Module/Build/API.pod | 8 ++++----
|
||||
lib/Module/Build/Base.pm | 6 +++++-
|
||||
t/properties/needs_compiler.t | 46 ++++++++++++++++++++++++++++++++++++++++---
|
||||
3 files changed, 52 insertions(+), 8 deletions(-)
|
||||
|
||||
|
||||
diff --git a/lib/Module/Build/API.pod b/lib/Module/Build/API.pod
|
||||
index cd2021a..c9be539 100644
|
||||
--- a/lib/Module/Build/API.pod
|
||||
@ -49,19 +49,19 @@ diff --git a/lib/Module/Build/Base.pm b/lib/Module/Build/Base.pm
|
||||
index 984810a..a29c664 100644
|
||||
--- a/lib/Module/Build/Base.pm
|
||||
+++ b/lib/Module/Build/Base.pm
|
||||
@@ -1517,7 +1517,11 @@ sub auto_require {
|
||||
# If set, we need ExtUtils::CBuilder (and a compiler)
|
||||
my $xs_files = $self->find_xs_files;
|
||||
if ( ! defined $p->{needs_compiler} ) {
|
||||
- $self->needs_compiler( keys %$xs_files || defined $self->c_source );
|
||||
+ $self->needs_compiler( keys %$xs_files ||
|
||||
+ ( defined $self->c_source &&
|
||||
+ ( ref($self->c_source) ne 'ARRAY' || @{$self->c_source} )
|
||||
+ )
|
||||
+ );
|
||||
@@ -1520,7 +1520,11 @@ sub auto_require {
|
||||
if ( $self->pureperl_only && $self->allow_pureperl ) {
|
||||
$self->needs_compiler( 0 );
|
||||
} else {
|
||||
- $self->needs_compiler( keys %$xs_files || defined $self->c_source );
|
||||
+ $self->needs_compiler( keys %$xs_files ||
|
||||
+ ( defined $self->c_source &&
|
||||
+ ( ref($self->c_source) ne 'ARRAY' || @{$self->c_source} )
|
||||
+ )
|
||||
+ );
|
||||
}
|
||||
}
|
||||
if ($self->needs_compiler) {
|
||||
$self->_add_prereq('build_requires', 'ExtUtils::CBuilder', 0);
|
||||
diff --git a/t/properties/needs_compiler.t b/t/properties/needs_compiler.t
|
||||
index f616dfc..c76d38f 100644
|
||||
--- a/t/properties/needs_compiler.t
|
||||
@ -141,5 +141,4 @@ index f616dfc..c76d38f 100644
|
||||
#--------------------------------------------------------------------------#
|
||||
$dist = DistGen->new(dir => 'MBTest', xs => 1);
|
||||
--
|
||||
2.13.6
|
||||
|
||||
2.13.6
|
||||
Binary file not shown.
BIN
Module-Build-0.4231.tar.gz
Normal file
BIN
Module-Build-0.4231.tar.gz
Normal file
Binary file not shown.
@ -4,12 +4,12 @@
|
||||
|
||||
Name: perl-Module-Build
|
||||
Epoch: 2
|
||||
Version: 0.42.24
|
||||
Release: 12
|
||||
Version: 0.42.31
|
||||
Release: 1
|
||||
Summary: Build and install Perl modules
|
||||
License: GPL+ or Artistic
|
||||
URL: https://metacpan.org/release/Module-Build
|
||||
Source0: https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-0.4224.tar.gz
|
||||
Source0: https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-0.4231.tar.gz
|
||||
Patch0: Module-Build-0.4224-Do-not-need-a-compiler-if-c_source-is-an-empty-list.patch
|
||||
BuildArch: noarch
|
||||
|
||||
@ -42,7 +42,7 @@ Requires: man
|
||||
This package includes man files for %{name}.
|
||||
|
||||
%prep
|
||||
%autosetup -n Module-Build-0.4224 -p1
|
||||
%autosetup -n Module-Build-0.4231 -p1
|
||||
|
||||
%build
|
||||
perl Build.PL installdirs=vendor
|
||||
@ -66,5 +66,8 @@ LANG=C TEST_SIGNATURE=1 MB_TEST_EXPERIMENTAL=1 ./Build test
|
||||
%{_mandir}/man*/*
|
||||
|
||||
%changelog
|
||||
* Tue Feb 02 2021 shixuantong <shixuantong@huawei.com> - 2:0.42.31-1
|
||||
- upgrade version to 0.42.31
|
||||
|
||||
* Fri Nov 29 2019 openEuler Buildteam <buildteam@openeuler.org> - 2:0.42.24-12
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user