let people make the autotool dependencies optional in their ebuilds
authorMike Frysinger <vapier@gentoo.org>
Sun, 7 Mar 2010 17:42:39 +0000 (17:42 +0000)
committerMike Frysinger <vapier@gentoo.org>
Sun, 7 Mar 2010 17:42:39 +0000 (17:42 +0000)
eclass/autotools.eclass

index 9aad9813e8e6c07cf75b6c112c424fc4a7f2611d..fafecc500b3c1374af062a816f0737e4d6546110 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.92 2010/02/08 11:04:01 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.93 2010/03/07 17:42:39 vapier Exp $
 
 # @ECLASS: autotools.eclass
 # @MAINTAINER:
@@ -46,10 +46,20 @@ if [[ -n ${WANT_AUTOCONF} ]] ; then
        esac
        export WANT_AUTOCONF
 fi
-DEPEND="${_automake_atom}
-       ${_autoconf_atom}"
-[[ ${CATEGORY}/${PN} != "sys-devel/libtool" ]] && DEPEND="${DEPEND} >=sys-devel/libtool-2.2.6b"
+
+AUTOTOOLS_DEPEND="${_automake_atom} ${_autoconf_atom}"
+[[ ${CATEGORY}/${PN} != "sys-devel/libtool" ]] && AUTOTOOLS_DEPEND="${AUTOTOOLS_DEPEND} >=sys-devel/libtool-2.2.6b"
 RDEPEND=""
+
+# @ECLASS-VARIABLE: AUTOTOOLS_AUTO_DEPEND
+# @DESCRIPTION:
+# Set to 'no' to disable automatically adding to DEPEND.  This lets
+# ebuilds former conditional depends by using ${AUTOTOOLS_DEPEND} in
+# their own DEPEND string.
+if [[ ${AUTOTOOLS_AUTO_DEPEND} != "no" ]] ; then
+       DEPEND=${AUTOTOOLS_DEPEND}
+fi
+
 unset _automake_atom _autoconf_atom
 
 # @ECLASS-VARIABLE: AM_OPTS