1 |
On Sat, Sep 6, 2008 at 12:00 PM, Alec Warner <antarus@g.o> wrote: |
2 |
> On Sat, Sep 6, 2008 at 10:36 AM, Thomas Anderson <gentoofan23@g.o> wrote: |
3 |
>> Hi, |
4 |
>> Currently we have a lot of: |
5 |
>> src_configure() { |
6 |
>> econf $(use_enable dvdr) \ |
7 |
>> $(use_with ipv6 ssl) \ |
8 |
>> --with-system-zlib |
9 |
>> } |
10 |
>> |
11 |
>> Introducing(Idea shamelessly taken from Exherbo): |
12 |
>> DEFAULT_SRC_CONFIGURE_USE_{WITHS,ENABLES} |
13 |
>> DEFAULT_SRc_CONFIGURE_EXTRA_PARAMS |
14 |
>> |
15 |
>> The code from above could be rewritten like so: |
16 |
>> |
17 |
>> DEFAULT_SRC_CONFIGURE_USE_ENABLES=( 'dvdr' ) |
18 |
>> DEFAULT_SRC_CONFIGURE_USE_WITHS=( 'ipv6 ssl' ) |
19 |
>> DEFAULT_SRC_CONFIGURE_EXTRA_PARAMS=( '--with-system-zlib' ) |
20 |
>> |
21 |
>> That's much simpler. |
22 |
> |
23 |
> It saves you 1 line and reduces readability and intuitiveness by a |
24 |
> fair margin; how is it simpler? |
25 |
> |
26 |
|
27 |
errr s/1/2/ s/line/lines/ :/ |
28 |
|
29 |
>> |
30 |
>> Also taken from Exherbo, DEFAULT_SRC_COMPILE_PARAMS could be used to |
31 |
>> append parameters to emake like so: |
32 |
>> |
33 |
>> src_compile() { |
34 |
>> emake buildtarget |
35 |
>> } |
36 |
>> |
37 |
>> which would be replaced by: |
38 |
>> DEFAULT_SRC_COMPILE_PARAMS=( 'buildtarget' ) |
39 |
>> |
40 |
>> This was originally proposed in bug #230725[1] |
41 |
>> |
42 |
>> Regards, |
43 |
>> Thomas |
44 |
>> |
45 |
>> [1] https://bugs.gentoo.org/show_bug.cgi?id=230725 |
46 |
>> |
47 |
> |