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 autotools-utils] Deprecate implicit IUSE=debug.
Date: Wed, 14 Sep 2011 15:22:51
Message-Id: 1316013823-10449-1-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-dev] Re: Fixing eclass code relying on ${IUSE} greps? by "Diego Elio Pettenò"
1 ---
2 eclass/autotools-utils.eclass | 13 +++++++++----
3 1 files changed, 9 insertions(+), 4 deletions(-)
4
5 diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass
6 index 495244b..8731d6b 100644
7 --- a/eclass/autotools-utils.eclass
8 +++ b/eclass/autotools-utils.eclass
9 @@ -88,7 +88,7 @@ case ${EAPI:-0} in
10 *) die "EAPI=${EAPI} is not supported" ;;
11 esac
12
13 -inherit autotools base
14 +inherit autotools base eutils
15
16 EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
17
18 @@ -220,8 +220,6 @@ autotools-utils_src_prepare() {
19 # in myeconfargs are passed here to econf. Additionally following USE
20 # flags are known:
21 #
22 -# IUSE="debug" passes --disable-debug/--enable-debug to econf respectively.
23 -#
24 # IUSE="static-libs" passes --enable-shared and either --disable-static/--enable-static
25 # to econf respectively.
26 autotools-utils_src_configure() {
27 @@ -232,7 +230,14 @@ autotools-utils_src_configure() {
28
29 # Handle debug found in IUSE
30 if has debug ${IUSE//+}; then
31 - econfargs+=($(use_enable debug))
32 + local debugarg=$(use_enable debug)
33 + if ! has "${debugarg}" "${myeconfargs[@]}"; then
34 + eqawarn 'Implicit $(use_enable debug) for IUSE="debug" is deprecated.'
35 + eqawarn 'Please add the necessary arg to myeconfargs if requested.'
36 + eqawarn 'The autotools-utils eclass will stop appending it on Oct 15th.'
37 +
38 + econfargs+=("${debugarg}")
39 + fi
40 fi
41
42 # Handle static-libs found in IUSE, disable them by default
43 --
44 1.7.6.1

Replies

Subject Author
[gentoo-dev] Re: [PATCH autotools-utils] Deprecate implicit IUSE=debug. "Diego Elio Pettenò" <flameeyes@g.o>