Add patch to fix FindPythonLibs issues (bug #876118)

This commit is contained in:
Orion Poplawski 2013-08-28 11:00:53 -06:00
parent 314d5f5b5d
commit f5ec53abcc
2 changed files with 38 additions and 1 deletions

View File

@ -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)

View File

@ -13,7 +13,7 @@
Name: cmake Name: cmake
Version: 2.8.12 Version: 2.8.12
Release: 0.1.rc1%{?dist} Release: 0.2.rc1%{?dist}
Summary: Cross-platform make system Summary: Cross-platform make system
Group: Development/Tools Group: Development/Tools
@ -38,6 +38,10 @@ Patch2: cmake-findruby.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=828467 # https://bugzilla.redhat.com/show_bug.cgi?id=828467
# http://public.kitware.com/Bug/view.php?id=13378 # http://public.kitware.com/Bug/view.php?id=13378
Patch3: cmake-FindPostgreSQL.patch 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 # Add FindLua52.cmake
Patch5: cmake-2.8.11-rc4-lua-5.2.patch Patch5: cmake-2.8.11-rc4-lua-5.2.patch
# Add -fno-strict-aliasing when compiling cm_sha2.c # 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 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
%patch4 -p1
%patch5 -p1 %patch5 -p1
%patch6 -p1 %patch6 -p1
%patch7 -p1 %patch7 -p1
@ -197,6 +202,9 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%changelog %changelog
* Wed Aug 28 2013 Orion Poplawski <orion@cora.nwra.com> - 2.8.12-0.2.rc1
- Add patch to fix FindPythonLibs issues (bug #876118)
* Mon Aug 26 2013 Orion Poplawski <orion@cora.nwra.com> - 2.8.12-0.1.rc1 * Mon Aug 26 2013 Orion Poplawski <orion@cora.nwra.com> - 2.8.12-0.1.rc1
- Update to 2.8.12-rc1 - Update to 2.8.12-rc1
- Drop ImageMagick patch - not needed - Drop ImageMagick patch - not needed