Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Feb 2023 06:01:11 GMT
From:      Yasuhiro Kimura <yasu@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: fb4a68c58b46 - 2023Q1 - lang/ruby31: Add upstream patch to fix bug of mkmf library
Message-ID:  <202302110601.31B61BGR059296@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2023Q1 has been updated by yasu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fb4a68c58b46091c845663699b59734fba937e92

commit fb4a68c58b46091c845663699b59734fba937e92
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2023-01-28 05:35:34 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2023-02-11 06:00:36 +0000

    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
    
    (cherry picked from commit fc1c752e8b1cfb6162b9243f275efbe33ec04757)
---
 Mk/bsd.ruby.mk                          |  2 +-
 lang/ruby31/files/patch-mkmf-pkg-config | 25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/Mk/bsd.ruby.mk b/Mk/bsd.ruby.mk
index a9a6ce42574e..054aae8112f5 100644
--- a/Mk/bsd.ruby.mk
+++ b/Mk/bsd.ruby.mk
@@ -146,7 +146,7 @@ RUBY_PORTREVISION=	0
 # Ruby 3.1
 #
 RUBY_DISTVERSION=	3.1.3
-RUBY_PORTREVISION=	0
+RUBY_PORTREVISION=	1
 
 .      elif ${RUBY_VER} == 3.2
 #
diff --git a/lang/ruby31/files/patch-mkmf-pkg-config b/lang/ruby31/files/patch-mkmf-pkg-config
new file mode 100644
index 000000000000..f966b82eadb1
--- /dev/null
+++ b/lang/ruby31/files/patch-mkmf-pkg-config
@@ -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
+



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302110601.31B61BGR059296>