Build vulkan hw drivers only if with_vulkan_hw is true

Mirrors `with_hardware` in behaviour but the implementation differs to
ensure that zink is only build when vulkan hardware drivers are built.
Without this change packaging with `with_vulkan_hw` fails due to extra
files since mesa still builds the vulkan drivers.

Fixes a typo in `%global with_nvk %{with vulkan_hw}`(sic).
This commit is contained in:
Janne Grunau 2023-11-28 22:39:54 +01:00 committed by Janne Grunau
parent c38461a69f
commit 150367619f

View file

@ -9,11 +9,13 @@
%global with_r300 1 %global with_r300 1
%global with_r600 1 %global with_r600 1
%global with_nine 1 %global with_nine 1
%global with_nvk %{with vulkan_hw} %if 0%{?with_vulkan_hw}
%global with_nvk %{with_vulkan_hw}
%endif
%global with_omx 1 %global with_omx 1
%global with_opencl 1 %global with_opencl 1
%endif %endif
%global base_vulkan ,amd %global base_vulkan %{?with_vulkan_hw:,amd}%{!?with_vulkan_hw:%{nil}}
%endif %endif
%ifnarch %{ix86} %ifnarch %{ix86}
@ -28,11 +30,13 @@
%global with_iris 1 %global with_iris 1
%global with_xa 1 %global with_xa 1
%global with_intel_clc 1 %global with_intel_clc 1
%global intel_platform_vulkan ,intel,intel_hasvk %global intel_platform_vulkan %{?with_vulkan_hw:,intel,intel_hasvk}%{!?with_vulkan_hw:%{nil}}
%endif %endif
%ifarch x86_64 %ifarch x86_64
%if !0%{?with_vulkan_hw}
%global with_intel_vk_rt 1 %global with_intel_vk_rt 1
%endif %endif
%endif
%ifarch aarch64 x86_64 %{ix86} %ifarch aarch64 x86_64 %{ix86}
%if !0%{?rhel} %if !0%{?rhel}
@ -46,7 +50,7 @@
%global with_tegra 1 %global with_tegra 1
%global with_v3d 1 %global with_v3d 1
%global with_xa 1 %global with_xa 1
%global extra_platform_vulkan ,broadcom,freedreno,panfrost,imagination-experimental %global extra_platform_vulkan %{?with_vulkan_hw:,broadcom,freedreno,panfrost,imagination-experimental}%{!?with_vulkan_hw:%{nil}}
%endif %endif
%if !0%{?rhel} %if !0%{?rhel}