diff options
-rw-r--r-- | meta/recipes-graphics/piglit/piglit/0001-utils-Include-libgen.h-on-musl-linux-systems.patch | 83 | ||||
-rw-r--r-- | meta/recipes-graphics/piglit/piglit_git.bb | 7 |
2 files changed, 3 insertions, 87 deletions
diff --git a/meta/recipes-graphics/piglit/piglit/0001-utils-Include-libgen.h-on-musl-linux-systems.patch b/meta/recipes-graphics/piglit/piglit/0001-utils-Include-libgen.h-on-musl-linux-systems.patch deleted file mode 100644 index 2875dd52ec..0000000000 --- a/meta/recipes-graphics/piglit/piglit/0001-utils-Include-libgen.h-on-musl-linux-systems.patch +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | From 6c852e6ac292008137a6f3a8aa908090bb5b4b11 Mon Sep 17 00:00:00 2001 | ||
2 | From: Erik Faye-Lund <erik.faye-lund@collabora.com> | ||
3 | Date: Tue, 19 Mar 2024 16:34:02 +0100 | ||
4 | Subject: [PATCH] properly check for libgen.h | ||
5 | |||
6 | Some users are reporting that basename is not available when building on | ||
7 | Linux with musl libc. And since the POSIX spec[1] says that basename is | ||
8 | defined in libgen.h, we should include that when available. | ||
9 | |||
10 | So let's properly detect the header, and include it if it exists. This | ||
11 | should hopefully make things a bit more robust. | ||
12 | |||
13 | Since we're also including this from the CL program-tester, let's | ||
14 | rearrange the includes a bit so we know that config.h has been included. | ||
15 | |||
16 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/888] | ||
17 | Reviewed-by: David Heidelberg <david.heidelberg@collabora.com> | ||
18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
19 | --- | ||
20 | CMakeLists.txt | 1 + | ||
21 | tests/cl/program/program-tester.c | 5 ++++- | ||
22 | tests/util/config.h.in | 1 + | ||
23 | tests/util/piglit-util.h | 4 ++-- | ||
24 | 4 files changed, 8 insertions(+), 3 deletions(-) | ||
25 | |||
26 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
27 | index dd2bf67125..5563fe0e20 100644 | ||
28 | --- a/CMakeLists.txt | ||
29 | +++ b/CMakeLists.txt | ||
30 | @@ -492,6 +492,7 @@ check_include_file(unistd.h HAVE_UNISTD_H) | ||
31 | check_include_file(fcntl.h HAVE_FCNTL_H) | ||
32 | check_include_file(linux/sync_file.h HAVE_LINUX_SYNC_FILE_H) | ||
33 | check_include_file(endian.h HAVE_ENDIAN_H) | ||
34 | +check_include_file(libgen.h HAVE_LIBGEN_H) | ||
35 | |||
36 | if(DEFINED PIGLIT_INSTALL_VERSION) | ||
37 | set(PIGLIT_INSTALL_VERSION_SUFFIX | ||
38 | diff --git a/tests/cl/program/program-tester.c b/tests/cl/program/program-tester.c | ||
39 | index 97fe64906d..e47fb5aacc 100644 | ||
40 | --- a/tests/cl/program/program-tester.c | ||
41 | +++ b/tests/cl/program/program-tester.c | ||
42 | @@ -31,10 +31,13 @@ | ||
43 | #include <inttypes.h> | ||
44 | #include <math.h> | ||
45 | #include <regex.h> | ||
46 | -#include <libgen.h> | ||
47 | |||
48 | #include "piglit-framework-cl-program.h" | ||
49 | |||
50 | +#ifdef HAVE_LIBGEN_H | ||
51 | +#include <libgen.h> | ||
52 | +#endif | ||
53 | + | ||
54 | /* Regexes */ | ||
55 | |||
56 | /* | ||
57 | diff --git a/tests/util/config.h.in b/tests/util/config.h.in | ||
58 | index 8ed5af1709..437eb91418 100644 | ||
59 | --- a/tests/util/config.h.in | ||
60 | +++ b/tests/util/config.h.in | ||
61 | @@ -16,3 +16,4 @@ | ||
62 | #cmakedefine HAVE_SYS_RESOURCE_H 1 | ||
63 | #cmakedefine HAVE_UNISTD_H 1 | ||
64 | #cmakedefine HAVE_ENDIAN_H 1 | ||
65 | +#cmakedefine HAVE_LIBGEN_H 1 | ||
66 | diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h | ||
67 | index 4d3606c708..de999980b6 100644 | ||
68 | --- a/tests/util/piglit-util.h | ||
69 | +++ b/tests/util/piglit-util.h | ||
70 | @@ -52,8 +52,8 @@ extern "C" { | ||
71 | #include <math.h> | ||
72 | #include <float.h> | ||
73 | |||
74 | -#if defined(__APPLE__) || defined(__MINGW32__) | ||
75 | -# include "libgen.h" // for basename | ||
76 | +#ifdef HAVE_LIBGEN_H | ||
77 | +# include <libgen.h> // for basename | ||
78 | #elif defined(_MSC_VER) | ||
79 | |||
80 | static inline char * | ||
81 | -- | ||
82 | GitLab | ||
83 | |||
diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb index 99d75e64f8..a1fd2b8bde 100644 --- a/meta/recipes-graphics/piglit/piglit_git.bb +++ b/meta/recipes-graphics/piglit/piglit_git.bb | |||
@@ -10,11 +10,10 @@ SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https;branch=ma | |||
10 | file://0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \ | 10 | file://0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \ |
11 | file://0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch \ | 11 | file://0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch \ |
12 | file://0001-tests-Fix-narrowing-errors-seen-with-clang.patch \ | 12 | file://0001-tests-Fix-narrowing-errors-seen-with-clang.patch \ |
13 | file://0001-utils-Include-libgen.h-on-musl-linux-systems.patch \ | ||
14 | " | 13 | " |
15 | UPSTREAM_CHECK_COMMITS = "1" | 14 | UPSTREAM_CHECK_COMMITS = "1" |
16 | 15 | ||
17 | SRCREV = "22eaf6a91cfd57f7bb3df4e5068c2ac1472d4ec1" | 16 | SRCREV = "c11c9374c1448d01b31e7f724921cc1f4ee2c84c" |
18 | # (when PV goes above 1.0 remove the trailing r) | 17 | # (when PV goes above 1.0 remove the trailing r) |
19 | PV = "1.0+gitr" | 18 | PV = "1.0+gitr" |
20 | 19 | ||
@@ -23,7 +22,7 @@ S = "${WORKDIR}/git" | |||
23 | X11_DEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxrender libglu', '', d)}" | 22 | X11_DEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxrender libglu', '', d)}" |
24 | X11_RDEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa-demos', '', d)}" | 23 | X11_RDEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa-demos', '', d)}" |
25 | 24 | ||
26 | DEPENDS = "libpng waffle libxkbcommon python3-mako-native python3-numpy-native python3-six-native virtual/egl" | 25 | DEPENDS = "libpng waffle libxkbcommon python3-mako-native python3-numpy-native python3-six-native virtual/egl wayland-native wayland-protocols" |
27 | 26 | ||
28 | inherit cmake pkgconfig python3native features_check bash-completion | 27 | inherit cmake pkgconfig python3native features_check bash-completion |
29 | 28 | ||
@@ -40,7 +39,7 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glx', '', | |||
40 | PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut," | 39 | PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut," |
41 | PACKAGECONFIG[glx] = "-DPIGLIT_BUILD_GLX_TESTS=ON,-DPIGLIT_BUILD_GLX_TESTS=OFF" | 40 | PACKAGECONFIG[glx] = "-DPIGLIT_BUILD_GLX_TESTS=ON,-DPIGLIT_BUILD_GLX_TESTS=OFF" |
42 | PACKAGECONFIG[opencl] = "-DPIGLIT_BUILD_CL_TESTS=ON,-DPIGLIT_BUILD_CL_TESTS=OFF,virtual/opencl-icd" | 41 | PACKAGECONFIG[opencl] = "-DPIGLIT_BUILD_CL_TESTS=ON,-DPIGLIT_BUILD_CL_TESTS=OFF,virtual/opencl-icd" |
43 | PACKAGECONFIG[x11] = "-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,${X11_DEPS}, ${X11_RDEPS}" | 42 | PACKAGECONFIG[x11] = "-DPIGLIT_USE_X11=1 -DPIGLIT_BUILD_GL_TESTS=ON -DPIGLIT_BUILD_DMA_BUF_TESTS=ON,-DPIGLIT_USE_X11=0 -DPIGLIT_BUILD_GL_TESTS=OFF -DPIGLIT_BUILD_DMA_BUF_TESTS=OFF,${X11_DEPS}, ${X11_RDEPS}" |
44 | PACKAGECONFIG[vulkan] = "-DPIGLIT_BUILD_VK_TESTS=ON,-DPIGLIT_BUILD_VK_TESTS=OFF,glslang-native vulkan-loader,glslang" | 43 | PACKAGECONFIG[vulkan] = "-DPIGLIT_BUILD_VK_TESTS=ON,-DPIGLIT_BUILD_VK_TESTS=OFF,glslang-native vulkan-loader,glslang" |
45 | 44 | ||
46 | export PIGLIT_BUILD_DIR = "../../../../git" | 45 | export PIGLIT_BUILD_DIR = "../../../../git" |