Skip to content

Commit

Permalink
cmake-utils.eclass: Fix usage of has_version
Browse files Browse the repository at this point in the history
has_version has no output, and its result is provided by exit status.

Fixes: a8d5b1da360ab6e7a09bceda8a34d37e2182b963
  • Loading branch information
Arfrever Frehtes Taifersar Arahesis authored and a17r committed Aug 15, 2018
1 parent 268f10e commit 76bc856
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions eclass/cmake-utils.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -521,22 +521,22 @@ cmake-utils_src_configure() {
# we need to add "<INCLUDES>"
local includes=

local has_cmake_340=
local has_cmake_3_4_0=false
case ${EAPI} in
5|6)
has_cmake_34=$(ROOT=/ has_version \>=dev-util/cmake-3.4.0_rc1)
;;
ROOT=/ has_version ">=dev-util/cmake-3.4.0_rc1" && has_cmake_3_4_0=true
;;
*)
has_cmake_34=$(has_version -b \>=dev-util/cmake-3.4.0_rc1)
;;
has_version -b ">=dev-util/cmake-3.4.0_rc1" && has_cmake_3_4_0=true
;;
esac


if [[ ${PN} == cmake ]] ; then
if $(ver_test $(ver_cut 1-3 ${PV}) -ge 3.4.0) ; then
includes="<INCLUDES>"
fi
elif [[ ${has_cmake_340} ]]; then
elif ${has_cmake_3_4_0}; then
includes="<INCLUDES>"
fi
cat > "${build_rules}" <<- _EOF_ || die
Expand Down

0 comments on commit 76bc856

Please sign in to comment.