ruby: Handle ruby31 changing the config triple for arm64 macOS.

This commit is contained in:
jperkin 2022-05-05 10:15:17 +00:00
parent e830922837
commit a1ce5c0975

View file

@ -1,4 +1,4 @@
# $NetBSD: rubyversion.mk,v 1.250 2022/04/12 19:07:11 nia Exp $
# $NetBSD: rubyversion.mk,v 1.251 2022/05/05 10:15:17 jperkin Exp $
#
# This file determines which Ruby version is used as a dependency for
@ -618,6 +618,12 @@ RUBY?= ${PREFIX}/bin/${RUBY_NAME}
RAKE?= ${PREFIX}/bin/${RAKE_NAME}
RDOC?= ${PREFIX}/bin/rdoc${RUBY_SUFFIX}
# ruby31 helpfully changed the config triple...
.if !empty(MACHINE_PLATFORM:MDarwin-*-aarch64) && ${RUBY_VER} >= 31
RUBY_ARCH?= arm64-${LOWER_OPSYS}${APPEND_ELF}${LOWER_OPSYS_VERSUFFIX}${APPEND_ABI}
RUBY_EXTARCH?= arm64-${LOWER_OPSYS}${APPEND_ELF}-${LOWER_OPSYS_VERSUFFIX}
.endif
RUBY_ARCH?= ${MACHINE_GNU_ARCH}-${LOWER_OPSYS}${APPEND_ELF}${LOWER_OPSYS_VERSUFFIX}${APPEND_ABI}
# NetBSD does not append an OS version, so we have to do this OPSYS-specific.