Gentoo Archives: gentoo-dev

From: Donnie Berkholz <dberkholz@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Ideas for a (fast) EAPI=3
Date: Sun, 08 Mar 2009 18:41:12
Message-Id: 20090308184109.GK14240@comet
In Reply to: Re: [gentoo-dev] Ideas for a (fast) EAPI=3 by "Tiziano Müller"
1 On 19:35 Sun 08 Mar , Tiziano Müller wrote:
2 > Am Sonntag, den 08.03.2009, 11:24 -0700 schrieb Donnie Berkholz:
3 > > On 10:01 Sun 08 Mar , Donnie Berkholz wrote:
4 > > > On 16:48 Sun 08 Mar , Ciaran McCreesh wrote:
5 > > > > On Sun, 8 Mar 2009 09:42:29 -0700
6 > > > > Donnie Berkholz <dberkholz@g.o> wrote:
7 > > > > > - I understand the reasoning for the SRC_CONFIGURE_WITH blah stuff. I
8 > > > > > strongly oppose this implementation because it makes ebuilds less
9 > > > > > like bash scripts that are easy to understand. Instead I suggest
10 > > > > > extending use_with() and use_enable() to accept multiple sets of
11 > > > > > arguments (alternately, making custom, similar functions that will
12 > > > > > take multiple args).
13 > > > >
14 > > > > How would that work? I can't see an obvious way of doing it that isn't
15 > > > > more or less as verbose as just using multiple calls.
16 > > >
17 > > > It would just eliminate all but one call to use_with(). Depending on how
18 > > > many you've got, this can shorten things up a fair bit. Here's an
19 > > > example:
20 > > >
21 > > > econf \
22 > > > $(use_with 'x X' 'foo libfoo' 'bar' 'python pygtk')
23 > > > econf \
24 > > > $(use_with x X) \
25 > > > $(use_with foo libfoo) \
26 > > > $(use_with bar) \
27 > > > $(use_with python pygtk)
28 > >
29 > > And the straightforward evolution of this would be additional with() and
30 > > enable() functions for mandatory support. I still find this more
31 > > intuitive than the set of variables.
32 > >
33 > > econf \
34 > > $(use_with 'x X' 'foo libfoo' 'bar' 'python pygtk') \
35 > > $(with foo bar blah baz) \
36 > > $(enable bam paw tick)
37 > >
38 >
39 > Which could already be written as ...
40 > econf --with-{foo,bar}
41 > using bash :-)
42 >
43 > (or did I miss the point?)
44
45 Consistency, and that gets pretty ugly after a few when you also want to
46 pass arguments to them.
47
48 --
49 Thanks,
50 Donnie
51
52 Donnie Berkholz
53 Developer, Gentoo Linux
54 Blog: http://dberkholz.wordpress.com