PACKAGECONFIG and related parameters
Hi,
I'd like to update the glmark2 recipe:
http://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-benchmark/glmark2/glmark2_2012.12.bb
to latest upstream version.
The problem is the configure step is done with:
./waf configure --with-flavors=x11-gl,x11-glesv2 instead of the previous release's syntax:
./waf configure --enable-gl --enable-glesv2 Unfortunately:
./waf configure --with-flavors=x11-gl --with-flavors=x11-glesv2 is not an accepted syntax.
How can I express the PACKAGECONFIG[...] parameters, so that if both gl and gles2 are present I obtain "--with-flavors=x11-gl,x11-glesv2" as the configure parameter?
Thanks,
Diego
Quoted 12 lines
I'd like to update the glmark2 recipe:
http://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-benchmark
/glmark2/glmark2_2012.12.bb to latest upstream version.The problem is the configure step is done with:
./waf configure --with-flavors=x11-gl,x11-glesv2 instead of the previous release's syntax:
./waf configure --enable-gl --enable-glesv2 Unfortunately:
./waf configure --with-flavors=x11-gl --with-flavors=x11-glesv2 is not an accepted syntax.
Quoted 3 lines
How can I express the PACKAGECONFIG[...] parameters, so that if both gl and gles2 are present I obtain "--with-flavors=x11-gl,x11-glesv2" as the configure parameter?
Hi,
Can anybody help me with that?
Thanks,
Diego
Hi Diego,
Quoted 12 lines · On Wednesday 30 April 2014 11:05:45 Diego wrote:
Quoted 12 lines
I'd like to update the glmark2 recipe:
http://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-benchma
rk /glmark2/glmark2_2012.12.bb to latest upstream version.The problem is the configure step is done with:
./waf configure --with-flavors=x11-gl,x11-glesv2 instead of the previous release's syntax:
./waf configure --enable-gl --enable-glesv2 Unfortunately:
./waf configure --with-flavors=x11-gl --with-flavors=x11-glesv2 is not an accepted syntax.
Quoted 8 lines
Quoted 4 lines
How can I express the PACKAGECONFIG[...] parameters, so that if both gl and
gles2 are present I obtain "--with-flavors=x11-gl,x11-glesv2" as the configure parameter?Hi,
Can anybody help me with that?
You can't do this with PACKAGECONFIG alone, you'd need to use Python, i.e. something like this:
PACKAGECONFIG ?= "gl gles2"
PACKAGECONFIG[gl] = "..."
PACKAGECONFIG[gles2] = "..."
...
python __anonymous() {
packageconfig = (d.getVar("PACKAGECONFIG", True) or "").split()
flavors = []
if "gles2" in packageconfig:
flavors.append("x11-gles2")
if "gl" in packageconfig:
flavors.append("x11-gl")
if flavors:
d.appendVar("EXTRA_OECONF", " --with-flavors=%s" % ",".join(flavors))
}Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Hi Paul,
In data mercoledì 30 aprile 2014 10:57:18, Paul Eggleton ha scritto:
Quoted 21 lines
Hi Diego,
<snip>
You can't do this with PACKAGECONFIG alone, you'd need to use Python, i.e. something like this:
PACKAGECONFIG ?= "gl gles2"
PACKAGECONFIG[gl] = "..."
PACKAGECONFIG[gles2] = "..."
...python __anonymous() { packageconfig = (d.getVar("PACKAGECONFIG", True) or "").split() flavors = [] if "gles2" in packageconfig: flavors.append("x11-gles2") if "gl" in packageconfig: flavors.append("x11-gl") if flavors: d.appendVar("EXTRA_OECONF", " --with-flavors=%s" %
Quoted 2 lines
",".join(flavors)) }
I tried that solution and it works, thank you so much.
For newcomers like me, this may help explaining how that works:
http://stackoverflow.com/a/17857952/813810
I'll do some testings and then I'll submit the patch for the new glmark release.
Bests,
Diego
Quoted 14 lines · Diego
Hi,
I'd like to update the glmark2 recipe:
http://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-benchmark/glmark2/glmark2_2012.12.bb
to latest upstream version.The problem is the configure step is done with:
./waf configure --with-flavors=x11-gl,x11-glesv2 instead of the previous release's syntax:
./waf configure --enable-gl --enable-glesv2 Unfortunately:
./waf configure --with-flavors=x11-gl --with-flavors=x11-glesv2 is not an accepted syntax.
Quoted 7 lines
How can I express the PACKAGECONFIG[...] parameters, so that if both gl and gles2 are present I obtain "--with-flavors=x11-gl,x11-glesv2" as the configure parameter?
Thanks,
Diego
I don't think that's achievable with PACKAGECONFIG alone.
I would suggest you write a do_configure_prepend and adjust the configure options there.
For example, if you get '--with-flavors=x11-gl --with-flavors=x11-glesv2', you adjust it to '-with-flavors=x11-gl,x11-glesv2'.
Best Regards,
Chen Qi