summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2015-11-21 12:00:08 +0100
committerGilles Dartiguelongue <eva@gentoo.org>2015-11-24 22:56:23 +0100
commit5ec4360921290127fde345917e0399bce8ce32df (patch)
treea41584527c1fef3c62439544192a5ca2accea802
parentgnome2.eclass: use xdg.eclass phase functions (diff)
downloadgentoo-5ec43609.tar.gz
gentoo-5ec43609.tar.bz2
gentoo-5ec43609.zip
gnome2.eclass: G2CONF usage now triggers eqawarn
According to our policy and to make tracking last offenders easier.
-rw-r--r--eclass/gnome2.eclass32
1 files changed, 20 insertions, 12 deletions
diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index 4bbe0097d92a..000b3d65d45c 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -22,7 +22,8 @@ esac
# @ECLASS-VARIABLE: G2CONF
# @DEFAULT_UNSET
# @DESCRIPTION:
-# Extra configure opts passed to econf
+# Extra configure opts passed to econf.
+# Deprecated, pass extra arguments to gnome2_src_configure.
G2CONF=${G2CONF:-""}
# @ECLASS-VARIABLE: GNOME2_LA_PUNT
@@ -93,10 +94,17 @@ gnome2_src_prepare() {
# @DESCRIPTION:
# Gnome specific configure handling
gnome2_src_configure() {
+ # Deprecated for a long time now, see Gnome team policies
+ if [[ -n ${G2CONF} ]] ; then
+ eqawarn "G2CONF set, please review documentation at https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#G2CONF_and_src_configure"
+ fi
+
+ local g2conf=()
+
# Update the GNOME configuration options
if [[ ${GCONF_DEBUG} != 'no' ]] ; then
if use debug ; then
- G2CONF="--enable-debug=yes ${G2CONF}"
+ g2conf+=( --enable-debug=yes )
fi
fi
@@ -109,54 +117,54 @@ gnome2_src_configure() {
# Preserve old behavior for older EAPI.
if grep -q "enable-gtk-doc" "${ECONF_SOURCE:-.}"/configure ; then
if has ${EAPI:-0} 4 && in_iuse doc ; then
- G2CONF="$(use_enable doc gtk-doc) ${G2CONF}"
+ g2conf+=( $(use_enable doc gtk-doc) )
else
- G2CONF="--disable-gtk-doc ${G2CONF}"
+ g2conf+=( --disable-gtk-doc )
fi
fi
# Pass --disable-maintainer-mode when needed
if grep -q "^[[:space:]]*AM_MAINTAINER_MODE(\[enable\])" \
"${ECONF_SOURCE:-.}"/configure.*; then
- G2CONF="--disable-maintainer-mode ${G2CONF}"
+ g2conf+=( --disable-maintainer-mode )
fi
# Pass --disable-scrollkeeper when possible
if grep -q "disable-scrollkeeper" "${ECONF_SOURCE:-.}"/configure; then
- G2CONF="--disable-scrollkeeper ${G2CONF}"
+ g2conf+=( --disable-scrollkeeper )
fi
# Pass --disable-silent-rules when possible (not needed for eapi5), bug #429308
if has ${EAPI:-0} 4; then
if grep -q "disable-silent-rules" "${ECONF_SOURCE:-.}"/configure; then
- G2CONF="--disable-silent-rules ${G2CONF}"
+ g2conf+=( --disable-silent-rules )
fi
fi
# Pass --disable-schemas-install when possible
if grep -q "disable-schemas-install" "${ECONF_SOURCE:-.}"/configure; then
- G2CONF="--disable-schemas-install ${G2CONF}"
+ g2conf+=( --disable-schemas-install )
fi
# Pass --disable-schemas-compile when possible
if grep -q "disable-schemas-compile" "${ECONF_SOURCE:-.}"/configure; then
- G2CONF="--disable-schemas-compile ${G2CONF}"
+ g2conf+=( --disable-schemas-compile )
fi
# Pass --enable-compile-warnings=minimum as we don't want -Werror* flags, bug #471336
if grep -q "enable-compile-warnings" "${ECONF_SOURCE:-.}"/configure; then
- G2CONF="--enable-compile-warnings=minimum ${G2CONF}"
+ g2conf+=( --enable-compile-warnings=minimum )
fi
# Pass --docdir with proper directory, bug #482646
if grep -q "^ *--docdir=" "${ECONF_SOURCE:-.}"/configure; then
- G2CONF="--docdir="${EPREFIX}"/usr/share/doc/${PF} ${G2CONF}"
+ g2conf+=( --docdir="${EPREFIX}"/usr/share/doc/${PF} )
fi
# Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659)
addwrite "$(unset HOME; echo ~)/.gnome2"
- econf ${G2CONF} "$@"
+ econf ${g2conf[@]} ${G2CONF} "$@"
}
# @FUNCTION: gnome2_src_compile