1 |
commit: 3744ebf110305eca69d78770208b9e879cf36248 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 13 00:41:14 2018 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 10 21:54:11 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3744ebf1 |
7 |
|
8 |
cmake-utils.eclass: Turn `eqawarn` into `die` for >= EAPI 7 |
9 |
|
10 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
11 |
|
12 |
eclass/cmake-utils.eclass | 25 ++++++++++++++++++++----- |
13 |
1 file changed, 20 insertions(+), 5 deletions(-) |
14 |
|
15 |
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass |
16 |
index 43397aad8c2..776de76b31d 100644 |
17 |
--- a/eclass/cmake-utils.eclass |
18 |
+++ b/eclass/cmake-utils.eclass |
19 |
@@ -125,7 +125,13 @@ esac |
20 |
|
21 |
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install |
22 |
|
23 |
-[[ ${WANT_CMAKE} ]] && eqawarn "\${WANT_CMAKE} has been removed and is a no-op now" |
24 |
+if [[ ${WANT_CMAKE} ]]; then |
25 |
+ if [[ ${EAPI} != [56] ]]; then |
26 |
+ die "\${WANT_CMAKE} has been removed and is a no-op now" |
27 |
+ else |
28 |
+ eqawarn "\${WANT_CMAKE} has been removed and is a no-op now" |
29 |
+ fi |
30 |
+fi |
31 |
[[ ${PREFIX} ]] && die "\${PREFIX} has been removed and is a no-op now" |
32 |
|
33 |
case ${CMAKE_MAKEFILE_GENERATOR} in |
34 |
@@ -208,8 +214,13 @@ _cmake_check_build_dir() { |
35 |
# Respect both the old variable and the new one, depending |
36 |
# on which one was set by the ebuild. |
37 |
if [[ ! ${BUILD_DIR} && ${CMAKE_BUILD_DIR} ]]; then |
38 |
- eqawarn "The CMAKE_BUILD_DIR variable has been renamed to BUILD_DIR." |
39 |
- eqawarn "Please migrate the ebuild to use the new one." |
40 |
+ if [[ ${EAPI} != [56] ]]; then |
41 |
+ eerror "The CMAKE_BUILD_DIR variable has been renamed to BUILD_DIR." |
42 |
+ die "The ebuild must be migrated to BUILD_DIR." |
43 |
+ else |
44 |
+ eqawarn "The CMAKE_BUILD_DIR variable has been renamed to BUILD_DIR." |
45 |
+ eqawarn "Please migrate the ebuild to use the new one." |
46 |
+ fi |
47 |
|
48 |
# In the next call, both variables will be set already |
49 |
# and we'd have to know which one takes precedence. |
50 |
@@ -224,7 +235,7 @@ _cmake_check_build_dir() { |
51 |
fi |
52 |
|
53 |
# Backwards compatibility for getting the value. |
54 |
- CMAKE_BUILD_DIR=${BUILD_DIR} |
55 |
+ [[ ${EAPI} == [56] ]] && CMAKE_BUILD_DIR=${BUILD_DIR} |
56 |
|
57 |
mkdir -p "${BUILD_DIR}" || die |
58 |
echo ">>> Working in BUILD_DIR: \"$BUILD_DIR\"" |
59 |
@@ -508,7 +519,11 @@ cmake-utils_src_configure() { |
60 |
debug-print-function ${FUNCNAME} "$@" |
61 |
|
62 |
if [[ ! ${_CMAKE_UTILS_SRC_PREPARE_HAS_RUN} ]]; then |
63 |
- eqawarn "cmake-utils_src_prepare has not been run, please open a bug on https://bugs.gentoo.org/" |
64 |
+ if [[ ${EAPI} != [56] ]]; then |
65 |
+ die "FATAL: cmake-utils_src_prepare has not been run" |
66 |
+ else |
67 |
+ eqawarn "cmake-utils_src_prepare has not been run, please open a bug on https://bugs.gentoo.org/" |
68 |
+ fi |
69 |
fi |
70 |
|
71 |
[[ ${EAPI} == 5 ]] && _cmake_cleanup_cmake |