From 43abc59a275e0b37499fe99edf3afc68b1c594f4 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Wed, 9 Aug 2023 18:15:29 +0200 Subject: meson: Use feature options By using meson features we can replace the handcrafted dependency auto-detection by just passing the value from get_option directly to the required arg for dependency, find_library etc. 'auto' features make the dependency optional, 'enabled' requires it while 'disabled' features will skip detection entirely. Any skipped or not found dependency will just be a no-op when passed to build steps and therefore we can also skip the creation of empty vars. The use of skip_deps for these is dropped here as meson provides a way to disable all optional features in one go by passing '-Dauto_features=disabled'. --- mkosi.presets/base/mkosi.build | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'mkosi.presets') diff --git a/mkosi.presets/base/mkosi.build b/mkosi.presets/base/mkosi.build index d75f1425a5..f2a7560070 100755 --- a/mkosi.presets/base/mkosi.build +++ b/mkosi.presets/base/mkosi.build @@ -117,38 +117,38 @@ if [ ! -f "$BUILDDIR"/build.ninja ]; then -D xdg-autostart=true -D translations=true -D polkit=true - -D acl=true - -D audit=true - -D blkid=true + -D acl=enabled + -D audit=enabled + -D blkid=enabled -D fdisk=true - -D kmod=true + -D kmod=enabled -D pam=true -D pwquality=true - -D microhttpd=true + -D microhttpd=enabled -D libcryptsetup=true - -D libcurl=true + -D libcurl=enabled -D idn=true -D libidn2=true - -D qrencode=true + -D qrencode=enabled -D gcrypt=true - -D gnutls=true - -D openssl=true + -D gnutls=enabled + -D openssl=enabled -D cryptolib=openssl - -D p11kit=true + -D p11kit=enabled -D libfido2=true - -D tpm2=true - -D elfutils=true - -D zstd=true - -D xkbcommon=true - -D pcre2=true - -D glib=true + -D tpm2=enabled + -D elfutils=enabled + -D zstd=enabled + -D xkbcommon=enabled + -D pcre2=enabled + -D glib=enabled -D dbus=true -D bootloader=true -D kernel-install=true -D analyze=true -D bpf-framework=true -D ukify="$UKIFY" - -D seccomp=true + -D seccomp=enabled -D selinux=auto -D apparmor=auto -D smack=true -- cgit v1.2.3