sometimes i have optional patches (ignoring the "patches should always be applied") where autotools should be run. always inheriting autotools is currently annoying because it always adds the related dependencies. USE based inherits are obviously out. so unless there's some burgeoning standard i'm not aware of, below is what i have in mind. packages set AUTOTOOLS_AUTO_DEPEND to "no" before inheriting autotools.eclass and that allows them to put ${AUTOTOOLS_DEPEND} behind a USE flag in their own DEPEND string. --- autotools.eclass 8 Feb 2010 11:04:01 -0000 1.92 +++ autotools.eclass 5 Mar 2010 18:09:54 -0000 @@ -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_AUTO_DEPEND} +fi + unset _automake_atom _autoconf_atom # @ECLASS-VARIABLE: AM_OPTS -mike