openbsd-ports/devel/cmake/patches/patch-Modules_FindPythonInterp_cmake
dcoppa 498b61a3b2 Update to cmake-2.8.8
OK sthen@
2012-05-07 07:06:20 +00:00

32 lines
1012 B
Plaintext

$OpenBSD: patch-Modules_FindPythonInterp_cmake,v 1.5 2012/05/07 07:06:20 dcoppa Exp $
--- Modules/FindPythonInterp.cmake.orig Mon Apr 30 11:57:33 2012
+++ Modules/FindPythonInterp.cmake Mon Apr 30 12:07:14 2012
@@ -29,6 +29,8 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
+SET(MODPY_VERSION $ENV{MODPY_VERSION})
+
unset(_Python_NAMES)
set(_PYTHON1_VERSIONS 1.6 1.5)
@@ -65,10 +67,14 @@ find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES})
# Set up the versions we know about, in the order we will search. Always add
# the user supplied additional versions to the front.
-set(_Python_VERSIONS
- ${Python_ADDITIONAL_VERSIONS}
- ${_PYTHON_FIND_OTHER_VERSIONS}
- )
+IF(MODPY_VERSION)
+ set(_Python_VERSIONS ${MODPY_VERSION})
+ELSE(MODPY_VERSION)
+ set(_Python_VERSIONS
+ ${Python_ADDITIONAL_VERSIONS}
+ ${_PYTHON_FIND_OTHER_VERSIONS}
+ )
+ENDIF(MODPY_VERSION)
unset(_PYTHON_FIND_OTHER_VERSIONS)
unset(_PYTHON1_VERSIONS)