diff --git a/Module-Build-0.4231-Do-not-die-on-missing-ExtUtils-CBuilder-in-have_c_co.patch b/Module-Build-0.4231-Do-not-die-on-missing-ExtUtils-CBuilder-in-have_c_co.patch new file mode 100644 index 0000000000000000000000000000000000000000..47d1dfcbe67c2704a84319721d768622b4f169a6 --- /dev/null +++ b/Module-Build-0.4231-Do-not-die-on-missing-ExtUtils-CBuilder-in-have_c_co.patch @@ -0,0 +1,39 @@ +From 043add527dd6bc05d5ef5750839ab21c2fdab9e6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Mon, 28 Mar 2022 11:18:38 +0200 +Subject: [PATCH] Do not die on missing ExtUtils::CBuilder in have_c_compiler() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In Fedora, ExtUtils::CBuilder is optional to allow installing perl +without gcc (bug #1547165). Module::Build::have_c_compiler() uses +ExtUtils::CBuilder to detect a presence of a C compiler. If +ExtUtils::CBuilder was not installed, have_c_compiler() died instead +of returning a false value. + +This error manifested in perl-Alien-Base-ModuleBuild tests. This patch +changes have_c_compiler() to return true if ExtUtils::CBuilder is not +available. + +Signed-off-by: Petr Písař +--- + lib/Module/Build/Base.pm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/Module/Build/Base.pm b/lib/Module/Build/Base.pm +index 1352fcf..4e0f843 100644 +--- a/lib/Module/Build/Base.pm ++++ b/lib/Module/Build/Base.pm +@@ -5315,7 +5315,7 @@ sub have_c_compiler { + return $p->{_have_c_compiler} if defined $p->{_have_c_compiler}; + + $self->log_verbose("Checking if compiler tools configured... "); +- my $b = $self->cbuilder; ++ my $b = eval { $self->cbuilder }; + my $have = $b && eval { $b->have_compiler }; + $self->log_verbose($have ? "ok.\n" : "failed.\n"); + return $p->{_have_c_compiler} = $have; +-- +2.34.1 + diff --git a/Module-Build-0.4232.tar.gz b/Module-Build-0.4232.tar.gz deleted file mode 100644 index 2ffaacfb42d4badc381a8a3fc55adc9bd341bc93..0000000000000000000000000000000000000000 Binary files a/Module-Build-0.4232.tar.gz and /dev/null differ diff --git a/Module-Build-0.4234.tar.gz b/Module-Build-0.4234.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..3e507dbab4b20b7b6b9a5b2bfb33988a05a1119b Binary files /dev/null and b/Module-Build-0.4234.tar.gz differ diff --git a/perl-Module-Build.spec b/perl-Module-Build.spec index 63da56312792b280da926b8ad9de059bb6aa6d85..a6274dd98092c9ccb16a13bffc90efa46e8d9645 100644 --- a/perl-Module-Build.spec +++ b/perl-Module-Build.spec @@ -1,10 +1,10 @@ -%define anolis_release 4 +%define anolis_release 1 %global cpan_version 0.4232 Name: perl-Module-Build Epoch: 2 -Version: 0.42.32 +Version: 0.42.34 Release: %{anolis_release}%{?dist} Summary: Build and install Perl modules License: GPL-1.0-or-later OR Artistic-1.0-Perl @@ -12,6 +12,7 @@ URL: https://metacpan.org/release/Module-Build Source0: https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-%{cpan_version}.tar.gz Patch0001: 0001-Module-Build-0.4224-Do-not-need-a-compiler-if-c_source-is-an-empty-list.patch Patch0002: 0002-Module-Build-0.4231-Do-not-die-on-missing-ExtUtils-CBuilder-in-have_c_co.patch +Patch3: Module-Build-0.4231-Do-not-die-on-missing-ExtUtils-CBuilder-in-have_c_co.patch BuildArch: noarch @@ -100,6 +101,10 @@ LANG=C TEST_SIGNATURE=1 MB_TEST_EXPERIMENTAL=1 ./Build test %doc README contrib Changes INSTALL %changelog +* Mon Jul 07 2025 wenyuzifang - 0.42.34-1 +- Updated to version 0.42.34 to fix xxxxxxxxx +- Prevents fatal errors when ExtUtils::CBuilder is missing, ensuring compatibility with minimal Perl installations. + * Tue Apr 11 2023 yuanhui - 2:0.42.32-4 - Optimize the spec file @@ -117,4 +122,4 @@ LANG=C TEST_SIGNATURE=1 MB_TEST_EXPERIMENTAL=1 ./Build test - rebuild with perl 5.36.0 * Wed Apr 20 2022 mgb01105731 - 2:0.42.31-1 -- Init from upstream version 0.42.31 +- Init from upstream version 0.42.31 \ No newline at end of file