public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [rfc] making autotools.eclass depends flexible
@ 2010-03-05 18:59 Mike Frysinger
  2010-03-06  7:11 ` Petteri Räty
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Frysinger @ 2010-03-05 18:59 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]

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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-03-08  5:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-05 18:59 [gentoo-dev] [rfc] making autotools.eclass depends flexible Mike Frysinger
2010-03-06  7:11 ` Petteri Räty
2010-03-06 18:28   ` [gentoo-dev] " Jonathan Callen
2010-03-06 18:45     ` Petteri Räty
2010-03-07 17:42   ` [gentoo-dev] " Mike Frysinger
2010-03-07 18:31     ` Petteri Räty
2010-03-07 18:36       ` Mike Frysinger
2010-03-07 19:08         ` Petteri Räty
2010-03-07 21:44           ` Mike Frysinger
2010-03-08  5:37             ` Petteri Räty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox