summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-benchmark/glmark2/files/build-Check-packages-to-be-used-by-the-enabled-flavo.patch43
-rw-r--r--meta-oe/recipes-benchmark/glmark2/glmark2_git.bb34
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 @@
1From: Otavio Salvador <otavio@ossystems.com.br>
2Subject: [PATCH] build: Check packages to be used by the enabled flavors
3Organization: O.S. Systems Software LTDA.
4
5The packages shouldn't be dynamically detected otherwise the build
6predictability is lost. We now have all packages as mandatory but
7dependent of the flavors which use them.
8
9Upstream-Status: Submitted [https://github.com/glmark2/glmark2/pull/8]
10
11Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
12---
13 wscript | 10 +++++++---
14 1 file changed, 7 insertions(+), 3 deletions(-)
15
16diff --git a/wscript b/wscript
17index 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--
422.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"
8LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ 8LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
9 file://COPYING.SGI;beginline=5;md5=269cdab4af6748677acce51d9aa13552" 9 file://COPYING.SGI;beginline=5;md5=269cdab4af6748677acce51d9aa13552"
10 10
11DEPENDS = "libpng12 jpeg virtual/libx11" 11DEPENDS = "libpng12 jpeg"
12
13# depends on virtual/libx11
14REQUIRED_DISTRO_FEATURES = "x11"
15 12
16PV = "2014.03+${SRCPV}" 13PV = "2014.03+${SRCPV}"
17 14
18SRC_URI = "git://github.com/glmark2/glmark2.git;protocol=https" 15SRC_URI = "git://github.com/glmark2/glmark2.git;protocol=https \
16 file://build-Check-packages-to-be-used-by-the-enabled-flavo.patch"
19SRCREV = "fa71af2dfab711fac87b9504b6fc9862f44bf72a" 17SRCREV = "fa71af2dfab711fac87b9504b6fc9862f44bf72a"
20 18
21S = "${WORKDIR}/git" 19S = "${WORKDIR}/git"
22 20
23inherit waf pkgconfig distro_features_check 21inherit waf pkgconfig
24 22
25PACKAGECONFIG ?= "gl gles2" 23PACKAGECONFIG ?= "${@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
27PACKAGECONFIG[gl] = ",,virtual/libgl" 27PACKAGECONFIG[x11-gl] = ",,virtual/libgl virtual/libx11"
28PACKAGECONFIG[gles2] = ",,virtual/libgles2" 28PACKAGECONFIG[x11-gles2] = ",,virtual/libgles2 virtual/libx11"
29PACKAGECONFIG[drm-gl] = ",,virtual/libgl libdrm"
30PACKAGECONFIG[drm-gles2] = ",,virtual/libgles2 libdrm"
31PACKAGECONFIG[wayland-gl] = ",,virtual/libgl wayland"
32PACKAGECONFIG[wayland-gles2] = ",,virtual/libgles2 wayland"
29 33
30python __anonymous() { 34python __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}