Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 230725 - [Future EAPI] Ability to automatically pass arguments to src_configure/src_compile
Summary: [Future EAPI] Ability to automatically pass arguments to src_configure/src_co...
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PMS/EAPI
Depends on: 197859
Blocks: future-eapi
  Show dependency tree
Reported: 2008-07-04 12:21 UTC by Thomas Anderson (tanderson) (RETIRED)
Modified: 2014-09-06 21:40 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---

default-config.patch (default-config.patch,724 bytes, patch)
2008-08-25 13:50 UTC, Steve L
Details | Diff
Implement the src_configure() (portage-adddefaultconfigureusewiths.patch,1.55 KB, patch)
2008-09-06 17:25 UTC, Thomas Anderson (tanderson) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Anderson (tanderson) (RETIRED) gentoo-dev 2008-07-04 12:21:15 UTC
Ok, so imagine I have:

IUSE="ipv6 dvdr"

And then I want to have econf auto use_enable dvdr and have it auto use_with ipv6. Also, I want to pass --with-system-zlib to configure. Normally I'd do this:

src_configure() {
    econf $(use_enable dvdr) \
        $(use_with ipv6) \

But if we had these variables, these things would be simpler:

I think this whole proposal should only happen after we have src_compile split but that's just my opinion.

Another thing that would be useful would be able to pass options to emake in src_compile(), like so:


src_compile() {
    emake buildtarget || die "Build failed"


DEFAULT_EMAKE_PARAMS="buildtarget" ( or some other interesting variable name. )
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-07-04 15:12:39 UTC
You forgot to assign the bug. :)
Comment 2 Thomas Anderson (tanderson) (RETIRED) gentoo-dev 2008-07-04 17:36:44 UTC
I should probably mention, that the original credit for this idea goes to the people who wrote the exheres format...This makes the exheres much nicer for the simple cases.
Comment 3 Thomas Anderson (tanderson) (RETIRED) gentoo-dev 2008-08-13 10:39:07 UTC
Perhaps a better way to do this would be:


which would translate to $(use_enable ssl crypto).
Comment 4 Steve L 2008-08-25 13:50:14 UTC
Created attachment 163759 [details, diff]

This patch enables two new variables, DEFAULT_CONFIG_ENABLE and DEFAULT_CONFIG_WITH both of which are checked as arrays to enable the use case you specified, the third zlib thing is already covered by EXTRA_ECONF. Slight concern would be if the third argument being passed to use_with has a space in; let me know if that's an issue; obviously needs to be tested properly ;)
Comment 5 Stephen Bennett 2008-08-26 19:51:34 UTC
The zlib thing isn't covered by EXTRA_ECONF; that's a user variable not to be touched by ebuilds.
Comment 6 Steve L 2008-09-05 15:08:15 UTC
(In reply to comment #5)
> The zlib thing isn't covered by EXTRA_ECONF; that's a user variable not to be
> touched by ebuilds.
The eclass doing EXTRA_ECONF="--with-system-zlib $EXTRA_ECONF" is not going to affect what the user has sent through in any way, though, and the user terms will still be in the same relative position as if the parameter had been passed to the econf call. So would achieve the desired solution with no effect on functionality already in-place.
Comment 7 Thomas Anderson (tanderson) (RETIRED) gentoo-dev 2008-09-06 17:25:54 UTC
Created attachment 164744 [details, diff]
Implement the src_configure()
Comment 8 Thomas Anderson (tanderson) (RETIRED) gentoo-dev 2008-09-06 17:27:20 UTC
Er, that patch description doesn't say so, but it also implements the src_compile stuff as well.
Comment 9 Pacho Ramos gentoo-dev 2013-03-29 18:38:48 UTC
What is blocking this? I haven't seen much disagreement here, but maybe it was strongly discussed long time ago and I missed it :|
Comment 10 Ciaran McCreesh 2013-03-29 18:41:45 UTC
The Council voted against it when DEFAULT_ was introduced.
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-08-30 11:02:15 UTC
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-09-06 21:40:46 UTC