Highlights: - Stop building cmake itself with ninja. Upstream has decided not to support this anymore. I see no benefit and it's getting harder and harder to take care of. - Use cmake's internel libuv, json-cpp etc. to build the bootstrap cmake (only bootstrap). - Fix SONAME in cmake ports Notable port changes: - Fix COMPILER, it's not possible to build the old and the new cmake version with base-gcc, isn't. - It doesn't make any sense to keep the m88k XXX tags. CMake don't build under m88k. - Tech cmake to detect/provide system JDK11, lua and new ruby version (of course upcoming ruby 2.7) - I took some pre-configure commands from the FreeBSDs port. - Add --docdir to avoid warnings and sort CONFIGURE_ARGS Bulk build by naddy@ on amd64. Thanks a lot! Successful test by Martin Reindl on macppc and arm64. Thanks!
83 lines
3.2 KiB
Plaintext
83 lines
3.2 KiB
Plaintext
$OpenBSD: patch-Modules_FindRuby_cmake,v 1.17 2019/08/21 05:47:40 rsadowski Exp $
|
|
|
|
Index: Modules/FindRuby.cmake
|
|
--- Modules/FindRuby.cmake.orig
|
|
+++ Modules/FindRuby.cmake
|
|
@@ -42,7 +42,17 @@ Also:
|
|
|
|
# uncomment the following line to get debug output for this file
|
|
# set(_RUBY_DEBUG_OUTPUT TRUE)
|
|
+set(MODRUBY_REV $ENV{MODRUBY_REV})
|
|
|
|
+if(MODRUBY_REV AND MODRUBY_REV MATCHES "^[0-9]+\\.[0-9]$")
|
|
+ string(REPLACE "." "" MODRUBY_REV_NO_DOTS ${MODRUBY_REV})
|
|
+ string(REPLACE "." ";" MODRUBY_REV_LIST ${MODRUBY_REV})
|
|
+ list(GET MODRUBY_REV_LIST 0 MODRUBY_REV_MAJOR)
|
|
+ list(GET MODRUBY_REV_LIST 1 MODRUBY_REV_MINOR)
|
|
+endif()
|
|
+
|
|
+
|
|
+
|
|
# Determine the list of possible names of the ruby executable depending
|
|
# on which version of ruby is required
|
|
set(_RUBY_POSSIBLE_EXECUTABLE_NAMES ruby)
|
|
@@ -60,12 +70,16 @@ else()
|
|
endif()
|
|
|
|
if(NOT Ruby_FIND_VERSION_EXACT)
|
|
- list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby2.4 ruby24)
|
|
- list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby2.3 ruby23)
|
|
- list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby2.2 ruby22)
|
|
- list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby2.1 ruby21)
|
|
- list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby2.0 ruby20)
|
|
- list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby1.9 ruby19)
|
|
+ list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby28 ruby2.8)
|
|
+ list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby27 ruby2.7)
|
|
+ list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby26 ruby2.6)
|
|
+ list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby25 ruby2.5)
|
|
+ list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby24 ruby2.4)
|
|
+ list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby23 ruby2.3)
|
|
+ list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby22 ruby2.2)
|
|
+ list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby21 ruby2.1)
|
|
+ list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby20 ruby2.0)
|
|
+ list(APPEND _RUBY_POSSIBLE_EXECUTABLE_NAMES ruby19 ruby1.9)
|
|
|
|
# if we want a version below 1.9, also look for ruby 1.8
|
|
if("${Ruby_FIND_VERSION_SHORT_NODOT}" VERSION_LESS "19")
|
|
@@ -189,6 +203,26 @@ if(RUBY_EXECUTABLE AND NOT RUBY_VERSION_MAJOR)
|
|
set(RUBY_VERSION_MAJOR 2)
|
|
set(RUBY_VERSION_MINOR 4)
|
|
endif()
|
|
+ # check whether we found 2.5.x
|
|
+ if(${RUBY_EXECUTABLE} MATCHES "ruby2\\.?5")
|
|
+ set(RUBY_VERSION_MAJOR 2)
|
|
+ set(RUBY_VERSION_MINOR 5)
|
|
+ endif()
|
|
+ # check whether we found 2.6.x
|
|
+ if(${RUBY_EXECUTABLE} MATCHES "ruby2\\.?6")
|
|
+ set(RUBY_VERSION_MAJOR 2)
|
|
+ set(RUBY_VERSION_MINOR 6)
|
|
+ endif()
|
|
+ # check whether we found 2.7.x
|
|
+ if(${RUBY_EXECUTABLE} MATCHES "ruby2\\.?7")
|
|
+ set(RUBY_VERSION_MAJOR 2)
|
|
+ set(RUBY_VERSION_MINOR 7)
|
|
+ endif()
|
|
+ # check whether we found 2.8.x
|
|
+ if(${RUBY_EXECUTABLE} MATCHES "ruby2\\.?8")
|
|
+ set(RUBY_VERSION_MAJOR 2)
|
|
+ set(RUBY_VERSION_MINOR 8)
|
|
+ endif()
|
|
endif()
|
|
|
|
if(RUBY_VERSION_MAJOR)
|
|
@@ -223,7 +257,7 @@ endif()
|
|
|
|
|
|
# Determine the list of possible names for the ruby library
|
|
-set(_RUBY_POSSIBLE_LIB_NAMES ruby ruby-static ruby${_RUBY_VERSION_SHORT} ruby${_RUBY_VERSION_SHORT_NODOT} ruby-${_RUBY_VERSION_SHORT} ruby-${RUBY_VERSION})
|
|
+set(_RUBY_POSSIBLE_LIB_NAMES ruby${_RUBY_VERSION_SHORT_NODOT} ruby${_RUBY_VERSION_SHORT} ruby-${_RUBY_VERSION_SHORT} ruby-${RUBY_VERSION} ruby ruby-static)
|
|
|
|
if(WIN32)
|
|
set( _RUBY_MSVC_RUNTIME "" )
|