1 |
Am Sonntag, den 08.03.2009, 15:16 -0700 schrieb Donnie Berkholz: |
2 |
> On 19:27 Sun 08 Mar , Tiziano Müller wrote: |
3 |
> > Am Sonntag, den 08.03.2009, 10:01 -0700 schrieb Donnie Berkholz: |
4 |
> > > It would just eliminate all but one call to use_with(). Depending on how |
5 |
> > > many you've got, this can shorten things up a fair bit. Here's an |
6 |
> > > example: |
7 |
> > > |
8 |
> > > econf \ |
9 |
> > > $(use_with 'x X' 'foo libfoo' 'bar' 'python pygtk') |
10 |
> > |
11 |
> > The above could be rewritten to: |
12 |
> > |
13 |
> > ECONF_USE_WITH="'x X' 'foo libfoo' 'bar' 'python pygtk'" |
14 |
> > econf $(use_with ${ECONF_USE_WITH}) |
15 |
> |
16 |
> Why would I want to obfuscate my code like that by purposely making |
17 |
> people look in multiple places to figure out what it's doing? I don't |
18 |
> see how this is any improvement. |
19 |
> |
20 |
> > or an eclass could even export this: |
21 |
> > |
22 |
> > src_configure() { |
23 |
> > [ -n ${ECONF_USE_WITH} ] && USE_WITH="$(use_with |
24 |
> > \"${ECONF_USE_WITH}\")" |
25 |
> > econf ${USE_WITH} |
26 |
> > } |
27 |
> > |
28 |
> > Guessing from what I see in the gnome/kde eclasses I think people will |
29 |
> > implement the above then in eclasses and I therefore don't see why we |
30 |
> > can't do it like that from the beginning... |
31 |
> |
32 |
> If it can be implemented in an eclass, why would we want to do it as an |
33 |
> EAPI in a package manager? Eclasses can be easily changed, you only need |
34 |
> to write them once, and you don't have to deal with updating & approving |
35 |
> a spec and new implementation for a bug in the previous implementation |
36 |
> (which you have to retain indefinitely). |
37 |
|
38 |
Well, the point I'm trying to make here is a different one: |
39 |
The syntax you proposed is more to write but still equivalent to the one |
40 |
using vars. |
41 |
And looking at the ebuilds - taking G2CONF as an example - it seems that |
42 |
people don't have a problem with putting their config options into vars. |
43 |
And furthermore with your syntax you still have to write out "econf |
44 |
$(use_with ...)" explicitly while adding it the conf-vars to a var (as |
45 |
proposed) makes the complete src_configure function obsolete, allows the |
46 |
usage of the default src_configure/src_compile/src_install (see |
47 |
http://archives.gentoo.org/gentoo-dev/msg_17e6ae8082aeb762fd01ba7307457789.xml for example) and is therefore even shorter to write. |