Gentoo Archives: gentoo-dev

From: Brian Evans <grknight@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [PATCH 2/2] eclass: autotools - Mark compatible EAPIs and introduce BDEPEND
Date: Fri, 07 Sep 2018 13:48:46
Message-Id: 20180907134701.6812-3-grknight@gentoo.org
In Reply to: [gentoo-dev] [PATCH 0/2] Update libtool and autotools with EAPI7 dependencies by Brian Evans
1 The autotools commands are run on the build host.
2 As such, their packages needs to be in BDEPEND for EAPI 7.
3
4 Also taking this opportunity to list compatible EAPIs to consider
5 future adjustments.
6
7 Signed-off-by: Brian Evans <grknight@g.o>
8 ---
9 eclass/autotools.eclass | 11 ++++++++++-
10 1 file changed, 10 insertions(+), 1 deletion(-)
11
12 diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
13 index 2bc70f7b3c0..9143aa454d0 100644
14 --- a/eclass/autotools.eclass
15 +++ b/eclass/autotools.eclass
16 @@ -4,6 +4,7 @@
17 # @ECLASS: autotools.eclass
18 # @MAINTAINER:
19 # base-system@g.o
20 +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
21 # @BLURB: Regenerates auto* build scripts
22 # @DESCRIPTION:
23 # This eclass is for safely handling autotooled software packages that need to
24 @@ -25,6 +26,11 @@ fi
25 if [[ -z ${_AUTOTOOLS_ECLASS} ]]; then
26 _AUTOTOOLS_ECLASS=1
27
28 +case ${EAPI:-0} in
29 + 0|1|2|3|4|5|6|7) ;;
30 + *) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
31 +esac
32 +
33 inherit libtool
34
35 # @ECLASS-VARIABLE: WANT_AUTOCONF
36 @@ -118,7 +124,10 @@ RDEPEND=""
37 # their own DEPEND string.
38 : ${AUTOTOOLS_AUTO_DEPEND:=yes}
39 if [[ ${AUTOTOOLS_AUTO_DEPEND} != "no" ]] ; then
40 - DEPEND=${AUTOTOOLS_DEPEND}
41 + case ${EAPI:-0} in
42 + 0|1|2|3|4|5|6) DEPEND=${AUTOTOOLS_DEPEND} ;;
43 + 7) BDEPEND=${AUTOTOOLS_DEPEND} ;;
44 + esac
45 fi
46 __AUTOTOOLS_AUTO_DEPEND=${AUTOTOOLS_AUTO_DEPEND} # See top of eclass
47
48 --
49 2.18.0