openbsd-ports/devel/cmake/patches/patch-Modules_FindTclStub_cmake
dcoppa d475b0a293 Update to cmake-2.8.9.
"There was no cmake fallout in the bulk on amd64" jasper@
Also tested by Brad with a handful of CMake using ports
2012-08-31 12:28:31 +00:00

59 lines
2.0 KiB
Plaintext

$OpenBSD: patch-Modules_FindTclStub_cmake,v 1.2 2012/08/31 12:28:31 dcoppa Exp $
--- Modules/FindTclStub.cmake.orig Thu Aug 23 12:09:46 2012
+++ Modules/FindTclStub.cmake Thu Aug 23 12:09:59 2012
@@ -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,14 +67,20 @@ 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"
-)
+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"
+ )
+ENDIF(TCLTK_OPENBSD_LIB_PATHS)
IF(WIN32)
GET_FILENAME_COMPONENT(