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ò"
---
 eclass/autotools-utils.eclass |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass
index 495244b..8731d6b 100644
--- a/eclass/autotools-utils.eclass
+++ b/eclass/autotools-utils.eclass
@@ -88,7 +88,7 @@ case ${EAPI:-0} in
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac
 
-inherit autotools base
+inherit autotools base eutils
 
 EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
 
@@ -220,8 +220,6 @@ autotools-utils_src_prepare() {
 # in myeconfargs are passed here to econf. Additionally following USE
 # flags are known:
 #
-# IUSE="debug" passes --disable-debug/--enable-debug to econf respectively.
-#
 # IUSE="static-libs" passes --enable-shared and either --disable-static/--enable-static
 # to econf respectively.
 autotools-utils_src_configure() {
@@ -232,7 +230,14 @@ autotools-utils_src_configure() {
 
 	# Handle debug found in IUSE
 	if has debug ${IUSE//+}; then
-		econfargs+=($(use_enable debug))
+		local debugarg=$(use_enable debug)
+		if ! has "${debugarg}" "${myeconfargs[@]}"; then
+			eqawarn 'Implicit $(use_enable debug) for IUSE="debug" is deprecated.'
+			eqawarn 'Please add the necessary arg to myeconfargs if requested.'
+			eqawarn 'The autotools-utils eclass will stop appending it on Oct 15th.'
+
+			econfargs+=("${debugarg}")
+		fi
 	fi
 
 	# Handle static-libs found in IUSE, disable them by default
-- 
1.7.6.1

Replies

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