openbsd-ports/devel/cmake/patches/patch-Modules_FindTclsh_cmake
dcoppa c079d1f2bf Update to cmake-2.8.10.
Successfully gone through a bulk build.

Feedback landry@, Vadim Zhukov, Amit Kulkarni
Bulk build and OK landry@
2012-11-11 17:13:31 +00:00

61 lines
1.7 KiB
Plaintext

$OpenBSD: patch-Modules_FindTclsh_cmake,v 1.3 2012/11/11 17:13:32 dcoppa Exp $
--- Modules/FindTclsh.cmake.orig Fri Nov 2 14:15:34 2012
+++ Modules/FindTclsh.cmake Fri Nov 2 14:20:30 2012
@@ -20,14 +20,21 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
+set(MODTCL_VERSION $ENV{MODTCL_VERSION})
+set(MODTK_VERSION $ENV{MODTK_VERSION})
+
if(CYGWIN)
find_program(TCL_TCLSH NAMES cygtclsh83 cygtclsh80)
endif()
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)
@@ -66,16 +73,22 @@ if(WIN32)
)
endif()
-set(TCL_TCLSH_NAMES
- tclsh
- tclsh${TCL_LIBRARY_VERSION} tclsh${TK_LIBRARY_VERSION} tclsh${TK_WISH_VERSION}
- tclsh86 tclsh8.6
- tclsh85 tclsh8.5
- tclsh84 tclsh8.4
- tclsh83 tclsh8.3
- tclsh82 tclsh8.2
- tclsh80 tclsh8.0
- )
+if(MODTCL_VERSION)
+ set(TCL_TCLSH_NAMES
+ tclsh${MODTCL_VERSION}
+ )
+else(MODTCL_VERSION)
+ set(TCL_TCLSH_NAMES
+ tclsh
+ tclsh${TCL_LIBRARY_VERSION} tclsh${TK_LIBRARY_VERSION} tclsh${TK_WISH_VERSION}
+ tclsh86 tclsh8.6
+ tclsh85 tclsh8.5
+ tclsh84 tclsh8.4
+ tclsh83 tclsh8.3
+ tclsh82 tclsh8.2
+ tclsh80 tclsh8.0
+ )
+endif(MODTCL_VERSION)
find_program(TCL_TCLSH
NAMES ${TCL_TCLSH_NAMES}