* PACKAGECONFIG and related parameters
@ 2014-04-23 13:24 Diego
2014-04-30 9:05 ` Diego
2014-04-30 9:33 ` ChenQi
0 siblings, 2 replies; 5+ messages in thread
From: Diego @ 2014-04-23 13:24 UTC (permalink / raw)
To: yocto
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PACKAGECONFIG and related parameters
2014-04-23 13:24 PACKAGECONFIG and related parameters Diego
@ 2014-04-30 9:05 ` Diego
2014-04-30 9:57 ` Paul Eggleton
2014-04-30 9:33 ` ChenQi
1 sibling, 1 reply; 5+ messages in thread
From: Diego @ 2014-04-30 9:05 UTC (permalink / raw)
To: yocto
> 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?
Hi,
Can anybody help me with that?
Thanks,
Diego
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PACKAGECONFIG and related parameters
2014-04-23 13:24 PACKAGECONFIG and related parameters Diego
2014-04-30 9:05 ` Diego
@ 2014-04-30 9:33 ` ChenQi
1 sibling, 0 replies; 5+ messages in thread
From: ChenQi @ 2014-04-30 9:33 UTC (permalink / raw)
To: yocto
On 04/23/2014 09:24 PM, Diego wrote:
> 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
>
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PACKAGECONFIG and related parameters
2014-04-30 9:05 ` Diego
@ 2014-04-30 9:57 ` Paul Eggleton
2014-04-30 15:25 ` Diego
0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggleton @ 2014-04-30 9:57 UTC (permalink / raw)
To: Diego; +Cc: yocto
Hi Diego,
On Wednesday 30 April 2014 11:05:45 Diego wrote:
> > 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.
> >
> > 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
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PACKAGECONFIG and related parameters
2014-04-30 9:57 ` Paul Eggleton
@ 2014-04-30 15:25 ` Diego
0 siblings, 0 replies; 5+ messages in thread
From: Diego @ 2014-04-30 15:25 UTC (permalink / raw)
To: Paul Eggleton; +Cc: yocto
Hi Paul,
In data mercoledì 30 aprile 2014 10:57:18, Paul Eggleton ha scritto:
> 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" %
> ",".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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-04-30 15:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-23 13:24 PACKAGECONFIG and related parameters Diego
2014-04-30 9:05 ` Diego
2014-04-30 9:57 ` Paul Eggleton
2014-04-30 15:25 ` Diego
2014-04-30 9:33 ` ChenQi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.