From f5ec53abcc5d61a6cc9073911c1e401c7f8b0ff6 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 28 Aug 2013 11:00:53 -0600 Subject: [PATCH] Add patch to fix FindPythonLibs issues (bug #876118) --- cmake-FindPythonLibs.patch | 29 +++++++++++++++++++++++++++++ cmake.spec | 10 +++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 cmake-FindPythonLibs.patch diff --git a/cmake-FindPythonLibs.patch b/cmake-FindPythonLibs.patch new file mode 100644 index 0000000..1433d3f --- /dev/null +++ b/cmake-FindPythonLibs.patch @@ -0,0 +1,29 @@ +diff -rupN cmake/Modules/FindPythonLibs.cmake new/Modules/FindPythonLibs.cmake +--- cmake/Modules/FindPythonLibs.cmake 2013-04-12 14:09:08.470669049 -0500 ++++ new/Modules/FindPythonLibs.cmake 2013-04-12 15:41:15.789496153 -0500 +@@ -69,10 +69,21 @@ endif() + + # 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 FindPythonInterp has already found the major and minor version, ++# insert that version between the user supplied versions and the stock ++# version list. ++if(DEFINED PYTHON_VERSION_MAJOR AND DEFINED PYTHON_VERSION_MINOR) ++ set(_Python_VERSIONS ++ ${Python_ADDITIONAL_VERSIONS} ++ ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} ++ ${_PYTHON_FIND_OTHER_VERSIONS} ++ ) ++else() ++ set(_Python_VERSIONS ++ ${Python_ADDITIONAL_VERSIONS} ++ ${_PYTHON_FIND_OTHER_VERSIONS} ++ ) ++endif() + + unset(_PYTHON_FIND_OTHER_VERSIONS) + unset(_PYTHON1_VERSIONS) diff --git a/cmake.spec b/cmake.spec index f02ed9d..c893958 100644 --- a/cmake.spec +++ b/cmake.spec @@ -13,7 +13,7 @@ Name: cmake Version: 2.8.12 -Release: 0.1.rc1%{?dist} +Release: 0.2.rc1%{?dist} Summary: Cross-platform make system Group: Development/Tools @@ -38,6 +38,10 @@ Patch2: cmake-findruby.patch # https://bugzilla.redhat.com/show_bug.cgi?id=828467 # http://public.kitware.com/Bug/view.php?id=13378 Patch3: cmake-FindPostgreSQL.patch +# Fix issue with finding consistent python versions +# http://public.kitware.com/Bug/view.php?id=13794 +# https://bugzilla.redhat.com/show_bug.cgi?id=876118 +Patch4: cmake-FindPythonLibs.patch # Add FindLua52.cmake Patch5: cmake-2.8.11-rc4-lua-5.2.patch # Add -fno-strict-aliasing when compiling cm_sha2.c @@ -98,6 +102,7 @@ The %{name}-gui package contains the Qt based GUI for CMake. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 @@ -197,6 +202,9 @@ update-mime-database %{_datadir}/mime &> /dev/null || : %changelog +* Wed Aug 28 2013 Orion Poplawski - 2.8.12-0.2.rc1 +- Add patch to fix FindPythonLibs issues (bug #876118) + * Mon Aug 26 2013 Orion Poplawski - 2.8.12-0.1.rc1 - Update to 2.8.12-rc1 - Drop ImageMagick patch - not needed