forked from Lainports/freebsd-ports
lang/ruby31: Add upstream patch to fix bug of mkmf library
There is bug in mkmf library of Ruby 3.1 that it fails to detect pkg-config command if it isn't installed in environment that Ruby is built, and it causes build error of some ports when default version of Ruby is 3.1. So add upstream patch to fix it. Reference: https://bugs.ruby-lang.org/issues/19189 PR: 269197 Approved by: maintainer timeout MFH: 2023Q1
This commit is contained in:
parent
e83df13905
commit
fc1c752e8b
2 changed files with 26 additions and 1 deletions
|
|
@ -162,7 +162,7 @@ RUBY_PORTREVISION= 0
|
|||
# Ruby 3.1
|
||||
#
|
||||
RUBY_DISTVERSION= 3.1.3
|
||||
RUBY_PORTREVISION= 0
|
||||
RUBY_PORTREVISION= 1
|
||||
|
||||
. elif ${RUBY_VER} == 3.2
|
||||
#
|
||||
|
|
|
|||
25
lang/ruby31/files/patch-mkmf-pkg-config
Normal file
25
lang/ruby31/files/patch-mkmf-pkg-config
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
From 613fca01486e47dee9364a2fd86b5f5e77fe23c8 Mon Sep 17 00:00:00 2001
|
||||
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Date: Wed, 7 Dec 2022 22:14:44 +0900
|
||||
Subject: [PATCH] [Bug #19189] Fallback to the default "pkg-config"
|
||||
|
||||
---
|
||||
lib/mkmf.rb | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git lib/mkmf.rb lib/mkmf.rb
|
||||
index e94733c635..0fbc1cc2e5 100644
|
||||
--- lib/mkmf.rb
|
||||
+++ lib/mkmf.rb
|
||||
@@ -1866,7 +1866,7 @@ def pkg_config(pkg, *options)
|
||||
if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig)
|
||||
# if and only if package specific config command is given
|
||||
elsif ($PKGCONFIG ||=
|
||||
- (pkgconfig = with_config("pkg-config", RbConfig::CONFIG["PKG_CONFIG"])) &&
|
||||
+ (pkgconfig = with_config("pkg-config") {config_string("PKG_CONFIG") || "pkg-config"}) &&
|
||||
find_executable0(pkgconfig) && pkgconfig) and
|
||||
xsystem([*envs, $PKGCONFIG, "--exists", pkg])
|
||||
# default to pkg-config command
|
||||
--
|
||||
2.39.1
|
||||
|
||||
Loading…
Add table
Reference in a new issue