summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-oe/recipes-benchmark/glmark2
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-benchmark/glmark2')
-rw-r--r--meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/0001-Fix-clang-warnings.patch31
-rw-r--r--meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/Fix-configure-for-sqrt-check.patch21
-rw-r--r--meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/build-Check-packages-to-be-used-by-the-enabled-flavo.patch43
-rw-r--r--meta-openembedded/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb62
4 files changed, 157 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/0001-Fix-clang-warnings.patch b/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/0001-Fix-clang-warnings.patch
new file mode 100644
index 000000000..cdf09faec
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/0001-Fix-clang-warnings.patch
@@ -0,0 +1,31 @@
+From 35e9f80518d666db5f9c62e8072ffbc307b4af4f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 26 Aug 2017 08:30:01 -0700
+Subject: [PATCH] Fix clang warnings
+
+../src/native-state-drm.cpp:334:20: error: cannot pass object of non-trivial type 'std::__cxx11::basic_string<char>' through variadic function; call will abort at runtime [-Wnon-pod-varargs]
+ dev_path);
+ ^
+1 error generated.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/native-state-drm.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/native-state-drm.cpp b/src/native-state-drm.cpp
+index dc2b323..62566ee 100644
+--- a/src/native-state-drm.cpp
++++ b/src/native-state-drm.cpp
+@@ -331,7 +331,7 @@ static int open_using_udev_scan()
+ if (!valid_fd(fd)) {
+ // %m is GLIBC specific... Maybe use strerror here...
+ Log::error("Tried to use '%s' but failed.\nReason : %m",
+- dev_path);
++ dev_path.c_str());
+ }
+ else
+ Log::debug("Success!\n");
+--
+2.14.1
+
diff --git a/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/Fix-configure-for-sqrt-check.patch b/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/Fix-configure-for-sqrt-check.patch
new file mode 100644
index 000000000..7de05ee58
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/Fix-configure-for-sqrt-check.patch
@@ -0,0 +1,21 @@
+From 9fb298c398f88a63d71432be1410d52fae089063 Mon Sep 17 00:00:00 2001
+From: Tom Hochstein <tom.hochstein@nxp.com>
+Date: Mon, 8 Aug 2016 11:39:54 -0500
+
+---
+ wscript | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/wscript b/wscript
+index ca843f4..eb4a26a 100644
+--- a/wscript
++++ b/wscript
+@@ -84,7 +84,7 @@ def configure(ctx):
+ ctx.check_cc(lib = lib, uselib_store = uselib)
+
+ # Check required functions
+- req_funcs = [('memset', 'string.h', []) ,('sqrt', 'math.h', ['m'])]
++ req_funcs = [('memset', 'string.h', [])]
+ for func, header, uselib in req_funcs:
+ ctx.check_cc(function_name = func, header_name = header,
+ uselib = uselib, mandatory = True)
diff --git a/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/build-Check-packages-to-be-used-by-the-enabled-flavo.patch b/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/build-Check-packages-to-be-used-by-the-enabled-flavo.patch
new file mode 100644
index 000000000..72b8debe5
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-benchmark/glmark2/files/build-Check-packages-to-be-used-by-the-enabled-flavo.patch
@@ -0,0 +1,43 @@
+From: Otavio Salvador <otavio@ossystems.com.br>
+Subject: [PATCH] build: Check packages to be used by the enabled flavors
+Organization: O.S. Systems Software LTDA.
+
+The packages shouldn't be dynamically detected otherwise the build
+predictability is lost. We now have all packages as mandatory but
+dependent of the flavors which use them.
+
+Upstream-Status: Submitted [https://github.com/glmark2/glmark2/pull/8]
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ wscript | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/wscript b/wscript
+index cab62a3..e7eaed0 100644
+--- a/wscript
++++ b/wscript
+@@ -121,13 +121,17 @@ def configure(ctx):
+ ('mirclient','mirclient', '0.13', list_contains(ctx.options.flavors, 'mir')),
+ ('wayland-client','wayland-client', None, list_contains(ctx.options.flavors, 'wayland')),
+ ('wayland-egl','wayland-egl', None, list_contains(ctx.options.flavors, 'wayland'))]
+- for (pkg, uselib, atleast, mandatory) in opt_pkgs:
++ for (pkg, uselib, atleast, check) in opt_pkgs:
++ # Check packages required by the flavors
++ if not check:
++ continue
++
+ if atleast is None:
+ ctx.check_cfg(package = pkg, uselib_store = uselib,
+- args = '--cflags --libs', mandatory = mandatory)
++ args = '--cflags --libs', mandatory = True)
+ else:
+ ctx.check_cfg(package = pkg, uselib_store = uselib, atleast_version=atleast,
+- args = '--cflags --libs', mandatory = mandatory)
++ args = '--cflags --libs', mandatory = True)
+
+
+ # Prepend CXX flags so that they can be overriden by the
+--
+2.4.6
+
diff --git a/meta-openembedded/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb b/meta-openembedded/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb
new file mode 100644
index 000000000..b72ced06a
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb
@@ -0,0 +1,62 @@
+SUMMARY = "OpenGL (ES) 2.0 benchmark"
+DESCRIPTION = "glmark2 is a benchmark for OpenGL (ES) 2.0. \
+It uses only the subset of the OpenGL 2.0 API that is compatible with OpenGL ES 2.0."
+HOMEPAGE = "https://launchpad.net/glmark2"
+BUGTRACKER = "https://bugs.launchpad.net/glmark2"
+
+LICENSE = "GPLv3+ & SGIv1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.SGI;beginline=5;md5=269cdab4af6748677acce51d9aa13552"
+
+DEPENDS = "libpng jpeg udev"
+
+PV = "2017.07+${SRCPV}"
+
+COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '.*-linux*', 'null', d)}"
+
+SRC_URI = "git://github.com/glmark2/glmark2.git;protocol=https \
+ file://build-Check-packages-to-be-used-by-the-enabled-flavo.patch \
+ file://Fix-configure-for-sqrt-check.patch \
+ file://0001-Fix-clang-warnings.patch \
+ "
+SRCREV = "ed20c633f1926d1dd78e3e89043c85a81302cbe6"
+
+S = "${WORKDIR}/git"
+
+inherit waf pkgconfig distro_features_check
+
+REQUIRED_DISTRO_FEATURES += "opengl"
+
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11-gl x11-gles2', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland opengl', 'wayland-gl wayland-gles2', '', d)} \
+ drm-gl drm-gles2"
+
+# Enable C++11 features
+CXXFLAGS += "-std=c++11"
+
+PACKAGECONFIG[x11-gl] = ",,virtual/libgl virtual/libx11"
+PACKAGECONFIG[x11-gles2] = ",,virtual/libgles2 virtual/libx11"
+PACKAGECONFIG[drm-gl] = ",,virtual/libgl libdrm"
+PACKAGECONFIG[drm-gles2] = ",,virtual/libgles2 libdrm"
+PACKAGECONFIG[wayland-gl] = ",,virtual/libgl wayland"
+PACKAGECONFIG[wayland-gles2] = ",,virtual/libgles2 wayland"
+
+python __anonymous() {
+ packageconfig = (d.getVar("PACKAGECONFIG") or "").split()
+ flavors = []
+ if "x11-gles2" in packageconfig:
+ flavors.append("x11-glesv2")
+ if "x11-gl" in packageconfig:
+ flavors.append("x11-gl")
+ if "wayland-gles2" in packageconfig:
+ flavors.append("wayland-glesv2")
+ if "wayland-gl" in packageconfig:
+ flavors.append("wayland-gl")
+ if "drm-gles2" in packageconfig:
+ flavors.append("drm-glesv2")
+ if "drm-gl" in packageconfig:
+ flavors.append("drm-gl")
+ if flavors:
+ d.appendVar("EXTRA_OECONF", " --with-flavors=%s" % ",".join(flavors))
+}
+
OpenPOWER on IntegriCloud