openbsd-ports/devel/cmake/patches/patch-Modules_FindPythonInterp_cmake
dcoppa 4cd9f900fc Update to cmake-2.8.4.
Tested in a bulk build by landry@.
Lot of feedback from various people on ports@: thanks!

OK landry@, sthen@
2011-03-13 18:23:01 +00:00

25 lines
929 B
Plaintext

$OpenBSD: patch-Modules_FindPythonInterp_cmake,v 1.3 2011/03/13 18:23:02 dcoppa Exp $
--- Modules/FindPythonInterp.cmake.orig Tue Feb 15 18:47:27 2011
+++ Modules/FindPythonInterp.cmake Mon Mar 7 11:29:02 2011
@@ -20,11 +20,17 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
+SET(MODPY_VERSION $ENV{MODPY_VERSION})
+
# 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}
- 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
+IF(MODPY_VERSION)
+ set(_Python_VERSIONS ${MODPY_VERSION})
+ELSE(MODPY_VERSION)
+ set(_Python_VERSIONS
+ ${Python_ADDITIONAL_VERSIONS}
+ 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
+ENDIF(MODPY_VERSION)
# Run first with the Python version in the executable
foreach(_CURRENT_VERSION ${_Python_VERSIONS})