commit:     d741b4ef5054c8800b97748ef8caa11ad910d784
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun May 21 08:09:50 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun May 21 09:25:07 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d741b4ef

cmake-utils.eclass: Remove WANT_CMAKE and warn users

Closes: https://github.com/gentoo/gentoo/pull/4528

 eclass/cmake-utils.eclass | 32 ++++----------------------------
 1 file changed, 4 insertions(+), 28 deletions(-)

diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index 2b3c8d933d1..6ae324093be 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -94,16 +94,6 @@ _CMAKE_UTILS_ECLASS=1
 # Use -DCMAKE_INSTALL_PREFIX=... CMake variable instead.
 : ${PREFIX:=/usr}
 
-# @ECLASS-VARIABLE: WANT_CMAKE
-# @DESCRIPTION:
-# Specify if cmake-utils eclass should depend on cmake optionally or not.
-# This is useful when only part of application is using cmake build system.
-# Valid values are: always [default], optional (where the value is the useflag
-# used for optionality)
-#
-# This is banned in EAPI 6 and later.
-: ${WANT_CMAKE:=always}
-
 # @ECLASS-VARIABLE: CMAKE_EXTRA_CACHE_FILE
 # @DESCRIPTION:
 # Specifies an extra cache file to pass to cmake. This is the analog of 
EXTRA_ECONF
@@ -121,23 +111,14 @@ inherit toolchain-funcs multilib ninja-utils flag-o-matic 
eutils \
 
 EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install
 
-CMAKEDEPEND=""
-case ${WANT_CMAKE} in
-       always)
-               ;;
-       *)
-               [[ ${EAPI} == [2345] ]] || die "WANT_CMAKE is banned in EAPI 6 
and later"
-               IUSE+=" ${WANT_CMAKE}"
-               CMAKEDEPEND+="${WANT_CMAKE}? ( "
-               ;;
-esac
+[[ ${WANT_CMAKE} ]] && eqawarn "\${WANT_CMAKE} has been removed and is a no-op 
now"
 
 case ${CMAKE_MAKEFILE_GENERATOR} in
        emake)
-               CMAKEDEPEND+=" sys-devel/make"
+               DEPEND="sys-devel/make"
                ;;
        ninja)
-               CMAKEDEPEND+=" dev-util/ninja"
+               DEPEND="dev-util/ninja"
                ;;
        *)
                eerror "Unknown value for \${CMAKE_MAKEFILE_GENERATOR}"
@@ -146,14 +127,9 @@ case ${CMAKE_MAKEFILE_GENERATOR} in
 esac
 
 if [[ ${PN} != cmake ]]; then
-       CMAKEDEPEND+=" >=dev-util/cmake-${CMAKE_MIN_VERSION}"
+       DEPEND+=" >=dev-util/cmake-${CMAKE_MIN_VERSION}"
 fi
 
-[[ ${WANT_CMAKE} = always ]] || CMAKEDEPEND+=" )"
-
-DEPEND="${CMAKEDEPEND}"
-unset CMAKEDEPEND
-
 # Internal functions used by cmake-utils_use_*
 _cmake_use_me_now() {
        debug-print-function ${FUNCNAME} "$@"

Reply via email to