Gentoo Archives: gentoo-commits

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