openbsd-ports/x11/ruby-qt4/patches/patch-cmake_modules_FindRUBY_cmake
2011-11-15 16:27:44 +00:00

61 lines
2.9 KiB
Plaintext

$OpenBSD: patch-cmake_modules_FindRUBY_cmake,v 1.1.1.1 2011/11/15 16:27:44 jeremy Exp $
--- cmake/modules/FindRUBY.cmake.orig Wed Jul 28 18:34:28 2010
+++ cmake/modules/FindRUBY.cmake Mon Nov 14 15:49:10 2011
@@ -25,25 +25,25 @@ endif (RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
# RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'`
# RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
-FIND_PROGRAM(RUBY_EXECUTABLE NAMES ruby ruby1.8 ruby18 ruby1.9 ruby19)
+FIND_PROGRAM(RUBY_EXECUTABLE NAMES ruby19)
IF(RUBY_EXECUTABLE)
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['archdir'] || Config::CONFIG['rubyincludedir']"
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts RbConfig::CONFIG['archdir'] || Config::CONFIG['rubyincludedir']"
OUTPUT_VARIABLE RUBY_ARCH_DIR)
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['libdir']"
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts RbConfig::CONFIG['libdir']"
OUTPUT_VARIABLE RUBY_POSSIBLE_LIB_PATH)
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['rubylibdir']"
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts RbConfig::CONFIG['rubylibdir']"
OUTPUT_VARIABLE RUBY_RUBY_LIB_PATH)
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['ruby_version']"
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts RbConfig::CONFIG['ruby_version']"
OUTPUT_VARIABLE RUBY_VERSION)
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['sitelibdir']"
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts RbConfig::CONFIG['sitelibdir']"
OUTPUT_VARIABLE RUBY_SITE_LIB_DIR)
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['sitearchdir']"
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts RbConfig::CONFIG['sitearchdir']"
OUTPUT_VARIABLE RUBY_SITE_ARCH_DIR)
# remove the new lines from the output by replacing them with empty strings
@@ -57,12 +57,12 @@ IF(RUBY_EXECUTABLE)
FIND_PATH(RUBY_INCLUDE_PATH
NAMES ruby.h
- PATHS ${RUBY_ARCH_DIR} /usr/include/ruby-${RUBY_VERSION}
+ PATHS ${RUBY_ARCH_DIR} /usr/local/include/ruby-${RUBY_VERSION}
)
FIND_LIBRARY(RUBY_LIBRARY
- NAMES ruby${RUBY_VERSION} ruby msvcrt-ruby${RUBY_VERSION_NODOT}
- PATHS ${RUBY_POSSIBLE_LIB_PATH} ${RUBY_RUBY_LIB_PATH}
+ NAMES ruby19
+ PATHS ${RUBY_POSSIBLE_LIB_PATH}
)
if(RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
@@ -82,6 +82,7 @@ IF(RUBY_FOUND)
ENDIF(NOT RUBY_FIND_QUIETLY)
ELSE(RUBY_FOUND)
IF(RUBY_FIND_REQUIRED)
+ MESSAGE(STATUS "Ruby not found: RUBY_LIBRARY: ${RUBY_LIBRARY} RUBY_INCLUDE_PATH: ${RUBY_INCLUDE_PATH}")
MESSAGE(FATAL_ERROR "Could not find Ruby")
ENDIF(RUBY_FIND_REQUIRED)
ENDIF(RUBY_FOUND)