Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Wed, 15 Aug 2018 11:43:59
Message-Id: 1534333415.76bc856dd7f5863fa41da9b1248d76b94786b0f1.asturm@gentoo
1 commit: 76bc856dd7f5863fa41da9b1248d76b94786b0f1
2 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
3 AuthorDate: Sun May 27 08:16:41 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 15 11:43:35 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76bc856d
7
8 cmake-utils.eclass: Fix usage of has_version
9
10 has_version has no output, and its result is provided by exit status.
11
12 Fixes: a8d5b1da360ab6e7a09bceda8a34d37e2182b963
13
14 eclass/cmake-utils.eclass | 12 ++++++------
15 1 file changed, 6 insertions(+), 6 deletions(-)
16
17 diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
18 index 7c76762c495..31ee9c51072 100644
19 --- a/eclass/cmake-utils.eclass
20 +++ b/eclass/cmake-utils.eclass
21 @@ -521,14 +521,14 @@ cmake-utils_src_configure() {
22 # we need to add "<INCLUDES>"
23 local includes=
24
25 - local has_cmake_340=
26 + local has_cmake_3_4_0=false
27 case ${EAPI} in
28 5|6)
29 - has_cmake_34=$(ROOT=/ has_version \>=dev-util/cmake-3.4.0_rc1)
30 - ;;
31 + ROOT=/ has_version ">=dev-util/cmake-3.4.0_rc1" && has_cmake_3_4_0=true
32 + ;;
33 *)
34 - has_cmake_34=$(has_version -b \>=dev-util/cmake-3.4.0_rc1)
35 - ;;
36 + has_version -b ">=dev-util/cmake-3.4.0_rc1" && has_cmake_3_4_0=true
37 + ;;
38 esac
39
40
41 @@ -536,7 +536,7 @@ cmake-utils_src_configure() {
42 if $(ver_test $(ver_cut 1-3 ${PV}) -ge 3.4.0) ; then
43 includes="<INCLUDES>"
44 fi
45 - elif [[ ${has_cmake_340} ]]; then
46 + elif ${has_cmake_3_4_0}; then
47 includes="<INCLUDES>"
48 fi
49 cat > "${build_rules}" <<- _EOF_ || die