Gentoo Archives: gentoo-dev

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

Replies