it's better to provide the user with this choice instead of
unconditionally magically depending on it
---
Good afternoon!
I'm packaging Basu for Gentoo for use with xdg-desktop-portal-wlr, and I
noticed these two quirks in the build system. These required
patching/workarounds according to Gentoo policies, and are a general QoL
improvement, which I think is worth upstreaming.
Thank you in advance
meson.build | 2 +-meson_options.txt | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 056c7c4..357b346 100644
--- a/meson.build+++ b/meson.build
@@ -231,7 +231,7 @@ threads = dependency('threads')
librt = cc.find_library('rt')
libm = cc.find_library('m')
-libcap = dependency('libcap', required: false)+libcap = dependency('libcap', required: get_option('libcap'))have_libcap = libcap.found()
conf.set10('HAVE_LIBCAP', have_libcap)
diff --git a/meson_options.txt b/meson_options.txt
index 8cf3a33..ae5c7b1 100644
--- a/meson_options.txt+++ b/meson_options.txt
@@ -14,3 +14,6 @@ option('system-bus-address', type : 'string',
option('audit', type : 'combo', choices : ['auto', 'true', 'false'],
description : 'libaudit support')
++option('libcap', type : 'feature',+ description : 'libcap support')
--
2.32.0
[PATCH basu 2/2] meson: convert audit option to feature object