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 automagic $(use_enable static-libs static).
Date: Sun, 18 Sep 2011 21:18:38
Message-Id: 1316380797-7076-1-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-dev] Please don't use IUSE=static-libs unless really necessary by "Michał Górny"
1 ---
2 eclass/autotools-utils.eclass | 24 ++++++++++++++++--------
3 1 files changed, 16 insertions(+), 8 deletions(-)
4
5 diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass
6 index 76ad6fc..489efd9 100644
7 --- a/eclass/autotools-utils.eclass
8 +++ b/eclass/autotools-utils.eclass
9 @@ -28,7 +28,7 @@
10 # LICENSE="LGPL-2.1"
11 # KEYWORDS=""
12 # SLOT="0"
13 -# IUSE="debug doc examples qt4 static-libs tiff"
14 +# IUSE="debug doc examples qt4 tiff"
15 #
16 # CDEPEND="
17 # media-libs/libpng:0
18 @@ -220,9 +220,6 @@ autotools-utils_src_prepare() {
19 # directory and runs econf there. Configuration parameters defined
20 # in myeconfargs are passed here to econf. Additionally following USE
21 # flags are known:
22 -#
23 -# IUSE="static-libs" passes --enable-shared and either --disable-static/--enable-static
24 -# to econf respectively.
25 autotools-utils_src_configure() {
26 debug-print-function ${FUNCNAME} "$@"
27
28 @@ -244,10 +241,21 @@ autotools-utils_src_configure() {
29
30 # Handle static-libs found in IUSE, disable them by default
31 if has static-libs ${IUSE//+}; then
32 - econfargs+=(
33 - --enable-shared
34 - $(use_enable static-libs static)
35 - )
36 + local staticarg=$(use_enable static-libs static)
37 + if ! has "${staticarg}" "${myeconfargs[@]}"; then
38 + eqawarn 'Implicit $(use_enable static-libs static) for IUSE="static-libs"'
39 + eqawarn 'is no longer supported. Please add the necessary args to myeconfargs'
40 + eqawarn 'if requested or simply drop IUSE=static-libs if unnecessary.'
41 + eqawarn
42 + eqawarn 'For details, please see:'
43 + eqawarn 'http://archives.gentoo.org/gentoo-dev/msg_f67ae0e7733869ef7cc35dd8542871d4.xml'
44 + eqawarn 'The autotools-utils eclass will stop supporting this on Nov 1st.'
45 +
46 + econfargs+=(
47 + --enable-shared
48 + $(use_enable static-libs static)
49 + )
50 + fi
51 fi
52
53 # Append user args
54 --
55 1.7.6.1