summaryrefslogtreecommitdiffstats
path: root/poky/meta/recipes-graphics/piglit
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-graphics/piglit')
-rw-r--r--poky/meta/recipes-graphics/piglit/piglit/0001-cmake-install-bash-completions-in-the-right-place.patch35
-rw-r--r--poky/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch54
-rw-r--r--poky/meta/recipes-graphics/piglit/piglit_git.bb52
3 files changed, 141 insertions, 0 deletions
diff --git a/poky/meta/recipes-graphics/piglit/piglit/0001-cmake-install-bash-completions-in-the-right-place.patch b/poky/meta/recipes-graphics/piglit/piglit/0001-cmake-install-bash-completions-in-the-right-place.patch
new file mode 100644
index 000000000..e07e810a7
--- /dev/null
+++ b/poky/meta/recipes-graphics/piglit/piglit/0001-cmake-install-bash-completions-in-the-right-place.patch
@@ -0,0 +1,35 @@
+From 26faa2c157a27a18a9f767976730fe0c115e3af4 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 13 Jul 2016 19:19:02 +0300
+Subject: [PATCH] cmake: install bash-completions in the right place
+
+The completionsdir variable is a full path and should not be
+prefixed.
+
+This does mean the files may be installed outside of
+CMAKE_INSTALL_PREFIX -- the alternative is more difficult and
+means that bash completion files may be installed where
+bash-completion can't find them.
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Submitted [mailing list]
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8e2abba..784a8f9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -532,7 +532,7 @@ install (
+ if (BASH_COMPLETION_FOUND)
+ install(
+ FILES completions/bash/piglit
+- DESTINATION ${CMAKE_INSTALL_PREFIX}/${BASH_COMPLETION_COMPLETIONSDIR}/
++ DESTINATION ${BASH_COMPLETION_COMPLETIONSDIR}/
+ )
+ endif (BASH_COMPLETION_FOUND)
+
+--
+2.8.1
+
diff --git a/poky/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch b/poky/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch
new file mode 100644
index 000000000..f851a92ce
--- /dev/null
+++ b/poky/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch
@@ -0,0 +1,54 @@
+From 0fc2c2932699cfd68be96c820fddfdd79b48b788 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 9 Jul 2016 07:52:19 +0000
+Subject: [PATCH] tests: Use FE_UPWARD only if its defined in fenv.h
+
+On ARM, musl does not define FE_* when arch does not have
+VFP, (which is right interpretation), therefore check if
+its defined before using it
+
+Fixes errors like
+
+tests/general/roundmode-pixelstore.c:82:19: error: 'FE_UPWARD' undeclared (first use in this function)
+ ret = fesetround(FE_UPWARD);
+ ^~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ tests/general/roundmode-getintegerv.c | 2 ++
+ tests/general/roundmode-pixelstore.c | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/tests/general/roundmode-getintegerv.c b/tests/general/roundmode-getintegerv.c
+index 28ecfaf..5c27579 100644
+--- a/tests/general/roundmode-getintegerv.c
++++ b/tests/general/roundmode-getintegerv.c
+@@ -81,7 +81,9 @@ piglit_init(int argc, char **argv)
+ {
+ int ret;
+ bool pass = true;
++#ifdef FE_UPWARD
+ ret = fesetround(FE_UPWARD);
++#endif
+ if (ret != 0) {
+ printf("Couldn't set rounding mode\n");
+ piglit_report_result(PIGLIT_SKIP);
+diff --git a/tests/general/roundmode-pixelstore.c b/tests/general/roundmode-pixelstore.c
+index 9284f43..3fcb396 100644
+--- a/tests/general/roundmode-pixelstore.c
++++ b/tests/general/roundmode-pixelstore.c
+@@ -79,7 +79,9 @@ piglit_init(int argc, char **argv)
+ {
+ int ret;
+ bool pass = true;
++#ifdef FE_UPWARD
+ ret = fesetround(FE_UPWARD);
++#endif
+ if (ret != 0) {
+ printf("Couldn't set rounding mode\n");
+ piglit_report_result(PIGLIT_SKIP);
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-graphics/piglit/piglit_git.bb b/poky/meta/recipes-graphics/piglit/piglit_git.bb
new file mode 100644
index 000000000..b936ad8a7
--- /dev/null
+++ b/poky/meta/recipes-graphics/piglit/piglit_git.bb
@@ -0,0 +1,52 @@
+SUMMARY = "OpenGL driver testing framework"
+LICENSE = "MIT & LGPLv2+ & GPLv3 & GPLv2+ & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0"
+
+SRC_URI = "git://anongit.freedesktop.org/piglit \
+ file://0001-cmake-install-bash-completions-in-the-right-place.patch \
+ file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \
+ "
+UPSTREAM_CHECK_COMMITS = "1"
+
+# From 2018-02-26
+SRCREV = "4ce0887e2f7f848d2be2e435a2d0f3c80e44ea3b"
+# (when PV goes above 1.0 remove the trailing r)
+PV = "1.0+gitr${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "libpng virtual/libx11 libxkbcommon libxrender waffle virtual/libgl libglu python3-mako-native python3-numpy-native python3-six-native virtual/egl"
+
+inherit cmake python3native distro_features_check bash-completion
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+# depends on virtual/libgl
+REQUIRED_DISTRO_FEATURES += "opengl"
+
+# The built scripts go into the temporary directory according to tempfile
+# (typically /tmp) which can race if multiple builds happen on the same machine,
+# so tell it to use a directory in ${B} to avoid overwriting.
+export TEMP = "${B}/temp/"
+do_compile[dirs] =+ "${B}/temp/"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut,"
+
+do_configure_prepend() {
+ if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = "no" ]; then
+ sed -i -e "/^#.*include <GL\/freeglut_ext.h>$/d" ${S}/src/piglit/glut_wrap.h
+ sed -i -e "/^#.*include.*<GL\/glut.h>$/d" ${S}/src/piglit/glut_wrap.h
+ fi
+}
+
+OECMAKE_TARGET_INSTALL = "install/strip"
+
+RDEPENDS_${PN} = "waffle python3 python3-mako python3-json \
+ python3-misc \
+ python3-unixadmin python3-xml python3-multiprocessing \
+ python3-six python3-shell python3-io \
+ python3-netserver mesa-demos bash \
+ "
+
+INSANE_SKIP_${PN} += "dev-so already-stripped"
OpenPOWER on IntegriCloud