summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/piglit
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/piglit')
-rw-r--r--meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch54
-rw-r--r--meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch54
-rw-r--r--meta/recipes-graphics/piglit/piglit/0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch32
-rw-r--r--meta/recipes-graphics/piglit/piglit/0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch30
-rw-r--r--meta/recipes-graphics/piglit/piglit_git.bb61
5 files changed, 104 insertions, 127 deletions
diff --git a/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch b/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch
deleted file mode 100644
index d591da5d6b..0000000000
--- a/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 73e4fbc5777eddd89bb0fb16e90343551fe3e0ef Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Tue, 5 Jul 2016 10:56:23 +0300
-Subject: [PATCH] cmake: Link utils with xcb explicitly
-
-Linking with g++ can reportedly lead to:
-
-libpiglitutil_gl.so.0: error: undefined reference to 'xcb_connect'
-libpiglitutil_gl.so.0: error: undefined reference to 'xcb_get_setup'
-libpiglitutil_gl.so.0: error: undefined reference to 'xcb_setup_roots_iterator'
-
-This may have appeared now because xcb-dri2 used to overlink publicly
-but now does not.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Pending
----
- CMakeLists.txt | 1 +
- tests/util/CMakeLists.txt | 2 ++
- 2 files changed, 3 insertions(+)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8e2abba..2e1a473 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -151,6 +151,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-
- pkg_check_modules(LIBDRM QUIET libdrm)
- pkg_check_modules(LIBDRM_INTEL QUIET libdrm_intel)
-+ pkg_check_modules(XCB QUIET xcb)
- pkg_check_modules(XCB_DRI2 QUIET xcb-dri2)
- pkg_check_modules(GLPROTO QUIET glproto)
- ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
-diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
-index fb22ffa..e1f8073 100644
---- a/tests/util/CMakeLists.txt
-+++ b/tests/util/CMakeLists.txt
-@@ -121,11 +121,13 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-
- list(APPEND UTIL_GL_LIBS
- ${LIBDRM_LDFLAGS}
-+ ${XCB_LDFLAGS}
- ${XCB_DRI2_LDFLAGS}
- )
-
- list(APPEND UTIL_GL_INCLUDES
- ${LIBDRM_INCLUDE_DIRS}
-+ ${XCB_INCLUDE_DIRS}
- ${XCB_DRI2_INCLUDE_DIRS}
- )
-
---
-2.1.4
-
diff --git a/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch b/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch
deleted file mode 100644
index f851a92ceb..0000000000
--- a/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-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/meta/recipes-graphics/piglit/piglit/0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch b/meta/recipes-graphics/piglit/piglit/0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch
new file mode 100644
index 0000000000..5d6ec368ba
--- /dev/null
+++ b/meta/recipes-graphics/piglit/piglit/0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch
@@ -0,0 +1,32 @@
+From 3bf1beee1ddd19bc536ff2856e04ac269d43daa2 Mon Sep 17 00:00:00 2001
+From: Pascal Bach <pascal.bach@siemens.com>
+Date: Thu, 4 Oct 2018 14:43:17 +0200
+Subject: [PATCH] cmake: use proper WAYLAND_INCLUDE_DIRS variable
+
+WAYLAND_wayland-client_INCLUDEDIR is an internal variable and is not correctly
+set when cross compiling. WAYLAND_INCLUDE_DIRS includes the correct path even
+when cross compiling.
+
+Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
+
+Upstream-Status: Submitted [piglit@lists.freedesktop.org]
+---
+ tests/util/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
+index a5f080156..a303a9f58 100644
+--- a/tests/util/CMakeLists.txt
++++ b/tests/util/CMakeLists.txt
+@@ -97,7 +97,7 @@ if(PIGLIT_USE_WAFFLE)
+ piglit-framework-gl/piglit_wl_framework.c
+ )
+ list(APPEND UTIL_GL_INCLUDES
+- ${WAYLAND_wayland-client_INCLUDEDIR}
++ ${WAYLAND_INCLUDE_DIRS}
+ )
+ endif()
+ if(PIGLIT_HAS_X11)
+--
+2.11.0
+
diff --git a/meta/recipes-graphics/piglit/piglit/0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch b/meta/recipes-graphics/piglit/piglit/0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch
new file mode 100644
index 0000000000..16c7c5c803
--- /dev/null
+++ b/meta/recipes-graphics/piglit/piglit/0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch
@@ -0,0 +1,30 @@
+From 1c67250308a92d4991ed05d9d240090ab84accae Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 10 Nov 2020 17:13:50 +0000
+Subject: [PATCH 2/2] tests/util/piglit-shader.c: do not hardcode build path
+ into target binary
+
+This helps reproducibilty.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ tests/util/piglit-shader.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/util/piglit-shader.c b/tests/util/piglit-shader.c
+index 4fd68d21e..c9ea8295e 100644
+--- a/tests/util/piglit-shader.c
++++ b/tests/util/piglit-shader.c
+@@ -73,7 +73,7 @@ piglit_compile_shader(GLenum target, const char *filename)
+
+ source_dir = getenv("PIGLIT_SOURCE_DIR");
+ if (source_dir == NULL) {
+- source_dir = SOURCE_DIR;
++ source_dir = ".";
+ }
+
+ snprintf(filename_with_path, FILENAME_MAX - 1,
+--
+2.17.1
+
diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb
index 811f7af73f..b12dd46ea0 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -1,25 +1,33 @@
SUMMARY = "OpenGL driver testing framework"
-LICENSE = "MIT & LGPLv2+ & GPLv3 & GPLv2+ & BSD-3-Clause"
+DESCRIPTION = "Piglit is an open-source test suite for OpenGL and OpenCL \
+implementations."
+HOMEPAGE = "https://gitlab.freedesktop.org/mesa/piglit"
+BUGTRACKER = "https://gitlab.freedesktop.org/mesa/piglit/-/issues"
+LICENSE = "MIT & LGPL-2.0-or-later & GPL-3.0-only & GPL-2.0-or-later & BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0"
-SRC_URI = "git://anongit.freedesktop.org/piglit \
+SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https;branch=main \
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 \
- file://0001-cmake-Link-utils-with-xcb-explicitly.patch \
+ file://0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \
+ file://0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch \
"
+UPSTREAM_CHECK_COMMITS = "1"
-# From 2016-07-07
-SRCREV = "c39e41a86551eb390b8da23232dc8577639403d0"
+SRCREV = "acc0e009d0f7e843148205d03fda53ad5f1b7c8c"
# (when PV goes above 1.0 remove the trailing r)
PV = "1.0+gitr${SRCPV}"
S = "${WORKDIR}/git"
-DEPENDS = "libpng virtual/libx11 libxrender waffle virtual/libgl libglu python3-mako-native python3-numpy-native python3-six-native"
+X11_DEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxrender libglu', '', d)}"
+X11_RDEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa-demos', '', d)}"
-inherit cmake python3native distro_features_check bash-completion
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
+DEPENDS = "libpng waffle libxkbcommon python3-mako-native python3-numpy-native python3-six-native virtual/egl"
+
+inherit cmake pkgconfig python3native features_check bash-completion
+
+# 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,
@@ -27,24 +35,39 @@ REQUIRED_DISTRO_FEATURES = "x11"
export TEMP = "${B}/temp/"
do_compile[dirs] =+ "${B}/temp/"
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glx', '', d)}"
PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut,"
+PACKAGECONFIG[glx] = "-DPIGLIT_BUILD_GLX_TESTS=ON,-DPIGLIT_BUILD_GLX_TESTS=OFF"
+PACKAGECONFIG[opencl] = "-DPIGLIT_BUILD_CL_TESTS=ON,-DPIGLIT_BUILD_CL_TESTS=OFF,opencl-icd-loader"
+PACKAGECONFIG[x11] = "-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,${X11_DEPS}, ${X11_RDEPS}"
+PACKAGECONFIG[vulkan] = "-DPIGLIT_BUILD_VK_TESTS=ON,-DPIGLIT_BUILD_VK_TESTS=OFF,vulkan-loader"
+
+export PIGLIT_BUILD_DIR = "../../../../git"
-do_configure_prepend() {
+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
}
-do_install() {
- oe_runmake -C ${B} 'DESTDIR=${D}' install/strip
-}
+# Forcibly strip because Piglit is *huge*, and don't bother trying to split/strip the result.
+OECMAKE_TARGET_INSTALL = "install/strip"
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
-RDEPENDS_${PN} = "waffle python3 python3-mako python3-json \
- python3-subprocess python3-misc python3-importlib \
+RDEPENDS:${PN} = "waffle waffle-bin python3 python3-mako python3-json \
+ python3-misc \
python3-unixadmin python3-xml python3-multiprocessing \
- python3-six python3-shell python3-io mesa-demos bash \
+ python3-six python3-shell python3-io \
+ python3-netserver bash \
"
-INSANE_SKIP_${PN} += "dev-so already-stripped"
+INSANE_SKIP:${PN} += "dev-so already-stripped"
+
+# As nothing builds against Piglit we don't need to have anything in the
+# sysroot, especially when this is ~2GB of test suite
+SYSROOT_DIRS:remove = "${libdir}"
+
+# Can't be built with ccache
+CCACHE_DISABLE = "1"