Gentoo Archives: gentoo-commits

From: Gilles Dartiguelongue <eva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Tue, 24 Nov 2015 21:58:50
Message-Id: 1448402183.5ec4360921290127fde345917e0399bce8ce32df.eva@gentoo
1 commit: 5ec4360921290127fde345917e0399bce8ce32df
2 Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 21 11:00:08 2015 +0000
4 Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 24 21:56:23 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ec43609
7
8 gnome2.eclass: G2CONF usage now triggers eqawarn
9
10 According to our policy and to make tracking last offenders easier.
11
12 eclass/gnome2.eclass | 32 ++++++++++++++++++++------------
13 1 file changed, 20 insertions(+), 12 deletions(-)
14
15 diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
16 index 4bbe009..000b3d6 100644
17 --- a/eclass/gnome2.eclass
18 +++ b/eclass/gnome2.eclass
19 @@ -22,7 +22,8 @@ esac
20 # @ECLASS-VARIABLE: G2CONF
21 # @DEFAULT_UNSET
22 # @DESCRIPTION:
23 -# Extra configure opts passed to econf
24 +# Extra configure opts passed to econf.
25 +# Deprecated, pass extra arguments to gnome2_src_configure.
26 G2CONF=${G2CONF:-""}
27
28 # @ECLASS-VARIABLE: GNOME2_LA_PUNT
29 @@ -93,10 +94,17 @@ gnome2_src_prepare() {
30 # @DESCRIPTION:
31 # Gnome specific configure handling
32 gnome2_src_configure() {
33 + # Deprecated for a long time now, see Gnome team policies
34 + if [[ -n ${G2CONF} ]] ; then
35 + eqawarn "G2CONF set, please review documentation at https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#G2CONF_and_src_configure"
36 + fi
37 +
38 + local g2conf=()
39 +
40 # Update the GNOME configuration options
41 if [[ ${GCONF_DEBUG} != 'no' ]] ; then
42 if use debug ; then
43 - G2CONF="--enable-debug=yes ${G2CONF}"
44 + g2conf+=( --enable-debug=yes )
45 fi
46 fi
47
48 @@ -109,54 +117,54 @@ gnome2_src_configure() {
49 # Preserve old behavior for older EAPI.
50 if grep -q "enable-gtk-doc" "${ECONF_SOURCE:-.}"/configure ; then
51 if has ${EAPI:-0} 4 && in_iuse doc ; then
52 - G2CONF="$(use_enable doc gtk-doc) ${G2CONF}"
53 + g2conf+=( $(use_enable doc gtk-doc) )
54 else
55 - G2CONF="--disable-gtk-doc ${G2CONF}"
56 + g2conf+=( --disable-gtk-doc )
57 fi
58 fi
59
60 # Pass --disable-maintainer-mode when needed
61 if grep -q "^[[:space:]]*AM_MAINTAINER_MODE(\[enable\])" \
62 "${ECONF_SOURCE:-.}"/configure.*; then
63 - G2CONF="--disable-maintainer-mode ${G2CONF}"
64 + g2conf+=( --disable-maintainer-mode )
65 fi
66
67 # Pass --disable-scrollkeeper when possible
68 if grep -q "disable-scrollkeeper" "${ECONF_SOURCE:-.}"/configure; then
69 - G2CONF="--disable-scrollkeeper ${G2CONF}"
70 + g2conf+=( --disable-scrollkeeper )
71 fi
72
73 # Pass --disable-silent-rules when possible (not needed for eapi5), bug #429308
74 if has ${EAPI:-0} 4; then
75 if grep -q "disable-silent-rules" "${ECONF_SOURCE:-.}"/configure; then
76 - G2CONF="--disable-silent-rules ${G2CONF}"
77 + g2conf+=( --disable-silent-rules )
78 fi
79 fi
80
81 # Pass --disable-schemas-install when possible
82 if grep -q "disable-schemas-install" "${ECONF_SOURCE:-.}"/configure; then
83 - G2CONF="--disable-schemas-install ${G2CONF}"
84 + g2conf+=( --disable-schemas-install )
85 fi
86
87 # Pass --disable-schemas-compile when possible
88 if grep -q "disable-schemas-compile" "${ECONF_SOURCE:-.}"/configure; then
89 - G2CONF="--disable-schemas-compile ${G2CONF}"
90 + g2conf+=( --disable-schemas-compile )
91 fi
92
93 # Pass --enable-compile-warnings=minimum as we don't want -Werror* flags, bug #471336
94 if grep -q "enable-compile-warnings" "${ECONF_SOURCE:-.}"/configure; then
95 - G2CONF="--enable-compile-warnings=minimum ${G2CONF}"
96 + g2conf+=( --enable-compile-warnings=minimum )
97 fi
98
99 # Pass --docdir with proper directory, bug #482646
100 if grep -q "^ *--docdir=" "${ECONF_SOURCE:-.}"/configure; then
101 - G2CONF="--docdir="${EPREFIX}"/usr/share/doc/${PF} ${G2CONF}"
102 + g2conf+=( --docdir="${EPREFIX}"/usr/share/doc/${PF} )
103 fi
104
105 # Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659)
106 addwrite "$(unset HOME; echo ~)/.gnome2"
107
108 - econf ${G2CONF} "$@"
109 + econf ${g2conf[@]} ${G2CONF} "$@"
110 }
111
112 # @FUNCTION: gnome2_src_compile