diff options
Diffstat (limited to 'meta/recipes-graphics/piglit')
6 files changed, 172 insertions, 45 deletions
diff --git a/meta/recipes-graphics/piglit/piglit/0001-Add-a-missing-include-for-htobe32-definition.patch b/meta/recipes-graphics/piglit/piglit/0001-Add-a-missing-include-for-htobe32-definition.patch new file mode 100644 index 0000000000..7b0cb17925 --- /dev/null +++ b/meta/recipes-graphics/piglit/piglit/0001-Add-a-missing-include-for-htobe32-definition.patch @@ -0,0 +1,27 @@ +From d623e9797b7ee9b3739a8a4afe1a01f7e03754aa Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Sun, 1 Nov 2020 20:08:49 +0000 +Subject: [PATCH] Add a missing include for htobe32 definition + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/609] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + tests/spec/nv_copy_depth_to_color/nv_copy_depth_to_color.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/spec/nv_copy_depth_to_color/nv_copy_depth_to_color.c b/tests/spec/nv_copy_depth_to_color/nv_copy_depth_to_color.c +index 5f45e0c23..c755ee29a 100644 +--- a/tests/spec/nv_copy_depth_to_color/nv_copy_depth_to_color.c ++++ b/tests/spec/nv_copy_depth_to_color/nv_copy_depth_to_color.c +@@ -34,6 +34,8 @@ + + #include "piglit-util-gl.h" + ++#include <endian.h> ++ + #define IMAGE_WIDTH 60 + #define IMAGE_HEIGHT 60 + +-- +2.17.1 + diff --git a/meta/recipes-graphics/piglit/piglit/0001-cmake-install-bash-completions-in-the-right-place.patch b/meta/recipes-graphics/piglit/piglit/0001-cmake-install-bash-completions-in-the-right-place.patch new file mode 100644 index 0000000000..e07e810a73 --- /dev/null +++ b/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/meta/recipes-graphics/piglit/piglit/0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch b/meta/recipes-graphics/piglit/piglit/0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch new file mode 100644 index 0000000000..5d6ec368ba --- /dev/null +++ b/meta/recipes-graphics/piglit/piglit/0001-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/0001-tests-Fix-missing-include-of-Xutil.h.patch b/meta/recipes-graphics/piglit/piglit/0001-tests-Fix-missing-include-of-Xutil.h.patch deleted file mode 100644 index c27cc04f01..0000000000 --- a/meta/recipes-graphics/piglit/piglit/0001-tests-Fix-missing-include-of-Xutil.h.patch +++ /dev/null @@ -1,28 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> - -From e40e0a25f996d2e205c4bdec2c8a5cc7f74e5065 Mon Sep 17 00:00:00 2001 -From: Otavio Salvador <otavio@ossystems.com.br> -Date: Mon, 15 Jun 2015 16:25:30 -0300 -Subject: tests: Fix missing include of Xutil.h - -The EGL tests rely on Xutil.h being included. Some EGL implementation -does not explitly include it by default and then the build fails. - -Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> -Reviewed-by: Neil Roberts <neil@linux.intel.com> - -diff --git a/tests/egl/egl-configless-context.c b/tests/egl/egl-configless-context.c -index 0504a26..154b55c 100644 ---- a/tests/egl/egl-configless-context.c -+++ b/tests/egl/egl-configless-context.c -@@ -32,6 +32,7 @@ - /* Chunks of code in this file are taken from egl-util.c */ - - #include <X11/Xlib.h> -+#include <X11/Xutil.h> - - #include "piglit-util-gl.h" - #include "piglit-util-egl.h" --- -cgit v0.10.2 diff --git a/meta/recipes-graphics/piglit/piglit/0002-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch b/meta/recipes-graphics/piglit/piglit/0002-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/0002-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 0d825c9818..865eb4c272 100644 --- a/meta/recipes-graphics/piglit/piglit_git.bb +++ b/meta/recipes-graphics/piglit/piglit_git.bb @@ -1,39 +1,70 @@ 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 \ - file://0001-tests-Fix-missing-include-of-Xutil.h.patch" +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-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \ + file://0001-Add-a-missing-include-for-htobe32-definition.patch \ + file://0002-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch \ + " +UPSTREAM_CHECK_COMMITS = "1" -# From 2014/12/04 -SRCREV = "126c7d049b8f32e541625d5a35fbc5f5e4e7fbf8" +SRCREV = "2f80c7cc9c02d37574dc8ba3140b7dd8eb3cbf82" # (when PV goes above 1.0 remove the trailing r) PV = "1.0+gitr${SRCPV}" S = "${WORKDIR}/git" -DEPENDS = "virtual/libx11 libxrender waffle virtual/libgl libglu python-mako-native python-numpy-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 pythonnative distro_features_check -# depends on virtual/libx11 -REQUIRED_DISTRO_FEATURES = "x11" +DEPENDS = "libpng waffle libxkbcommon virtual/libgl python3-mako-native python3-numpy-native python3-six-native virtual/egl" -PACKAGECONFIG ??= "" +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, +# so tell it to use a directory in ${B} to avoid overwriting. +export TEMP = "${B}/temp/" +do_compile[dirs] =+ "${B}/temp/" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut," +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" -do_configure_prepend() { +export PIGLIT_BUILD_DIR = "../../../../git" + +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 } -FILES_${PN}-dbg += "${libdir}/piglit/*/.debug/" +# Forcibly strip because Piglit is *huge* +OECMAKE_TARGET_INSTALL = "install/strip" -RDEPENDS_${PN} = "waffle python python-mako python-json python-subprocess \ - python-argparse python-importlib python-unixadmin \ - python-multiprocessing python-textutils python-netserver python-shell \ - mesa-demos bash \ +RDEPENDS:${PN} = "waffle waffle-bin python3 python3-mako python3-json \ + python3-misc \ + python3-unixadmin python3-xml python3-multiprocessing \ + python3-six python3-shell python3-io \ + python3-netserver bash \ " -INSANE_SKIP_${PN} += "dev-so" +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" |