[OE-core] packageconfig, add depends if feature is disabled
Max Krummenacher
max.oss.09 at gmail.com
Sun Jun 19 09:52:51 UTC 2016
Hi
The recent unconditional move towards gtk3 in oe-core forces me to
follow with some of my recipes.
I tried this with packageconfig, however there seems to be no easy way
to specify DEPENDS in case a packageconfig feature is disabled.
i.e. for gtk3 we need gtk+3 in depends while for gtk2 we need gtk+.
I ended up with:
PACKAGECONFIG ?= "gtk3"
PACKAGECONFIG[gtk3] = "--enable-gtk3,,gtk+3"
python __anonymous () {
depends = d.getVar("DEPENDS", d, 1)
if 'gtk3' not in d.getVar('PACKAGECONFIG', True):
d.setVar("DEPENDS", "%s gtk+" % depends)
}
The following would also be possible but then nothing makes sure that
one, and exactly one of gtk2, gtk3 is in PACKAGECONFIG.
PACKAGECONFIG ?= "gtk3"
PACKAGECONFIG[gtk2] = ",,gtk+"
PACKAGECONFIG[gtk3] = "--enable-gtk3,,gtk+3"
Any ideas?
Would this use case merit an extension to packageconfig, e.g.:
# PACKAGECONFIG ??= "<default options>"
# PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,
foo_depends,foo_runtime_depends,
not_foo_depends,not_foo_rdepends"
Which would simplify the above to:
PACKAGECONFIG ?= "gtk3"
PACKAGECONFIG[gtk3] = "--enable-gtk3,,gtk+3,,gtk+"
Regards
Max
More information about the Openembedded-core
mailing list