[BACK]Return to patch-ab CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / devel / cmake / patches

File: [cvs.NetBSD.org] / pkgsrc / devel / cmake / patches / patch-ab (download)

Revision 1.14, Fri Sep 14 13:26:20 2012 UTC (2 years ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3, HEAD
Changes since 1.13: +3 -1 lines

Add comments to patches.

$NetBSD: patch-ab,v 1.14 2012/09/14 13:26:20 wiz Exp $

Insist on select python version for pkgsrc.

--- Modules/FindPythonInterp.cmake.orig	2012-04-18 18:10:54.000000000 +0000
+++ Modules/FindPythonInterp.cmake
@@ -60,14 +60,20 @@ endif(PythonInterp_FIND_VERSION)
 
 list(APPEND _Python_NAMES python)
 
-# Search for the current active python version first
-find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES})
+# for pkgsrc: force Python version (set in pyversion.mk)
+IF(DEFINED PYVERSSUFFIX)
+  SET(_VERSIONS ${PYVERSSUFFIX})
+ELSE(DEFINED PYVERSSUFFIX)
+  SET(_VERSIONS ${_PYTHON2_VERSIONS} ${_PYTHON3_VERSIONS})
+  # Search for the current active python version first
+  find_program(PYTHON_EXECUTABLE NAMES python)
+ENDIF(DEFINED PYVERSSUFFIX)
 
 # 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}
+  ${_VERSIONS}
   )
 
 unset(_PYTHON_FIND_OTHER_VERSIONS)