Files
Fred Wright 32ba7b9f91 ruby26: Fix build on macOS 12+, plus cleanups.
Note that building for macOS 12.x previously worked before upgrading
to Xcode 14.  Building for macOS 13.x never worked.

Cherry-picks upstream change to fix Xcode 14+ build for macOS 12+.
This changes content even on working builds, hence the revbump.

Fixes issue with building bigdecimal with Xcode 14+ for macOS 12+, by
disabling chained fixups and allowing the needed linker option.  See
the commit in the fork for more details.

Replaces ugly Portfile hacks for 10.5 x86_64 with proper fixes
developed for ruby27.

Replaces topical patchfiles with consolidated patchfiles derived
from the GitHub fork at fhgwright/ruby.

Fixes a couple of typos in a Portfile comment.

Also adds self as co-maintainer.

TESTED:
Built on OSX 10.4-10.5 ppc, 10.4-10.6 i386, 10.5-10.15 x86_64, and
11.x-13.x arm64, including universal builds for all but 10.4, where
dependency issues prevent building.  Also tested all variants in a
subset of cases.
2023-05-06 19:01:51 -04:00

33 lines
1.1 KiB
Diff

--- configure.orig 2022-04-12 04:50:13.000000000 -0700
+++ configure 2023-01-26 16:33:49.000000000 -0800
@@ -26922,7 +26922,15 @@ esac
case "$target_os" in #(
darwin*) :
+ # The -no_fixup_chains is needed on macOS 12+ to avoid getting a
+ # warning on the -undefined dynamic_lookup, which in turn disables
+ # the latter here and breaks the build of ext/bigdecimal/util.
+ # Since options aren't cumulative here, the two options need to be
+ # tested together. Older linkers may not support the added option,
+ # so we then try the original option alone. This may result in
+ # a harmless duplicate.
for flag in \
+ "-undefined dynamic_lookup -no_fixup_chains" \
"-undefined dynamic_lookup" \
"-multiply_defined suppress" \
; do
@@ -29651,11 +29659,11 @@ fi
_ACEOF
cat >>confdefs.h <<_ACEOF
-#define RUBY_ARCH "universal-"RUBY_PLATFORM_OS
+#define RUBY_ARCH "universal-" RUBY_PLATFORM_OS
_ACEOF
cat >>confdefs.h <<_ACEOF
-#define RUBY_PLATFORM "universal."RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS
+#define RUBY_PLATFORM "universal." RUBY_PLATFORM_CPU "-" RUBY_PLATFORM_OS
_ACEOF