pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/ruby ruby: Fix extension installs on non-NetBSD.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5b2c579bed90
branches:  trunk
changeset: 374481:5b2c579bed90
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Wed Feb 23 15:53:25 2022 +0000

description:
ruby: Fix extension installs on non-NetBSD.

For some reason NetBSD does not append an OS version like pretty much all other
OS, and so installs of arch-specific extensions directories were broken due to
the triple containing a dash before the version and causing PLIST failures.

Introduce a new RUBY_EXTARCH variable that has a special-case for NetBSD, and
use it for GEM_EXTSBASE.  Fixes many packages, but notably ruby31-base.

diffstat:

 lang/ruby/rubyversion.mk |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r 68e861271c6c -r 5b2c579bed90 lang/ruby/rubyversion.mk
--- a/lang/ruby/rubyversion.mk  Wed Feb 23 11:46:07 2022 +0000
+++ b/lang/ruby/rubyversion.mk  Wed Feb 23 15:53:25 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rubyversion.mk,v 1.243 2022/02/20 15:59:09 taca Exp $
+# $NetBSD: rubyversion.mk,v 1.244 2022/02/23 15:53:25 jperkin Exp $
 #
 
 # This file determines which Ruby version is used as a dependency for
@@ -620,6 +620,13 @@
 
 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.
+.if ${OPSYS} == "NetBSD"
+RUBY_EXTARCH?= ${MACHINE_GNU_ARCH}-${LOWER_OPSYS}${APPEND_ELF}${LOWER_OPSYS_VERSUFFIX}${APPEND_ABI}
+.else
+RUBY_EXTARCH?= ${MACHINE_GNU_ARCH}-${LOWER_OPSYS}${APPEND_ELF}-${LOWER_OPSYS_VERSUFFIX}${APPEND_ABI}
+.endif
+
 RUBY_MAJOR_MINOR=      ${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}
 
 #
@@ -709,7 +716,7 @@
 
 RUBY_GEM_BASE?=                ${RUBY_LIB_BASE}/gems
 GEM_HOME?=             ${RUBY_GEM_BASE}/${RUBY_VER_DIR}
-GEM_EXTSBASE=          ${GEM_HOME}/extensions/${RUBY_GEM_ARCH}/${RUBY_VER_DIR}
+GEM_EXTSBASE=          ${GEM_HOME}/extensions/${RUBY_EXTARCH}/${RUBY_VER_DIR}
 GEM_PLUGINSDIR=                ${GEM_HOME}/plugins
 GEM_PATH?=             ${PREFIX}/${GEM_HOME}
 RUBYGEM=               ${LOCALBASE}/bin/${RUBYGEM_NAME}



Home | Main Index | Thread Index | Old Index