$OpenBSD: patch-Modules_FindTclStub_cmake,v 1.1 2010/05/28 20:21:48 dcoppa Exp $ --- Modules/FindTclStub.cmake.orig Tue May 11 14:30:20 2010 +++ Modules/FindTclStub.cmake Tue May 11 14:38:47 2010 @@ -38,13 +38,21 @@ INCLUDE(FindTCL) GET_FILENAME_COMPONENT(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH) GET_FILENAME_COMPONENT(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH) -STRING(REGEX REPLACE - "^.*tclsh([0-9]\\.*[0-9]).*$" "\\1" TCL_TCLSH_VERSION "${TCL_TCLSH}") +IF(MODTCL_VERSION) + SET(TCL_TCLSH_VERSION "${MODTCL_VERSION}") +ELSE(MODTCL_VERSION) + STRING(REGEX REPLACE + "^.*tclsh([0-9]\\.*[0-9]).*$" "\\1" TCL_TCLSH_VERSION "${TCL_TCLSH}") +ENDIF(MODTCL_VERSION) GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH) GET_FILENAME_COMPONENT(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH) -STRING(REGEX REPLACE - "^.*wish([0-9]\\.*[0-9]).*$" "\\1" TK_WISH_VERSION "${TK_WISH}") +IF(MODTK_VERSION) + SET(TK_WISH_VERSION "${MODTK_VERSION}") +ELSE(MODTK_VERSION) + STRING(REGEX REPLACE + "^.*wish([0-9]\\.*[0-9]).*$" "\\1" TK_WISH_VERSION "${TK_WISH}") +ENDIF(MODTK_VERSION) GET_FILENAME_COMPONENT(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH) GET_FILENAME_COMPONENT(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH) @@ -59,16 +67,22 @@ GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LI STRING(REGEX REPLACE "^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY}") -SET(TCLTK_POSSIBLE_LIB_PATHS - "${TCL_INCLUDE_PATH_PARENT}/lib" - "${TK_INCLUDE_PATH_PARENT}/lib" - "${TCL_LIBRARY_PATH}" - "${TK_LIBRARY_PATH}" - "${TCL_TCLSH_PATH_PARENT}/lib" - "${TK_WISH_PATH_PARENT}/lib" - /usr/lib - /usr/local/lib -) +IF(TCLTK_OPENBSD_LIB_PATHS) + SET(TCLTK_POSSIBLE_LIB_PATHS + "${TCLTK_OPENBSD_LIB_PATHS}" + ) +ELSE(TCLTK_OPENBSD_LIB_PATHS) + SET(TCLTK_POSSIBLE_LIB_PATHS + "${TCL_INCLUDE_PATH_PARENT}/lib" + "${TK_INCLUDE_PATH_PARENT}/lib" + "${TCL_LIBRARY_PATH}" + "${TK_LIBRARY_PATH}" + "${TCL_TCLSH_PATH_PARENT}/lib" + "${TK_WISH_PATH_PARENT}/lib" + /usr/lib + /usr/local/lib + ) +ENDIF(TCLTK_OPENBSD_LIB_PATHS) IF(WIN32) GET_FILENAME_COMPONENT(