%global commit fb2884b0835a25a1bd53f1163858c653d8b1c06d %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global commitdate 20261123 # libpiglitutil*.so are private libraries in %%{_libdir}/piglit/lib; # do not advertise them as system-wide Provides/Requires %global __provides_exclude_from ^%{_libdir}/%{name}/.*$ %global __requires_exclude ^libpiglitutil.*\\.so.*$ Name: piglit Version: 1^%{commitdate}git%{shortcommit} Release: %autorelease Summary: Automated test suite for OpenCL implementations # Licensing of the files installed in the binary package: # Main code: MIT # tests/glslparsertest/glsl2/gst-gl-*: LGPL-2.0-or-later # tests/glslparsertest/glsl2/norsetto-*: GPL-3.0-only # tests/glslparsertest/glsl2/{xreal,xonotic}-*, tests/shaders/glsl-gnome-shell-*: GPL-2.0-or-later # tests/glslparsertest/shaders/*: BSD-3-Clause # tests/cl/program/execute/gegl-*.cl: LGPL-3.0-or-later # tests/spec/glsl-1.20/execution/fs-array-deref-then-write.shader_test: MIT-Khronos-old License: MIT AND BSD-3-Clause AND GPL-2.0-or-later AND GPL-3.0-only AND LGPL-2.0-or-later AND LGPL-3.0-or-later AND MIT-Khronos-old URL: https://gitlab.freedesktop.org/mesa/piglit Source0: %{url}/-/archive/%{commit}/%{name}-%{commit}.tar.gz # Python 3.14.10+ gzip.GzipFile range-checks mtime before int() conversion, # so SOURCE_DATE_EPOCH (a string) raises TypeError during the build. # TODO: add upstream MR link (GPU-5679) Patch0: fix-serializer-mtime-type.patch # GLUT is not needed for CL-only builds without waffle. # TODO: add upstream MR link (GPU-5679) Patch1: fix-glut-optional.patch BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: ninja-build BuildRequires: python3-devel BuildRequires: python3-numpy BuildRequires: python3-mako BuildRequires: python3-lxml BuildRequires: opencl-headers BuildRequires: ocl-icd-devel BuildRequires: pkgconfig(bash-completion) Requires: python3-numpy Requires: python3-mako Requires: python3-lxml %description Piglit is a collection of automated tests for OpenGL and OpenCL implementations, developed as part of the Mesa project. This package is built with the OpenCL tests only, for conformance and regression testing of OpenCL runtimes such as rusticl and intel-compute-runtime. The OpenGL, OpenGL ES and Vulkan test binaries are not built. %prep %autosetup -n %{name}-%{commit} -p1 %py3_shebang_fix . %build %cmake -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DPIGLIT_BUILD_CL_TESTS=ON \ -DPIGLIT_BUILD_GL_TESTS=OFF \ -DPIGLIT_BUILD_GLES1_TESTS=OFF \ -DPIGLIT_BUILD_GLES2_TESTS=OFF \ -DPIGLIT_BUILD_GLES3_TESTS=OFF \ -DPIGLIT_BUILD_VK_TESTS=OFF \ -DPIGLIT_BUILD_DMA_BUF_TESTS=OFF \ -DPIGLIT_BUILD_GLX_TESTS=OFF \ -DPIGLIT_BUILD_EGL_TESTS=OFF \ -DPIGLIT_USE_WAFFLE=OFF \ -DPIGLIT_USE_GBM=OFF \ -DPIGLIT_USE_WAYLAND=OFF \ -DPIGLIT_USE_X11=OFF %cmake_build %install %cmake_install # Upstream installs COPYING into the docdir too; it is shipped via %%license rm %{buildroot}%{_docdir}/%{name}/COPYING # Helper scripts installed without the executable bit are not meant to be # run directly; drop their shebangs find %{buildroot}%{_libdir}/%{name} -name '*.py' ! -perm -u+x \ -exec sed -i '1{/^#!/d}' {} + # Python modules live in a private directory, so byte-compile them explicitly %py_byte_compile %{python3} %{buildroot}%{_libdir}/%{name} %check # The OpenCL tests need an OpenCL device and cannot run in the build # environment; only check that the runner starts. %{buildroot}%{_bindir}/%{name} --help >/dev/null %files %license COPYING licences/GPL-2 licences/GPL-3 licences/LGPL-2 %doc README.md %{_bindir}/%{name} %{_libdir}/%{name}/ %{_datadir}/doc/%{name}/ %{bash_completions_dir}/%{name} %changelog %autochangelog