From 32006fba162964c9eadc66a32d730d97c13ef34d5fe3ef22da08070468886f64 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Mon, 23 Sep 2024 10:32:02 +0000 Subject: [PATCH] - Add u_fix-llvm19-build.patch to fix build with LLVM 19 on ARM. - Update minimum version requirements based on meson.build. - Fix build on s390x: apparently we don't have libvdpau_gallium.so. OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=1329 --- Mesa.changes | 7 +++++++ Mesa.spec | 18 ++++++++++-------- u_fix-llvm19-build.patch | 17 +++++++++++++++++ 3 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 u_fix-llvm19-build.patch diff --git a/Mesa.changes b/Mesa.changes index 875f253..83aa9c7 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun Sep 22 12:02:17 UTC 2024 - Aaron Puchert + +- Add u_fix-llvm19-build.patch to fix build with LLVM 19 on ARM. +- Update minimum version requirements based on meson.build. +- Fix build on s390x: apparently we don't have libvdpau_gallium.so. + ------------------------------------------------------------------- Fri Sep 13 17:39:59 UTC 2024 - Marcus Rueckert diff --git a/Mesa.spec b/Mesa.spec index f691527..f90a1cc 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -179,13 +179,14 @@ Patch12: u_0002-intel-genxml-Add-a-untyped-OrderedDict-fallback-for-.patc Patch13: python36-buildfix1.patch Patch14: python36-buildfix2.patch Patch15: u_fix_rust_bindgen.patch +Patch16: u_fix-llvm19-build.patch # never to be upstreamed Patch54: n_drirc-disable-rgb10-for-chromium-on-amd.patch Patch58: u_dep_xcb.patch Patch100: U_fix-mpeg1_2-decode-mesa-20.2.patch Patch400: n_stop-iris-flicker.patch %ifarch %{ix86} x86_64 -BuildRequires: DirectX-Headers +BuildRequires: DirectX-Headers >= 1.613.0 %endif BuildRequires: bison BuildRequires: cmake @@ -200,7 +201,7 @@ BuildRequires: glslang-devel BuildRequires: imake BuildRequires: libtool BuildRequires: memory-constraints -BuildRequires: meson >= 0.60 +BuildRequires: meson >= 1.1.0 BuildRequires: pkgconfig BuildRequires: python3-base # dataclasses is in standard library of python >= 3.7 @@ -214,18 +215,18 @@ BuildRequires: pkgconfig(dri2proto) BuildRequires: pkgconfig(dri3proto) BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(glproto) -BuildRequires: pkgconfig(libdrm) >= 2.4.75 -BuildRequires: pkgconfig(libdrm_amdgpu) >= 2.4.95 +BuildRequires: pkgconfig(libdrm) >= 2.4.109 +BuildRequires: pkgconfig(libdrm_amdgpu) >= 2.4.121 BuildRequires: pkgconfig(libdrm_nouveau) >= 2.4.66 BuildRequires: pkgconfig(libdrm_radeon) >= 2.4.71 -BuildRequires: pkgconfig(libglvnd) >= 0.1.0 +BuildRequires: pkgconfig(libglvnd) >= 1.3.2 %ifarch aarch64 x86_64 ppc64le s390x riscv64 BuildRequires: pkgconfig(valgrind) %endif BuildRequires: pkgconfig(libva) BuildRequires: pkgconfig(presentproto) %if "%{flavor}" == "drivers" -BuildRequires: pkgconfig(vdpau) >= 1.1 +BuildRequires: pkgconfig(vdpau) >= 1.5 %ifarch %{ix86} x86_64 BuildRequires: pkgconfig(vulkan) %endif @@ -281,7 +282,7 @@ BuildRequires: pkgconfig(wayland-protocols) >= 1.8 BuildRequires: pkgconfig(wayland-server) >= 1.11 %if 0%{with_llvm} %if 0%{?suse_version} >= 1550 -BuildRequires: llvm-devel +BuildRequires: llvm-devel >= 15 %else %if 0%{?sle_version} >= 150500 BuildRequires: llvm18-devel @@ -840,6 +841,7 @@ cp %{SOURCE6} subprojects/packagecache/ %patch -P 14 -p1 %endif %patch -P 15 -p1 +%patch -P 16 -p1 # no longer needed since gstreamer-plugins-vaapi 1.18.4 %if 0%{?suse_version} < 1550 %patch -P 54 -p1 @@ -1158,10 +1160,10 @@ echo "The \"Mesa\" package does not have the ability to render, but is supplemen %{_includedir}/xa_*.h %{_libdir}/libxatracker.so %{_libdir}/pkgconfig/xatracker.pc -%endif %files -n libvdpau_gallium %{_libdir}/vdpau/libvdpau_gallium.so.1.0.0 +%endif %if %{vdpau_nouveau} %files -n libvdpau_nouveau diff --git a/u_fix-llvm19-build.patch b/u_fix-llvm19-build.patch new file mode 100644 index 0000000..7fcdae0 --- /dev/null +++ b/u_fix-llvm19-build.patch @@ -0,0 +1,17 @@ +diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +index e5f4dfc829f..72e78e00ba4 100644 +--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp ++++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +@@ -329,8 +329,12 @@ lp_build_fill_mattrs(std::vector &MAttrs) + * which allows us to enable/disable code generation based + * on the results of cpuid on these architectures. + */ ++#if LLVM_VERSION_MAJOR >= 19 ++ llvm::StringMap features = llvm::sys::getHostCPUFeatures(); ++#else + llvm::StringMap features; + llvm::sys::getHostCPUFeatures(features); ++#endif + + for (llvm::StringMapIterator f = features.begin(); + f != features.end();