From b2c2f1d509537c059ddf01e40af84e27b63228e1 Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Sat, 13 Nov 2010 01:28:33 +0200 Subject: [PATCH] Adapt FindPython_fix_#569321_and_#580503.diff patch to upstream changes. Upstream added support for python 2.7. --- debian/changelog | 1 + .../FindPython_fix_#569321_and_#580503.diff | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 944892bc0..d27a4780e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,7 @@ cmake (2.8.3-1) UNRELEASED; urgency=low - add_libarchive_script.patch - better version merged upstream; - fix-CTestTestFailedSubmit-xmlrpc.diff; - fix_spelling_errors.patch. + * Adapt FindPython_fix_#569321_and_#580503.diff patch to upstream changes. -- Modestas Vainius Sat, 13 Nov 2010 01:07:46 +0200 diff --git a/debian/patches/FindPython_fix_#569321_and_#580503.diff b/debian/patches/FindPython_fix_#569321_and_#580503.diff index a6488e802..375415b6e 100644 --- a/debian/patches/FindPython_fix_#569321_and_#580503.diff +++ b/debian/patches/FindPython_fix_#569321_and_#580503.diff @@ -8,19 +8,20 @@ Description: Make the Python CMake scripts more versatile in version handling. . Parts of this patch were based on Didier Raboud's patch for #569321. -Last-Update: 2010-06-07 +Last-Update: 2010-11-13 Origin: vendor Forwarded: http://public.kitware.com/Bug/view.php?id=10279 --- a/Modules/FindPythonInterp.cmake +++ b/Modules/FindPythonInterp.cmake -@@ -19,19 +19,35 @@ - # (To distributed this file outside of CMake, substitute the full +@@ -19,20 +19,35 @@ + # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) -FIND_PROGRAM(PYTHON_EXECUTABLE -- NAMES python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python +- NAMES python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python - PATHS +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath] @@ -39,7 +40,7 @@ Forwarded: http://public.kitware.com/Bug/view.php?id=10279 +IF(CMAKE_USE_PYTHON_VERSION) + SET(CMAKE_PYTHON_VERSIONS ${CMAKE_USE_PYTHON_VERSION}) +ELSE(CMAKE_USE_PYTHON_VERSION) -+ SET(CMAKE_PYTHON_VERSIONS 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5) ++ SET(CMAKE_PYTHON_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5) + + FIND_PROGRAM(PYVERSIONS_EXE + NAMES pyversions @@ -69,7 +70,7 @@ Forwarded: http://public.kitware.com/Bug/view.php?id=10279 # Search for the python framework on Apple. CMAKE_FIND_FRAMEWORKS(Python) --FOREACH(_CURRENT_VERSION 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5) +-FOREACH(_CURRENT_VERSION 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5) +# The following was added for Debian by Kai Wasserbäch +# in 2010 and based on suggestions and patches by +# Didier Raboud and Jakub Wilk to fix the @@ -78,7 +79,7 @@ Forwarded: http://public.kitware.com/Bug/view.php?id=10279 +IF(CMAKE_USE_PYTHON_VERSION) + SET(CMAKE_PYTHON_VERSIONS ${CMAKE_USE_PYTHON_VERSION}) +ELSE(CMAKE_USE_PYTHON_VERSION) -+ SET(CMAKE_PYTHON_VERSIONS 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5) ++ SET(CMAKE_PYTHON_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5) + + FIND_PROGRAM(PYVERSIONS_EXE + NAMES pyversions