diff options
| author | Michael Palimaka <kensington@gentoo.org> | 2013-01-11 01:29:27 +1100 |
|---|---|---|
| committer | Michael Palimaka <kensington@gentoo.org> | 2013-01-11 01:29:27 +1100 |
| commit | 9adb3b0f90aa914c43e07a4216b77d175627bfb5 (patch) | |
| tree | f0a9dc77c117cb75e595d34585906458d70aa5cf /dev-util/cmake/files/cmake-2.8.10.2-FindPythonLibs.patch | |
| parent | 49df345c5a5bc319ed67bcd5444f709fe7d9a034 (diff) | |
| download | kde-9adb3b0f90aa914c43e07a4216b77d175627bfb5.tar.gz kde-9adb3b0f90aa914c43e07a4216b77d175627bfb5.tar.bz2 kde-9adb3b0f90aa914c43e07a4216b77d175627bfb5.zip | |
[dev-util/cmake] Add improved Python patch for testing wrt bug #405181.
Package-Manager: portage-2.1.11.38
RepoMan-Options: --force
Diffstat (limited to 'dev-util/cmake/files/cmake-2.8.10.2-FindPythonLibs.patch')
| -rw-r--r-- | dev-util/cmake/files/cmake-2.8.10.2-FindPythonLibs.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/dev-util/cmake/files/cmake-2.8.10.2-FindPythonLibs.patch b/dev-util/cmake/files/cmake-2.8.10.2-FindPythonLibs.patch new file mode 100644 index 00000000000..53b395c35b2 --- /dev/null +++ b/dev-util/cmake/files/cmake-2.8.10.2-FindPythonLibs.patch @@ -0,0 +1,24 @@ +diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
+index bffa9fb..8fc90ee 100644
+--- a/Modules/FindPythonLibs.cmake
++++ b/Modules/FindPythonLibs.cmake
+@@ -74,6 +74,19 @@ set(_Python_VERSIONS
+ ${_PYTHON_FIND_OTHER_VERSIONS}
+ )
+
++# Gentoo portage requries that you use exactly the given python version
++if (CMAKE_BUILD_TYPE STREQUAL Gentoo)
++ execute_process(COMMAND python -c "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:2]]))"
++ OUTPUT_VARIABLE _Gentoo_Python_VERSION)
++ list(FIND _Python_VERSIONS "${_Gentoo_Python_VERSION}" _Gentoo_Python_INDEX)
++ if (_Gentoo_Python_INDEX EQUAL -1)
++ # the current Gentoo python version is not compatible with what is requested
++ set(_Python_VERSIONS)
++ else ()
++ set(_Python_VERSIONS "${_Gentoo_Python_VERSION}")
++ endif ()
++endif()
++
+ unset(_PYTHON_FIND_OTHER_VERSIONS)
+ unset(_PYTHON1_VERSIONS)
+ unset(_PYTHON2_VERSIONS)
|
