public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] [rfc] making autotools.eclass depends flexible
Date: Fri, 5 Mar 2010 13:59:58 -0500	[thread overview]
Message-ID: <201003051359.58724.vapier@gentoo.org> (raw)

[-- 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 --]

             reply	other threads:[~2010-03-05 19:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-05 18:59 Mike Frysinger [this message]
2010-03-06  7:11 ` [gentoo-dev] [rfc] making autotools.eclass depends flexible 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201003051359.58724.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox