Help CMake builds with ruby module find the correct ruby executable.
Index: ruby.port.mk
===================================================================
RCS file: /cvs/ports/lang/ruby/ruby.port.mk,v
retrieving revision 1.100
diff -u -p -r1.100 ruby.port.mk
--- ruby.port.mk 20 Mar 2020 16:44:24 -0000 1.100
+++ ruby.port.mk 30 Mar 2020 17:06:18 -0000
@@ -183,6 +183,12 @@ MODRUBY_pre-configure += ${MODRUBY_ADJ_R
MODRUBY_WANTLIB+= c gmp m pthread
+# CMake
+.if ${CONFIGURE_STYLE:Mcmake}
+# https://cmake.org/cmake/help/latest/module/FindRuby.html
+CONFIGURE_ARGS += -DRUBY_EXECUTABLE=${RUBY}
+.endif
+
.if ${CONFIGURE_STYLE:L:Mext}
# Ruby C exensions are specific to an arch and are loaded as
# shared libraries (not compiled into ruby), so make sure PKG_ARCH=*
No comments:
Post a Comment