diff --git a/Module-Build-0.4224-Do-not-need-a-compiler-if-c_source-is-an-empty-list.patch b/Module-Build-0.4224-Do-not-need-a-compiler-if-c_source-is-an-empty-list.patch index bae98c6af127a60f514ac1fb6cb4ab169adf01a0..b01fde6a30d36112c0043c4d87849dea7c5d8183 100644 --- a/Module-Build-0.4224-Do-not-need-a-compiler-if-c_source-is-an-empty-list.patch +++ b/Module-Build-0.4224-Do-not-need-a-compiler-if-c_source-is-an-empty-list.patch @@ -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ř --- 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 \ No newline at end of file diff --git a/Module-Build-0.4224.tar.gz b/Module-Build-0.4224.tar.gz deleted file mode 100644 index 6ea61dd2239e4728b2a096a5cdca7304400f405e..0000000000000000000000000000000000000000 Binary files a/Module-Build-0.4224.tar.gz and /dev/null differ diff --git a/Module-Build-0.4231.tar.gz b/Module-Build-0.4231.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..de7e575753b5dd1addbbbca44d3e4d7288cab2cf Binary files /dev/null and b/Module-Build-0.4231.tar.gz differ diff --git a/perl-Module-Build.spec b/perl-Module-Build.spec index 06cff8c0dd3249121b5f75df4e60c90e9617f7f5..c19cd488d6bd4456edb099b29c913e4a9c23e4dc 100644 --- a/perl-Module-Build.spec +++ b/perl-Module-Build.spec @@ -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 - 2:0.42.31-1 +- upgrade version to 0.42.31 + * Fri Nov 29 2019 openEuler Buildteam - 2:0.42.24-12 - Package init