--- cmake/FindRuby.cmake.orig 2014-02-09 18:24:48.291574320 +0000 +++ cmake/FindRuby.cmake 2014-02-09 18:27:20.902318912 +0000 @@ -31,11 +31,6 @@ SET(RUBY_FIND_QUIETLY TRUE) ENDIF(RUBY_FOUND) -FIND_PACKAGE(PkgConfig) -IF(PKG_CONFIG_FOUND) - pkg_search_module(RUBY ruby-2.0 ruby-1.9 ruby-1.8) -ENDIF(PKG_CONFIG_FOUND) - IF(RUBY_FOUND) SET(RUBY_LIB "") @@ -44,14 +39,13 @@ ELSE(RUBY_FOUND) FIND_PROGRAM(RUBY_EXECUTABLE - NAMES ruby1.9.3 ruby193 ruby1.9.2 ruby192 ruby1.9.1 ruby191 ruby1.9 ruby19 ruby1.8 ruby18 ruby - PATHS /usr/bin /usr/local/bin /usr/pkg/bin + NAMES ${BSD_RUBY_CMD} ) IF(RUBY_EXECUTABLE) EXECUTE_PROCESS( - COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['rubyhdrdir'] || RbConfig::CONFIG['archdir']" + COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['rubyhdrdir'] || RbConfig::CONFIG['topdir']" OUTPUT_VARIABLE RUBY_ARCH_DIR ) @@ -61,12 +55,12 @@ ) EXECUTE_PROCESS( - COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['libdir']" + COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::TOPDIR + '/lib'" OUTPUT_VARIABLE RUBY_POSSIBLE_LIB_PATH ) EXECUTE_PROCESS( - COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['rubylibdir']" + COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::TOPDIR + '/lib/ruby/' + RbConfig::CONFIG['ruby_version']" OUTPUT_VARIABLE RUBY_RUBY_LIB_PATH ) @@ -78,8 +72,7 @@ SET(RUBY_INCLUDE_ARCH "${RUBY_INCLUDE_DIRS}/${RUBY_ARCH}") FIND_LIBRARY(RUBY_LIB - NAMES ruby-1.9.3 ruby1.9.3 ruby193 ruby-1.9.2 ruby1.9.2 ruby192 ruby-1.9.1 ruby1.9.1 ruby191 ruby1.9 ruby19 ruby1.8 ruby18 ruby - PATHS ${RUBY_POSSIBLE_LIB_PATH} ${RUBY_RUBY_LIB_PATH} + NAMES ${BSD_RUBY_VER} ) IF(RUBY_LIB AND RUBY_INCLUDE_DIRS)