commit: beaae227169e69fea254a848ce1313f4491f53b1 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Sun Nov 27 12:30:35 2016 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Wed Nov 30 09:42:07 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=beaae227
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. dev-util/cmake/{cmake-3.7.0.ebuild => cmake-3.7.0-r1.ebuild} | 0 dev-util/cmake/files/cmake-2.8.10.2-FindPythonLibs.patch | 2 +- dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch | 4 ++-- dev-util/cmake/files/cmake-3.5.2-FindQt4.patch | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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 2a83ff7..5f9c266 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 3abb2e4..bb3ca95 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 845fc6e..2f2764d 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