Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 7/8] scons-utils.eclass: Support EAPI 7
Date: Thu, 03 May 2018 10:21:28
Message-Id: 20180503101811.28837-8-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 0/8] EAPI 7 in my eclasses, part one by "Michał Górny"
1 Enable EAPI 7 support. Move dev-util/scons to BDEPEND in EAPI 7
2 since it needs to run on the build host.
3 ---
4 eclass/scons-utils.eclass | 13 +++++++++----
5 1 file changed, 9 insertions(+), 4 deletions(-)
6
7 diff --git a/eclass/scons-utils.eclass b/eclass/scons-utils.eclass
8 index 41a86adfa14a..02c9061ba95d 100644
9 --- a/eclass/scons-utils.eclass
10 +++ b/eclass/scons-utils.eclass
11 @@ -1,4 +1,4 @@
12 -# Copyright 1999-2015 Gentoo Foundation
13 +# Copyright 1999-2018 Gentoo Foundation
14 # Distributed under the terms of the GNU General Public License v2
15
16 # @ECLASS: scons-utils.eclass
17 @@ -93,7 +93,7 @@
18 # -- EAPI support check --
19
20 case ${EAPI:-0} in
21 - 0|1|2|3|4|5|6) ;;
22 + 0|1|2|3|4|5|6|7) ;;
23 *) die "EAPI ${EAPI} unsupported."
24 esac
25
26 @@ -102,9 +102,14 @@ inherit multiprocessing
27 # -- ebuild variables setup --
28
29 if [[ -n ${SCONS_MIN_VERSION} ]]; then
30 - DEPEND=">=dev-util/scons-${SCONS_MIN_VERSION}"
31 + BDEPEND=">=dev-util/scons-${SCONS_MIN_VERSION}"
32 else
33 - DEPEND="dev-util/scons"
34 + BDEPEND="dev-util/scons"
35 +fi
36 +
37 +if [[ ${EAPI:-0} == [0123456] ]]; then
38 + DEPEND=${BDEPEND}
39 + unset BDEPEND
40 fi
41
42 # -- public functions --
43 --
44 2.17.0