openbsd-ports/devel/cmake/patches/patch-Modules_FindPythonInterp_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

32 lines
1012 B
Plaintext

$OpenBSD: patch-Modules_FindPythonInterp_cmake,v 1.6 2012/11/11 17:13:31 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)