1 |
On Sat, Sep 6, 2008 at 10:10 PM, Ben de Groot <yngwin@g.o> wrote: |
2 |
> Alec Warner wrote: |
3 |
>> On Sat, Sep 6, 2008 at 10:36 AM, Thomas Anderson <gentoofan23@g.o> wrote: |
4 |
>>> Hi, |
5 |
>>> Currently we have a lot of: |
6 |
>>> src_configure() { |
7 |
>>> econf $(use_enable dvdr) \ |
8 |
>>> $(use_with ipv6 ssl) \ |
9 |
>>> --with-system-zlib |
10 |
>>> } |
11 |
>>> |
12 |
>>> Introducing(Idea shamelessly taken from Exherbo): |
13 |
>>> DEFAULT_SRC_CONFIGURE_USE_{WITHS,ENABLES} |
14 |
>>> DEFAULT_SRc_CONFIGURE_EXTRA_PARAMS |
15 |
>>> |
16 |
>>> The code from above could be rewritten like so: |
17 |
>>> |
18 |
>>> DEFAULT_SRC_CONFIGURE_USE_ENABLES=( 'dvdr' ) |
19 |
>>> DEFAULT_SRC_CONFIGURE_USE_WITHS=( 'ipv6 ssl' ) |
20 |
>>> DEFAULT_SRC_CONFIGURE_EXTRA_PARAMS=( '--with-system-zlib' ) |
21 |
>>> |
22 |
>>> That's much simpler. |
23 |
>> |
24 |
>> It saves you 1 line and reduces readability and intuitiveness by a |
25 |
>> fair margin; how is it simpler? |
26 |
> |
27 |
> It may be 2 lines less, but it is 42 characters more. |
28 |
> Plus, I dislike caps. :-p |
29 |
|
30 |
In the example I posted it's 339 characters less. Almost half of the |
31 |
original ;-) |
32 |
|
33 |
Regards, |
34 |
-- |
35 |
Santiago M. Mola |
36 |
Jabber ID: cooldwind@×××××.com |