From e495878d06e99d94f059ed4e53b1cf9257fb3a40 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 30 Jun 2023 00:10:16 -0400 Subject: [PATCH] Disable libunwind, lm_sensors in RHEL builds --- mesa.spec | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/mesa.spec b/mesa.spec index d19eb6d..4525ffb 100644 --- a/mesa.spec +++ b/mesa.spec @@ -46,6 +46,11 @@ %global with_vmware 1 %endif +%if !0%{?rhel} +%global with_libunwind 1 +%global with_lmsensors 1 +%endif + %ifarch %{valgrind_arches} %bcond_without valgrind %else @@ -81,7 +86,9 @@ BuildRequires: kernel-headers # SRPMs for each arch still have the same build dependencies. See: # https://bugzilla.redhat.com/show_bug.cgi?id=1859515 BuildRequires: pkgconfig(libdrm) >= 2.4.97 +%if 0%{?with_libunwind} BuildRequires: pkgconfig(libunwind) +%endif BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(zlib) >= 1.2.3 BuildRequires: pkgconfig(libzstd) @@ -111,7 +118,9 @@ BuildRequires: pkgconfig(xcb-randr) BuildRequires: pkgconfig(xrandr) >= 1.3 BuildRequires: bison BuildRequires: flex +%if 0%{?with_lmsensors} BuildRequires: lm_sensors-devel +%endif %if 0%{?with_vdpau} BuildRequires: pkgconfig(vdpau) >= 1.1 %endif @@ -397,6 +406,12 @@ export RUSTFLAGS="%build_rustflags" -Dvalgrind=%{?with_valgrind:enabled}%{!?with_valgrind:disabled} \ -Dbuild-tests=false \ -Dselinux=true \ +%if !0%{?with_libunwind} + -Dlibunwind=disabled \ +%endif +%if !0%{?with_lmsensors} + -Dlmsensors=disabled \ +%endif -Dandroid-libbacktrace=disabled \ %{nil} %meson_build