Skip to content

Commit

Permalink
lang/ruby*: add a patch to keep amd64-freebsd* as arch
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bapt committed Aug 30, 2022
1 parent 8fed94d commit c28714c
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
14 changes: 11 additions & 3 deletions 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"
Expand All @@ -9,11 +9,19 @@
], [
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)'
+ RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ['-Wl,-soname,${LIBRUBY_SO}'])
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")
])

10 changes: 9 additions & 1 deletion 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)
Expand All @@ -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")
])

8 changes: 8 additions & 0 deletions lang/ruby31/files/patch-configure.ac
Expand Up @@ -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")
])
8 changes: 8 additions & 0 deletions lang/ruby32/files/patch-configure.ac
Expand Up @@ -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")
])

0 comments on commit c28714c

Please sign in to comment.