]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
piglit: add a patch to address host contamination for wayland-scanner
authorAlexander Kanavin <alex@linutronix.de>
Fri, 23 Aug 2024 13:50:24 +0000 (15:50 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 25 Aug 2024 14:36:26 +0000 (15:36 +0100)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/piglit/piglit/0001-CMakeLists.txt-do-not-obtain-wayland-scanner-path-fr.patch [new file with mode: 0644]
meta/recipes-graphics/piglit/piglit_git.bb

diff --git a/meta/recipes-graphics/piglit/piglit/0001-CMakeLists.txt-do-not-obtain-wayland-scanner-path-fr.patch b/meta/recipes-graphics/piglit/piglit/0001-CMakeLists.txt-do-not-obtain-wayland-scanner-path-fr.patch
new file mode 100644 (file)
index 0000000..b47e16a
--- /dev/null
@@ -0,0 +1,38 @@
+From 8f25cdf54e35ab1a174cabf5078784b8e48bda01 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Fri, 23 Aug 2024 15:29:45 +0200
+Subject: [PATCH] CMakeLists.txt: do not obtain wayland-scanner path from
+ pkg-config
+
+cmake can only use target wayland-scanner.pc which (correctly) points to /usr/bin/wayland-scanner
+
+However in cross builds it should be using wayland-scanner from native sysroot,
+otherwise builds will break if wayland-scanner is not installed on the host
+distro.
+
+Upstream-Status: Inappropriate [yocto specific]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ CMakeLists.txt | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d169fb481..8394f5236 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -211,11 +211,7 @@ if(PIGLIT_USE_WAYLAND)
+               message(FATAL_ERROR "Failed to find wayland-protocols XML path")
+       endif()
+-      pkg_check_modules(WaylandScanner REQUIRED wayland-scanner)
+-      pkg_get_variable(WaylandScannerPath wayland-scanner wayland_scanner)
+-      if (NOT WaylandScannerPath)
+-              message(FATAL_ERROR "Failed to find wayland-scanner path from pkg-config")
+-      endif()
++      set(WaylandScannerPath wayland-scanner)
+       add_executable(WaylandScannerExe IMPORTED)
+       set_property(TARGET WaylandScannerExe PROPERTY IMPORTED_LOCATION ${WaylandScannerPath})
+ endif()
+-- 
+2.39.2
+
index a1fd2b8bde153c89a0a9169ba27eb6aff26c10a7..3a2dec34d7e06734875d09576419d0f7fb8a3599 100644 (file)
@@ -10,6 +10,7 @@ SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https;branch=ma
            file://0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \
            file://0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch \
            file://0001-tests-Fix-narrowing-errors-seen-with-clang.patch \
+           file://0001-CMakeLists.txt-do-not-obtain-wayland-scanner-path-fr.patch \
            "
 UPSTREAM_CHECK_COMMITS = "1"