From: Michał Górny Date: Sun, 27 Nov 2016 12:30:35 +0000 (+0100) Subject: dev-util/cmake: Support indicating Gentoo build via CMAKE_GENTOO_BUILD X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=beaae227169e69fea254a848ce1313f4491f53b1;p=gentoo.git dev-util/cmake: Support indicating Gentoo build via CMAKE_GENTOO_BUILD Support indicating Gentoo package build using a new CMAKE_GENTOO_BUILD CMake variable, as an alternative to relying on CMAKE_BUILD_TYPE being equal to Gentoo. This makes it possible to reduce reliance on a custom build type in the future. --- diff --git a/dev-util/cmake/cmake-3.7.0.ebuild b/dev-util/cmake/cmake-3.7.0-r1.ebuild similarity index 100% rename from dev-util/cmake/cmake-3.7.0.ebuild rename to dev-util/cmake/cmake-3.7.0-r1.ebuild 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 index 2a83ff7abb69..5f9c26658f31 100644 --- a/dev-util/cmake/files/cmake-2.8.10.2-FindPythonLibs.patch +++ b/dev-util/cmake/files/cmake-2.8.10.2-FindPythonLibs.patch @@ -7,7 +7,7 @@ index bffa9fb..8fc90ee 100644 ) +# Gentoo portage requires that you use exactly the given python version -+if (CMAKE_BUILD_TYPE STREQUAL Gentoo) ++if (CMAKE_GENTOO_BUILD OR 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) diff --git a/dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch b/dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch index 3abb2e4065e8..bb3ca9580ad9 100644 --- a/dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch +++ b/dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch @@ -5,7 +5,7 @@ set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS}) endif() + -+if (CMAKE_BUILD_TYPE STREQUAL Gentoo) ++if (CMAKE_GENTOO_BUILD OR CMAKE_BUILD_TYPE STREQUAL Gentoo) + set(_Python_NAMES python) +endif() + @@ -17,7 +17,7 @@ # Search for newest python version if python executable isn't found -if(NOT PYTHON_EXECUTABLE) -+if(NOT PYTHON_EXECUTABLE AND NOT CMAKE_BUILD_TYPE STREQUAL Gentoo) ++if(NOT PYTHON_EXECUTABLE AND NOT (CMAKE_GENTOO_BUILD OR CMAKE_BUILD_TYPE STREQUAL Gentoo)) foreach(_CURRENT_VERSION IN LISTS _Python_VERSIONS) set(_Python_NAMES python${_CURRENT_VERSION}) if(WIN32) diff --git a/dev-util/cmake/files/cmake-3.5.2-FindQt4.patch b/dev-util/cmake/files/cmake-3.5.2-FindQt4.patch index 845fc6e75d85..2f2764d30cf6 100644 --- a/dev-util/cmake/files/cmake-3.5.2-FindQt4.patch +++ b/dev-util/cmake/files/cmake-3.5.2-FindQt4.patch @@ -23,7 +23,7 @@ Gentoo-bug: 547222 - PATH_SUFFIXES bin - DOC "The qmake executable for the Qt installation to use" - ) -+ if(CMAKE_BUILD_TYPE STREQUAL Gentoo) ++ if(CMAKE_GENTOO_BUILD OR CMAKE_BUILD_TYPE STREQUAL Gentoo) + find_program(QT_QMAKE_EXECUTABLE NAMES ${QMAKE_NAME} + PATHS + $ENV{EPREFIX}/usr/${CMAKE_INSTALL_LIBDIR}/qt4/bin