Gentoo Archives: gentoo-dev

From: Thomas Anderson <gentoofan23@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [RFC] Ability to pass arguments to src_configure/src_compile
Date: Sat, 06 Sep 2008 17:21:09
Message-Id: 20080906173656.GB5434@spoc.mpa.com
1 Hi,
2 Currently we have a lot of:
3 src_configure() {
4 econf $(use_enable dvdr) \
5 $(use_with ipv6 ssl) \
6 --with-system-zlib
7 }
8
9 Introducing(Idea shamelessly taken from Exherbo):
10 DEFAULT_SRC_CONFIGURE_USE_{WITHS,ENABLES}
11 DEFAULT_SRc_CONFIGURE_EXTRA_PARAMS
12
13 The code from above could be rewritten like so:
14
15 DEFAULT_SRC_CONFIGURE_USE_ENABLES=( 'dvdr' )
16 DEFAULT_SRC_CONFIGURE_USE_WITHS=( 'ipv6 ssl' )
17 DEFAULT_SRC_CONFIGURE_EXTRA_PARAMS=( '--with-system-zlib' )
18
19 That's much simpler.
20
21 Also taken from Exherbo, DEFAULT_SRC_COMPILE_PARAMS could be used to
22 append parameters to emake like so:
23
24 src_compile() {
25 emake buildtarget
26 }
27
28 which would be replaced by:
29 DEFAULT_SRC_COMPILE_PARAMS=( 'buildtarget' )
30
31 This was originally proposed in bug #230725[1]
32
33 Regards,
34 Thomas
35
36 [1] https://bugs.gentoo.org/show_bug.cgi?id=230725

Replies