2015-10-12 16:54:15 +00:00
|
|
|
From d82a26ca0950191546f546264e79ff72e2dbf09f Mon Sep 17 00:00:00 2001
|
|
|
|
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
|
|
Date: Mon, 12 Oct 2015 18:52:16 +0200
|
|
|
|
Subject: [PATCH] ruby: make compatible with ruby 2.2
|
|
|
|
|
|
|
|
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
|
|
---
|
|
|
|
bindings/ruby/CMakeLists.txt | 11 ++++++++++-
|
|
|
|
1 file changed, 10 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/bindings/ruby/CMakeLists.txt b/bindings/ruby/CMakeLists.txt
|
|
|
|
index 6c3bd50..a7a3394 100644
|
|
|
|
--- a/bindings/ruby/CMakeLists.txt
|
|
|
|
+++ b/bindings/ruby/CMakeLists.txt
|
|
|
|
@@ -6,8 +6,17 @@ ELSE (USE_VENDORDIRS AND RUBY_VENDORARCH_DIR)
|
2012-02-07 19:23:40 +00:00
|
|
|
SET (RUBY_INSTALL_DIR ${RUBY_SITEARCH_DIR})
|
2012-06-07 06:50:19 +00:00
|
|
|
ENDIF (USE_VENDORDIRS AND RUBY_VENDORARCH_DIR)
|
2012-02-07 19:23:40 +00:00
|
|
|
|
2015-01-19 11:57:54 +00:00
|
|
|
+EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['arch']"
|
2012-02-07 19:23:40 +00:00
|
|
|
+ OUTPUT_VARIABLE RUBY_ARCH)
|
|
|
|
+
|
|
|
|
+EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['rubyhdrdir']"
|
|
|
|
+ OUTPUT_VARIABLE RUBY_HDR_DIR)
|
|
|
|
+
|
|
|
|
+SET(RUBY_INCLUDE_DIRS ${RUBY_HDR_DIR} ${RUBY_HDR_DIR}/${RUBY_ARCH})
|
|
|
|
+
|
|
|
|
MESSAGE (STATUS "Ruby executable: ${RUBY_EXECUTABLE}")
|
|
|
|
MESSAGE (STATUS "Ruby installation dir: ${RUBY_INSTALL_DIR}")
|
|
|
|
+MESSAGE (STATUS "Ruby include dir: ${RUBY_INCLUDE_DIRS}")
|
|
|
|
|
|
|
|
ADD_CUSTOM_COMMAND (
|
|
|
|
OUTPUT solv_ruby.c
|
|
|
|
@@ -17,7 +26,7 @@ ADD_CUSTOM_COMMAND (
|
|
|
|
)
|
|
|
|
|
|
|
|
ADD_DEFINITIONS(-Wno-unused)
|
|
|
|
-INCLUDE_DIRECTORIES (${RUBY_INCLUDE_PATH})
|
|
|
|
+INCLUDE_DIRECTORIES (${RUBY_INCLUDE_DIRS})
|
|
|
|
|
2015-10-12 16:54:15 +00:00
|
|
|
ADD_LIBRARY (bindings_ruby MODULE solv_ruby.c)
|
2012-02-07 19:23:40 +00:00
|
|
|
SET_TARGET_PROPERTIES (bindings_ruby PROPERTIES PREFIX "" OUTPUT_NAME "solv")
|
2015-10-12 16:54:15 +00:00
|
|
|
--
|
|
|
|
2.6.1
|
|
|
|
|