* [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
* Re: [gentoo-dev] [rfc] making autotools.eclass depends flexible
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-07 17:42 ` [gentoo-dev] " Mike Frysinger
0 siblings, 2 replies; 10+ messages in thread
From: Petteri Räty @ 2010-03-06 7:11 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 799 bytes --]
On 03/05/2010 08:59 PM, Mike Frysinger wrote:
> 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.
>
What we use in Java is JAVA_PKG_OPT_USE to declare what use flag the
DEPENDs should be under. This approach doesn't allow the ebuild
maintainer to forget adding the depends.
Regards,
Petteri
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 900 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-dev] Re: [rfc] making autotools.eclass depends flexible
2010-03-06 7:11 ` Petteri Räty
@ 2010-03-06 18:28 ` Jonathan Callen
2010-03-06 18:45 ` Petteri Räty
2010-03-07 17:42 ` [gentoo-dev] " Mike Frysinger
1 sibling, 1 reply; 10+ messages in thread
From: Jonathan Callen @ 2010-03-06 18:28 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 497 bytes --]
On 03/06/2010 02:11 AM, Petteri Räty wrote:
> What we use in Java is JAVA_PKG_OPT_USE to declare what use flag the
> DEPENDs should be under. This approach doesn't allow the ebuild
> maintainer to forget adding the depends.
That approach also disallows (or makes unduly difficult) making the
dependency such that "I need autotools on USE=kernel_SunOS or
USE=kernel_freemint, but nowhere else" or "I need autotools when USE=foo
and USE=bar, but not otherwise".
--
Jonathan Callen
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] Re: [rfc] making autotools.eclass depends flexible
2010-03-06 18:28 ` [gentoo-dev] " Jonathan Callen
@ 2010-03-06 18:45 ` Petteri Räty
0 siblings, 0 replies; 10+ messages in thread
From: Petteri Räty @ 2010-03-06 18:45 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 775 bytes --]
On 03/06/2010 08:28 PM, Jonathan Callen wrote:
> On 03/06/2010 02:11 AM, Petteri Räty wrote:
>> What we use in Java is JAVA_PKG_OPT_USE to declare what use flag the
>> DEPENDs should be under. This approach doesn't allow the ebuild
>> maintainer to forget adding the depends.
>
> That approach also disallows (or makes unduly difficult) making the
> dependency such that "I need autotools on USE=kernel_SunOS or
> USE=kernel_freemint, but nowhere else" or "I need autotools when USE=foo
> and USE=bar, but not otherwise".
>
You can provide both approaches if there ever is a need for things you
said but in my opinion just declaring the use flag should be the
preferred approach as it results in less code in the individual ebuilds.
Regards,
Petteri
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 900 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] [rfc] making autotools.eclass depends flexible
2010-03-06 7:11 ` Petteri Räty
2010-03-06 18:28 ` [gentoo-dev] " Jonathan Callen
@ 2010-03-07 17:42 ` Mike Frysinger
2010-03-07 18:31 ` Petteri Räty
1 sibling, 1 reply; 10+ messages in thread
From: Mike Frysinger @ 2010-03-07 17:42 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: Text/Plain, Size: 976 bytes --]
On Saturday 06 March 2010 02:11:15 Petteri Räty wrote:
> On 03/05/2010 08:59 PM, Mike Frysinger wrote:
> > 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.
>
> What we use in Java is JAVA_PKG_OPT_USE to declare what use flag the
> DEPENDs should be under. This approach doesn't allow the ebuild
> maintainer to forget adding the depends.
i'm more inclined towards Jonathan's opinion, so ive kept the proposed
behavior (plus a fix from Torsten).
-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
* Re: [gentoo-dev] [rfc] making autotools.eclass depends flexible
2010-03-07 17:42 ` [gentoo-dev] " Mike Frysinger
@ 2010-03-07 18:31 ` Petteri Räty
2010-03-07 18:36 ` Mike Frysinger
0 siblings, 1 reply; 10+ messages in thread
From: Petteri Räty @ 2010-03-07 18:31 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1104 bytes --]
On 03/07/2010 07:42 PM, Mike Frysinger wrote:
> On Saturday 06 March 2010 02:11:15 Petteri Räty wrote:
>> On 03/05/2010 08:59 PM, Mike Frysinger wrote:
>>> 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.
>>
>> What we use in Java is JAVA_PKG_OPT_USE to declare what use flag the
>> DEPENDs should be under. This approach doesn't allow the ebuild
>> maintainer to forget adding the depends.
>
> i'm more inclined towards Jonathan's opinion, so ive kept the proposed
> behavior (plus a fix from Torsten).
> -mike
And what about my latest response to him?
Regards,
Petteri
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 900 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] [rfc] making autotools.eclass depends flexible
2010-03-07 18:31 ` Petteri Räty
@ 2010-03-07 18:36 ` Mike Frysinger
2010-03-07 19:08 ` Petteri Räty
0 siblings, 1 reply; 10+ messages in thread
From: Mike Frysinger @ 2010-03-07 18:36 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: Text/Plain, Size: 1258 bytes --]
On Sunday 07 March 2010 13:31:56 Petteri Räty wrote:
> On 03/07/2010 07:42 PM, Mike Frysinger wrote:
> > On Saturday 06 March 2010 02:11:15 Petteri Räty wrote:
> >> On 03/05/2010 08:59 PM, Mike Frysinger wrote:
> >>> 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.
> >>
> >> What we use in Java is JAVA_PKG_OPT_USE to declare what use flag the
> >> DEPENDs should be under. This approach doesn't allow the ebuild
> >> maintainer to forget adding the depends.
> >
> > i'm more inclined towards Jonathan's opinion, so ive kept the proposed
> > behavior (plus a fix from Torsten).
>
> And what about my latest response to him?
considering your proposal saves ${FOO} in DEPEND, it hasnt changed my opinion
-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
* Re: [gentoo-dev] [rfc] making autotools.eclass depends flexible
2010-03-07 18:36 ` Mike Frysinger
@ 2010-03-07 19:08 ` Petteri Räty
2010-03-07 21:44 ` Mike Frysinger
0 siblings, 1 reply; 10+ messages in thread
From: Petteri Räty @ 2010-03-07 19:08 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1468 bytes --]
On 03/07/2010 08:36 PM, Mike Frysinger wrote:
> On Sunday 07 March 2010 13:31:56 Petteri Räty wrote:
>> On 03/07/2010 07:42 PM, Mike Frysinger wrote:
>>> On Saturday 06 March 2010 02:11:15 Petteri Räty wrote:
>>>> On 03/05/2010 08:59 PM, Mike Frysinger wrote:
>>>>> 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.
>>>>
>>>> What we use in Java is JAVA_PKG_OPT_USE to declare what use flag the
>>>> DEPENDs should be under. This approach doesn't allow the ebuild
>>>> maintainer to forget adding the depends.
>>>
>>> i'm more inclined towards Jonathan's opinion, so ive kept the proposed
>>> behavior (plus a fix from Torsten).
>>
>> And what about my latest response to him?
>
> considering your proposal saves ${FOO} in DEPEND, it hasnt changed my opinion
> -mike
Why would it be better to require ebuild writers to have do it
themselves instead of the eclass automatically taking care of it?
Regards,
Petteri
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 900 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] [rfc] making autotools.eclass depends flexible
2010-03-07 19:08 ` Petteri Räty
@ 2010-03-07 21:44 ` Mike Frysinger
2010-03-08 5:37 ` Petteri Räty
0 siblings, 1 reply; 10+ messages in thread
From: Mike Frysinger @ 2010-03-07 21:44 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: Text/Plain, Size: 1664 bytes --]
On Sunday 07 March 2010 14:08:29 Petteri Räty wrote:
> On 03/07/2010 08:36 PM, Mike Frysinger wrote:
> > On Sunday 07 March 2010 13:31:56 Petteri Räty wrote:
> >> On 03/07/2010 07:42 PM, Mike Frysinger wrote:
> >>> On Saturday 06 March 2010 02:11:15 Petteri Räty wrote:
> >>>> On 03/05/2010 08:59 PM, Mike Frysinger wrote:
> >>>>> 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.
> >>>>
> >>>> What we use in Java is JAVA_PKG_OPT_USE to declare what use flag the
> >>>> DEPENDs should be under. This approach doesn't allow the ebuild
> >>>> maintainer to forget adding the depends.
> >>>
> >>> i'm more inclined towards Jonathan's opinion, so ive kept the proposed
> >>> behavior (plus a fix from Torsten).
> >>
> >> And what about my latest response to him?
> >
> > considering your proposal saves ${FOO} in DEPEND, it hasnt changed my
> > opinion
>
> Why would it be better to require ebuild writers to have do it
> themselves instead of the eclass automatically taking care of it?
as Jonathan mentioned, it gives explicit control via multiple USE flags which
your way does not
-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
* Re: [gentoo-dev] [rfc] making autotools.eclass depends flexible
2010-03-07 21:44 ` Mike Frysinger
@ 2010-03-08 5:37 ` Petteri Räty
0 siblings, 0 replies; 10+ messages in thread
From: Petteri Räty @ 2010-03-08 5:37 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1785 bytes --]
On 03/07/2010 11:44 PM, Mike Frysinger wrote:
> On Sunday 07 March 2010 14:08:29 Petteri Räty wrote:
>> On 03/07/2010 08:36 PM, Mike Frysinger wrote:
>>> On Sunday 07 March 2010 13:31:56 Petteri Räty wrote:
>>>> On 03/07/2010 07:42 PM, Mike Frysinger wrote:
>>>>> On Saturday 06 March 2010 02:11:15 Petteri Räty wrote:
>>>>>> On 03/05/2010 08:59 PM, Mike Frysinger wrote:
>>>>>>> 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.
>>>>>>
>>>>>> What we use in Java is JAVA_PKG_OPT_USE to declare what use flag the
>>>>>> DEPENDs should be under. This approach doesn't allow the ebuild
>>>>>> maintainer to forget adding the depends.
>>>>>
>>>>> i'm more inclined towards Jonathan's opinion, so ive kept the proposed
>>>>> behavior (plus a fix from Torsten).
>>>>
>>>> And what about my latest response to him?
>>>
>>> considering your proposal saves ${FOO} in DEPEND, it hasnt changed my
>>> opinion
>>
>> Why would it be better to require ebuild writers to have do it
>> themselves instead of the eclass automatically taking care of it?
>
> as Jonathan mentioned, it gives explicit control via multiple USE flags which
> your way does not
> -mike
I already said both can be implemented.
Regards,
Petteri
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 900 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