113 Star 0 Fork 9

src-openEuler/perl-Module-Build

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Module-Build-0.4231-Do-not-die-on-missing-ExtUtils-CBuilder-in-have_c_co.patch 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
lyn 提交于 1年前 . Upgrade to version 0.4234
From 043add527dd6bc05d5ef5750839ab21c2fdab9e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
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ř <ppisar@redhat.com>
---
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/perl-Module-Build.git
git@gitee.com:src-openeuler/perl-Module-Build.git
src-openeuler
perl-Module-Build
perl-Module-Build
master

搜索帮助

371d5123 14472233 46e8bd33 14472233