$NetBSD: patch-ab,v 1.9 2010/11/11 08:34:02 adam Exp $

--- Modules/FindPythonInterp.cmake.orig	2010-11-10 20:05:11.000000000 +0000
+++ Modules/FindPythonInterp.cmake
@@ -19,8 +19,15 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
+# for pkgsrc: force Python version (set in pyversion.mk)
+IF(DEFINED PYVERSSUFFIX)
+  SET(_VERSIONS python${PYVERSSUFFIX})
+ELSE(DEFINED PYVERSSUFFIX)
+  SET(_VERSIONS python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python)
+ENDIF(DEFINED PYVERSSUFFIX)
+
 FIND_PROGRAM(PYTHON_EXECUTABLE
-  NAMES python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python
+  NAMES ${_VERSIONS}
   PATHS
   [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
   [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
