1 |
Am Sonntag, den 08.03.2009, 10:01 -0700 schrieb Donnie Berkholz: |
2 |
> On 16:48 Sun 08 Mar , Ciaran McCreesh wrote: |
3 |
> > On Sun, 8 Mar 2009 09:42:29 -0700 |
4 |
> > Donnie Berkholz <dberkholz@g.o> wrote: |
5 |
> > > - I understand the reasoning for the SRC_CONFIGURE_WITH blah stuff. I |
6 |
> > > strongly oppose this implementation because it makes ebuilds less |
7 |
> > > like bash scripts that are easy to understand. Instead I suggest |
8 |
> > > extending use_with() and use_enable() to accept multiple sets of |
9 |
> > > arguments (alternately, making custom, similar functions that will |
10 |
> > > take multiple args). |
11 |
> > |
12 |
> > How would that work? I can't see an obvious way of doing it that isn't |
13 |
> > more or less as verbose as just using multiple calls. |
14 |
> |
15 |
> It would just eliminate all but one call to use_with(). Depending on how |
16 |
> many you've got, this can shorten things up a fair bit. Here's an |
17 |
> example: |
18 |
> |
19 |
> econf \ |
20 |
> $(use_with 'x X' 'foo libfoo' 'bar' 'python pygtk') |
21 |
> econf \ |
22 |
> $(use_with x X) \ |
23 |
> $(use_with foo libfoo) \ |
24 |
> $(use_with bar) \ |
25 |
> $(use_with python pygtk) |
26 |
> |
27 |
> |
28 |
|
29 |
The above could be rewritten to: |
30 |
|
31 |
ECONF_USE_WITH="'x X' 'foo libfoo' 'bar' 'python pygtk'" |
32 |
econf $(use_with ${ECONF_USE_WITH}) |
33 |
|
34 |
or an eclass could even export this: |
35 |
|
36 |
src_configure() { |
37 |
[ -n ${ECONF_USE_WITH} ] && USE_WITH="$(use_with |
38 |
\"${ECONF_USE_WITH}\")" |
39 |
econf ${USE_WITH} |
40 |
} |
41 |
|
42 |
Guessing from what I see in the gnome/kde eclasses I think people will |
43 |
implement the above then in eclasses and I therefore don't see why we |
44 |
can't do it like that from the beginning... |
45 |
(Besides, there are already shortcuts in eclasses like G2CONF="...") |