git: c28714cbc837 - main - lang/ruby*: add a patch to keep amd64-freebsd* as arch

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Tue, 30 Aug 2022 12:46:44 UTC
The branch main has been updated by bapt:

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

commit c28714cbc837128b141f19fb6e52b770fd641b9b
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2022-08-30 12:37:48 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2022-08-30 12:46:40 +0000

    lang/ruby*: add a patch to keep amd64-freebsd* as arch
    
    In preparation for the update of config.guess/config.sub, where
    amd64-portbld-freebsd14.0 is reported as x86_64-portbld-freebsd14.0,
    Add a patch to keep the arch specific directory on amd64 being named amd64
---
 lang/ruby27/files/patch-configure.ac | 14 +++++++++++---
 lang/ruby30/files/patch-configure.ac | 10 +++++++++-
 lang/ruby31/files/patch-configure.ac |  8 ++++++++
 lang/ruby32/files/patch-configure.ac |  8 ++++++++
 4 files changed, 36 insertions(+), 4 deletions(-)

diff --git a/lang/ruby27/files/patch-configure.ac b/lang/ruby27/files/patch-configure.ac
index 170a9f3a9fe8..2ad70b2c403a 100644
--- a/lang/ruby27/files/patch-configure.ac
+++ b/lang/ruby27/files/patch-configure.ac
@@ -1,6 +1,6 @@
---- configure.ac.orig	2018-12-28 12:03:09 UTC
+--- configure.ac.orig	2022-04-12 11:25:48 UTC
 +++ configure.ac
-@@ -2678,7 +2678,7 @@ AS_IF([test "$with_dln_a_out" != yes], [
+@@ -2714,7 +2714,7 @@ AS_IF([test "$with_dln_a_out" != yes], [
  			: ${LDSHARED='$(CC) -shared'}
  			AS_IF([test "$rb_cv_binary_elf" = yes], [
  			    LDFLAGS="$LDFLAGS -rdynamic"
@@ -9,7 +9,7 @@
  			], [
  			  test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED='$(LD) -Bshareable'
  			])
-@@ -3163,6 +3163,7 @@ AS_CASE("$enable_shared", [yes], [
+@@ -3200,6 +3200,7 @@ AS_CASE("$enable_shared", [yes], [
      [freebsd*|dragonfly*], [
  	LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR)$(MINOR)'
  	LIBRUBY_SONAME='$(LIBRUBY_SO)'
@@ -17,3 +17,11 @@
  	AS_IF([test "$rb_cv_binary_elf" != "yes" ], [
  	    LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
  	    LIBRUBY_ALIASES=''
+@@ -3833,6 +3834,7 @@ AS_IF([test "${universal_binary-no}" = yes ], [
+     AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "universal." RUBY_PLATFORM_CPU "-" RUBY_PLATFORM_OS)
+ ], [
+     arch="${target_cpu}-${target_os}"
++    AS_CASE(["$target_cpu-$target_os"], [x86_64-freebsd*],[arch=amd64-${target_os}])
+     AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "$arch")
+ ])
+ 
diff --git a/lang/ruby30/files/patch-configure.ac b/lang/ruby30/files/patch-configure.ac
index 3571a89e5cec..44a6172a23f4 100644
--- a/lang/ruby30/files/patch-configure.ac
+++ b/lang/ruby30/files/patch-configure.ac
@@ -1,5 +1,5 @@
 --- configure.ac.orig	2022-04-12 11:48:55 UTC
-+++ configure.ac	2022-04-23
++++ configure.ac
 @@ -1231,7 +1231,7 @@ AC_CHECK_HEADERS(utime.h)
  AC_CHECK_HEADERS(time.h)
  AC_CHECK_HEADERS(ucontext.h)
@@ -26,3 +26,11 @@
  	AS_IF([test "$rb_cv_binary_elf" != "yes" ], [
  	    LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
  	    LIBRUBY_ALIASES=''
+@@ -3960,6 +3961,7 @@ AS_IF([test "${universal_binary-no}" = yes ], [
+     AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "universal." RUBY_PLATFORM_CPU "-" RUBY_PLATFORM_OS)
+ ], [
+     arch="${target_cpu}-${target_os}"
++    AS_CASE(["$target_cpu-$target_os"], [x86_64-freebsd*],[arch=amd64-${target_os}])
+     AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "$arch")
+ ])
+ 
diff --git a/lang/ruby31/files/patch-configure.ac b/lang/ruby31/files/patch-configure.ac
index 620b24f62202..ecaacc2baef2 100644
--- a/lang/ruby31/files/patch-configure.ac
+++ b/lang/ruby31/files/patch-configure.ac
@@ -26,3 +26,11 @@
  	AS_IF([test "$rb_cv_binary_elf" != "yes" ], [
  	    LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
  	    LIBRUBY_ALIASES=''
+@@ -4103,6 +4104,7 @@ AS_IF([test "${universal_binary-no}" = yes ], [
+         arch="${target_cpu}-mingw-ucrt"
+     ], [
+         arch="${target_cpu}-${target_os}"
++	AS_CASE(["$target_cpu-$target_os"], [x86_64-freebsd*],[arch=amd64-${target_os}])
+     ])
+     AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "$arch")
+ ])
diff --git a/lang/ruby32/files/patch-configure.ac b/lang/ruby32/files/patch-configure.ac
index 7740d9d0a1c3..af75b46cc98d 100644
--- a/lang/ruby32/files/patch-configure.ac
+++ b/lang/ruby32/files/patch-configure.ac
@@ -26,3 +26,11 @@
  	AS_IF([test "$rb_cv_binary_elf" != "yes" ], [
  	    LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
  	    LIBRUBY_ALIASES=''
+@@ -4150,6 +4151,7 @@ AS_IF([test "${universal_binary-no}" = yes ], [
+         arch="${target_cpu}-mingw-ucrt"
+     ], [
+         arch="${target_cpu}-${target_os}"
++	AS_CASE(["$target_cpu-$target_os"], [x86_64-freebsd*],[arch=amd64-${target_os}])
+     ])
+     AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "$arch")
+ ])