1 |
commit: beaae227169e69fea254a848ce1313f4491f53b1 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Nov 27 12:30:35 2016 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 30 09:42:07 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=beaae227 |
7 |
|
8 |
dev-util/cmake: Support indicating Gentoo build via CMAKE_GENTOO_BUILD |
9 |
|
10 |
Support indicating Gentoo package build using a new CMAKE_GENTOO_BUILD |
11 |
CMake variable, as an alternative to relying on CMAKE_BUILD_TYPE being |
12 |
equal to Gentoo. This makes it possible to reduce reliance on a custom |
13 |
build type in the future. |
14 |
|
15 |
dev-util/cmake/{cmake-3.7.0.ebuild => cmake-3.7.0-r1.ebuild} | 0 |
16 |
dev-util/cmake/files/cmake-2.8.10.2-FindPythonLibs.patch | 2 +- |
17 |
dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch | 4 ++-- |
18 |
dev-util/cmake/files/cmake-3.5.2-FindQt4.patch | 2 +- |
19 |
4 files changed, 4 insertions(+), 4 deletions(-) |
20 |
|
21 |
diff --git a/dev-util/cmake/cmake-3.7.0.ebuild b/dev-util/cmake/cmake-3.7.0-r1.ebuild |
22 |
similarity index 100% |
23 |
rename from dev-util/cmake/cmake-3.7.0.ebuild |
24 |
rename to dev-util/cmake/cmake-3.7.0-r1.ebuild |
25 |
|
26 |
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 |
27 |
index 2a83ff7..5f9c266 100644 |
28 |
--- a/dev-util/cmake/files/cmake-2.8.10.2-FindPythonLibs.patch |
29 |
+++ b/dev-util/cmake/files/cmake-2.8.10.2-FindPythonLibs.patch |
30 |
@@ -7,7 +7,7 @@ index bffa9fb..8fc90ee 100644 |
31 |
) |
32 |
|
33 |
+# Gentoo portage requires that you use exactly the given python version |
34 |
-+if (CMAKE_BUILD_TYPE STREQUAL Gentoo) |
35 |
++if (CMAKE_GENTOO_BUILD OR CMAKE_BUILD_TYPE STREQUAL Gentoo) |
36 |
+ execute_process(COMMAND python -c "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:2]]))" |
37 |
+ OUTPUT_VARIABLE _Gentoo_Python_VERSION) |
38 |
+ list(FIND _Python_VERSIONS "${_Gentoo_Python_VERSION}" _Gentoo_Python_INDEX) |
39 |
|
40 |
diff --git a/dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch b/dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch |
41 |
index 3abb2e4..bb3ca95 100644 |
42 |
--- a/dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch |
43 |
+++ b/dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch |
44 |
@@ -5,7 +5,7 @@ |
45 |
set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS}) |
46 |
endif() |
47 |
+ |
48 |
-+if (CMAKE_BUILD_TYPE STREQUAL Gentoo) |
49 |
++if (CMAKE_GENTOO_BUILD OR CMAKE_BUILD_TYPE STREQUAL Gentoo) |
50 |
+ set(_Python_NAMES python) |
51 |
+endif() |
52 |
+ |
53 |
@@ -17,7 +17,7 @@ |
54 |
|
55 |
# Search for newest python version if python executable isn't found |
56 |
-if(NOT PYTHON_EXECUTABLE) |
57 |
-+if(NOT PYTHON_EXECUTABLE AND NOT CMAKE_BUILD_TYPE STREQUAL Gentoo) |
58 |
++if(NOT PYTHON_EXECUTABLE AND NOT (CMAKE_GENTOO_BUILD OR CMAKE_BUILD_TYPE STREQUAL Gentoo)) |
59 |
foreach(_CURRENT_VERSION IN LISTS _Python_VERSIONS) |
60 |
set(_Python_NAMES python${_CURRENT_VERSION}) |
61 |
if(WIN32) |
62 |
|
63 |
diff --git a/dev-util/cmake/files/cmake-3.5.2-FindQt4.patch b/dev-util/cmake/files/cmake-3.5.2-FindQt4.patch |
64 |
index 845fc6e..2f2764d 100644 |
65 |
--- a/dev-util/cmake/files/cmake-3.5.2-FindQt4.patch |
66 |
+++ b/dev-util/cmake/files/cmake-3.5.2-FindQt4.patch |
67 |
@@ -23,7 +23,7 @@ Gentoo-bug: 547222 |
68 |
- PATH_SUFFIXES bin |
69 |
- DOC "The qmake executable for the Qt installation to use" |
70 |
- ) |
71 |
-+ if(CMAKE_BUILD_TYPE STREQUAL Gentoo) |
72 |
++ if(CMAKE_GENTOO_BUILD OR CMAKE_BUILD_TYPE STREQUAL Gentoo) |
73 |
+ find_program(QT_QMAKE_EXECUTABLE NAMES ${QMAKE_NAME} |
74 |
+ PATHS |
75 |
+ $ENV{EPREFIX}/usr/${CMAKE_INSTALL_LIBDIR}/qt4/bin |