git: 59deeb00ee2f - main - lang/ruby3{1,2,3}: Fix build with POSIX-compliant `sh -c`

From: Koichiro Iwao <meta_at_FreeBSD.org>
Date: Tue, 11 Mar 2025 15:15:35 UTC
The branch main has been updated by meta:

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

commit 59deeb00ee2faaa2f74acb681cf638aae7b3cda1
Author:     Koichiro Iwao <meta@FreeBSD.org>
AuthorDate: 2025-03-11 08:42:57 +0000
Commit:     Koichiro Iwao <meta@FreeBSD.org>
CommitDate: 2025-03-11 15:15:02 +0000

    lang/ruby3{1,2,3}: Fix build with POSIX-compliant `sh -c`
    
    This chanes nothing in the built package, so bumping PORTREVISION is not
    required.
    
    PR:             222872
    Reported by:    jilles
    Tested by:      John Hein
    Approved by:    meta (myself, with ruby hat)
    Sponsored by:   Cybertrust Japan
---
 lang/ruby31/Makefile | 3 ++-
 lang/ruby32/Makefile | 3 ++-
 lang/ruby33/Makefile | 4 +++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/lang/ruby31/Makefile b/lang/ruby31/Makefile
index 0b4215e3b1ff..151089815705 100644
--- a/lang/ruby31/Makefile
+++ b/lang/ruby31/Makefile
@@ -128,9 +128,10 @@ EXTDOCS=	readline/README ripper/README stringio/README.md \
 		syslog/syslog.txt
 
 # Macros to change variables in rbconfig.rb
+# NOTE: The last argument RB_SET_CONF_VAR is a dummy argument. See bug 222872.
 RB_SET_CONF_VAR=	${SH} -c \
 			'${REINPLACE_CMD} -E -e "s,(CONFIG\[\"$$0\"\][[:space:]]*=[[:space:]]*)(\(?)(.*)(\)?),\1\2$$1\4," ${WRKSRC}/rbconfig.rb' \
-			--
+			RB_SET_CONF_VAR
 
 post-build:
 #
diff --git a/lang/ruby32/Makefile b/lang/ruby32/Makefile
index 31cee5f5e148..3e1b5f4c62c6 100644
--- a/lang/ruby32/Makefile
+++ b/lang/ruby32/Makefile
@@ -127,9 +127,10 @@ EXTDOCS=	readline/README ripper/README stringio/README.md \
 		syslog/syslog.txt
 
 # Macros to change variables in rbconfig.rb
+# NOTE: The last argument RB_SET_CONF_VAR is a dummy argument. See bug 222872.
 RB_SET_CONF_VAR=	${SH} -c \
 			'${REINPLACE_CMD} -E -e "s,(CONFIG\[\"$$0\"\][[:space:]]*=[[:space:]]*)(\(?)(.*)(\)?),\1\2$$1\4," ${WRKSRC}/rbconfig.rb' \
-			--
+			RB_SET_CONF_VAR
 
 post-build:
 #
diff --git a/lang/ruby33/Makefile b/lang/ruby33/Makefile
index 1cb989b6f7a1..fd9cc2baff4a 100644
--- a/lang/ruby33/Makefile
+++ b/lang/ruby33/Makefile
@@ -54,10 +54,12 @@ EXTDOCS=	ripper/README stringio/README.md syslog/syslog.txt
 EXTSAMPLES=	bigdecimal/sample/*.rb
 INSTALLED_MANUALS=	ruby
 INSTALLED_SCRIPTS=	ruby
+
 # Macros to change variables in rbconfig.rb
+# NOTE: The last argument RB_SET_CONF_VAR is a dummy argument. See bug 222872.
 RB_SET_CONF_VAR=	${SH} -c \
 			'${REINPLACE_CMD} -E -e "s,(CONFIG\[\"$$0\"\][[:space:]]*=[[:space:]]*)(\(?)(.*)(\)?),\1\2$$1\4," ${WRKSRC}/rbconfig.rb' \
-			--
+			RB_SET_CONF_VAR
 
 OPTIONS_DEFINE=	CAPIDOCS DEBUG DOCS EXAMPLES GMP RDOC YJIT
 OPTIONS_DEFAULT=RDOC