From 04d40eda6c298ad12532ecfe3c1e41a9df4d98f0 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 10 Nov 2022 06:19:40 +1000 Subject: [PATCH] fix bcond for meson changes --- libdrm.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libdrm.spec b/libdrm.spec index 38cdb90..ef4771f 100644 --- a/libdrm.spec +++ b/libdrm.spec @@ -1,4 +1,11 @@ %define bcond_meson() %{lua: do + local option = rpm.expand("%{1}") + local with = rpm.expand("%{?with_" .. option .. "}") + local value = (with ~= '') and "enabled" or "disabled" + option = option:gsub('_', '-') + print(string.format("-D%s=%s", option, value)) +end} +%define bcond_meson_tf() %{lua: do local option = rpm.expand("%{1}") local with = rpm.expand("%{?with_" .. option .. "}") local value = (with ~= '') and "true" or "false" @@ -121,9 +128,9 @@ Utility programs for the kernel DRM interface. Will void your warranty. %{bcond_meson cairo_tests} \ %{bcond_meson man_pages} \ %{bcond_meson valgrind} \ - %{bcond_meson freedreno_kgsl} \ - %{bcond_meson install_test_programs} \ - %{bcond_meson udev} \ + %{bcond_meson_tf freedreno_kgsl} \ + %{bcond_meson_tf install_test_programs} \ + %{bcond_meson_tf udev} \ %{nil} %meson_build