diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2015-07-22 16:47:09 -0300 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-07-30 20:20:42 +0200 |
commit | 98069929139818596d0d2ff9ecd43f56899ac969 (patch) | |
tree | 880a161f4003e690efcdadcb44dfab739f3fed31 /meta-oe/recipes-benchmark | |
parent | b0c486f9b7bde0d9b866a89c4c9d55e1cc6aba0c (diff) | |
download | meta-openembedded-98069929139818596d0d2ff9ecd43f56899ac969.tar.gz |
glmark2: Remove X11 exclusiveness
The tool has support for multiple backends: X11, drm and Wayland.
This demanded to a fix, which has been sent upstream, to make the
flavor configuration predictable and the recipe has been rework to
support them all, making the PACKAGECONFIG to respect the
DISTRO_FEATURES available by default.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-benchmark')
-rw-r--r-- | meta-oe/recipes-benchmark/glmark2/files/build-Check-packages-to-be-used-by-the-enabled-flavo.patch | 43 | ||||
-rw-r--r-- | meta-oe/recipes-benchmark/glmark2/glmark2_git.bb | 34 |
2 files changed, 66 insertions, 11 deletions
diff --git a/meta-oe/recipes-benchmark/glmark2/files/build-Check-packages-to-be-used-by-the-enabled-flavo.patch b/meta-oe/recipes-benchmark/glmark2/files/build-Check-packages-to-be-used-by-the-enabled-flavo.patch new file mode 100644 index 000000000..ff13329ae --- /dev/null +++ b/meta-oe/recipes-benchmark/glmark2/files/build-Check-packages-to-be-used-by-the-enabled-flavo.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From: Otavio Salvador <otavio@ossystems.com.br> | ||
2 | Subject: [PATCH] build: Check packages to be used by the enabled flavors | ||
3 | Organization: O.S. Systems Software LTDA. | ||
4 | |||
5 | The packages shouldn't be dynamically detected otherwise the build | ||
6 | predictability is lost. We now have all packages as mandatory but | ||
7 | dependent of the flavors which use them. | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/glmark2/glmark2/pull/8] | ||
10 | |||
11 | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> | ||
12 | --- | ||
13 | wscript | 10 +++++++--- | ||
14 | 1 file changed, 7 insertions(+), 3 deletions(-) | ||
15 | |||
16 | diff --git a/wscript b/wscript | ||
17 | index cab62a3..e7eaed0 100644 | ||
18 | --- a/wscript | ||
19 | +++ b/wscript | ||
20 | @@ -121,13 +121,17 @@ def configure(ctx): | ||
21 | ('mirclient','mirclient', '0.13', list_contains(Options.options.flavors, 'mir')), | ||
22 | ('wayland-client','wayland-client', None, list_contains(Options.options.flavors, 'wayland')), | ||
23 | ('wayland-egl','wayland-egl', None, list_contains(Options.options.flavors, 'wayland'))] | ||
24 | - for (pkg, uselib, atleast, mandatory) in opt_pkgs: | ||
25 | + for (pkg, uselib, atleast, check) in opt_pkgs: | ||
26 | + # Check packages required by the flavors | ||
27 | + if not check: | ||
28 | + continue | ||
29 | + | ||
30 | if atleast is None: | ||
31 | ctx.check_cfg(package = pkg, uselib_store = uselib, | ||
32 | - args = '--cflags --libs', mandatory = mandatory) | ||
33 | + args = '--cflags --libs', mandatory = True) | ||
34 | else: | ||
35 | ctx.check_cfg(package = pkg, uselib_store = uselib, atleast_version=atleast, | ||
36 | - args = '--cflags --libs', mandatory = mandatory) | ||
37 | + args = '--cflags --libs', mandatory = True) | ||
38 | |||
39 | |||
40 | # Prepend CXX flags so that they can be overriden by the | ||
41 | -- | ||
42 | 2.4.6 | ||
43 | |||
diff --git a/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb b/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb index 57acad575..98ce3773f 100644 --- a/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb +++ b/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb | |||
@@ -8,32 +8,44 @@ LICENSE = "GPLv3+ & SGIv1" | |||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ |
9 | file://COPYING.SGI;beginline=5;md5=269cdab4af6748677acce51d9aa13552" | 9 | file://COPYING.SGI;beginline=5;md5=269cdab4af6748677acce51d9aa13552" |
10 | 10 | ||
11 | DEPENDS = "libpng12 jpeg virtual/libx11" | 11 | DEPENDS = "libpng12 jpeg" |
12 | |||
13 | # depends on virtual/libx11 | ||
14 | REQUIRED_DISTRO_FEATURES = "x11" | ||
15 | 12 | ||
16 | PV = "2014.03+${SRCPV}" | 13 | PV = "2014.03+${SRCPV}" |
17 | 14 | ||
18 | SRC_URI = "git://github.com/glmark2/glmark2.git;protocol=https" | 15 | SRC_URI = "git://github.com/glmark2/glmark2.git;protocol=https \ |
16 | file://build-Check-packages-to-be-used-by-the-enabled-flavo.patch" | ||
19 | SRCREV = "fa71af2dfab711fac87b9504b6fc9862f44bf72a" | 17 | SRCREV = "fa71af2dfab711fac87b9504b6fc9862f44bf72a" |
20 | 18 | ||
21 | S = "${WORKDIR}/git" | 19 | S = "${WORKDIR}/git" |
22 | 20 | ||
23 | inherit waf pkgconfig distro_features_check | 21 | inherit waf pkgconfig |
24 | 22 | ||
25 | PACKAGECONFIG ?= "gl gles2" | 23 | PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11-gl x11-gles2', '', d)} \ |
24 | ${@bb.utils.contains('DISTRO_FEATURES', 'wayland opengl', 'wayland-gl wayland-gles2', '', d)} \ | ||
25 | drm-gl drm-gles2" | ||
26 | 26 | ||
27 | PACKAGECONFIG[gl] = ",,virtual/libgl" | 27 | PACKAGECONFIG[x11-gl] = ",,virtual/libgl virtual/libx11" |
28 | PACKAGECONFIG[gles2] = ",,virtual/libgles2" | 28 | PACKAGECONFIG[x11-gles2] = ",,virtual/libgles2 virtual/libx11" |
29 | PACKAGECONFIG[drm-gl] = ",,virtual/libgl libdrm" | ||
30 | PACKAGECONFIG[drm-gles2] = ",,virtual/libgles2 libdrm" | ||
31 | PACKAGECONFIG[wayland-gl] = ",,virtual/libgl wayland" | ||
32 | PACKAGECONFIG[wayland-gles2] = ",,virtual/libgles2 wayland" | ||
29 | 33 | ||
30 | python __anonymous() { | 34 | python __anonymous() { |
31 | packageconfig = (d.getVar("PACKAGECONFIG", True) or "").split() | 35 | packageconfig = (d.getVar("PACKAGECONFIG", True) or "").split() |
32 | flavors = [] | 36 | flavors = [] |
33 | if "gles2" in packageconfig: | 37 | if "x11-gles2" in packageconfig: |
34 | flavors.append("x11-glesv2") | 38 | flavors.append("x11-glesv2") |
35 | if "gl" in packageconfig: | 39 | if "x11-gl" in packageconfig: |
36 | flavors.append("x11-gl") | 40 | flavors.append("x11-gl") |
41 | if "wayland-gles2" in packageconfig: | ||
42 | flavors.append("wayland-glesv2") | ||
43 | if "wayland-gl" in packageconfig: | ||
44 | flavors.append("wayland-gl") | ||
45 | if "drm-gles2" in packageconfig: | ||
46 | flavors.append("drm-glesv2") | ||
47 | if "drm-gl" in packageconfig: | ||
48 | flavors.append("drm-gl") | ||
37 | if flavors: | 49 | if flavors: |
38 | d.appendVar("EXTRA_OECONF", " --with-flavors=%s" % ",".join(flavors)) | 50 | d.appendVar("EXTRA_OECONF", " --with-flavors=%s" % ",".join(flavors)) |
39 | } | 51 | } |