scons-utils.eclass: Support EAPI 7
authorMichał Górny <mgorny@gentoo.org>
Thu, 3 May 2018 10:02:25 +0000 (12:02 +0200)
committerMichał Górny <mgorny@gentoo.org>
Mon, 7 May 2018 07:43:28 +0000 (09:43 +0200)
Enable EAPI 7 support.  Move dev-util/scons to BDEPEND in EAPI 7
since it needs to run on the build host.

eclass/scons-utils.eclass

index 41a86adfa14a3bab2ffd9fdc702e5363dba200a8..02c9061ba95d09cb30b1cfdc6ed1c5b2075df321 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: scons-utils.eclass
@@ -93,7 +93,7 @@
 # -- EAPI support check --
 
 case ${EAPI:-0} in
-       0|1|2|3|4|5|6) ;;
+       0|1|2|3|4|5|6|7) ;;
        *) die "EAPI ${EAPI} unsupported."
 esac
 
@@ -102,9 +102,14 @@ inherit multiprocessing
 # -- ebuild variables setup --
 
 if [[ -n ${SCONS_MIN_VERSION} ]]; then
-       DEPEND=">=dev-util/scons-${SCONS_MIN_VERSION}"
+       BDEPEND=">=dev-util/scons-${SCONS_MIN_VERSION}"
 else
-       DEPEND="dev-util/scons"
+       BDEPEND="dev-util/scons"
+fi
+
+if [[ ${EAPI:-0} == [0123456] ]]; then
+       DEPEND=${BDEPEND}
+       unset BDEPEND
 fi
 
 # -- public functions --