From 3e6926f82a2e1d60ee34f335ea240c8b25558070 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Wed, 1 Dec 2021 19:06:48 +0100 Subject: [PATCH] build: transform all options to feature options According to @eli-schwartz review https://github.com/profanity-im/profanity/pull/1619#discussion_r760421795: ``` "notifications" is a feature object. When configured with -Dnotifications=disabled it logs: Dependency libnotify skipped: feature notifications disabled [...] notifications : disabled and builds without support. pgp is a boolean option, which IMHO it shouldn't be. When configured with -Dpgp=false it logs: Run-time dependency gpgme found: YES 1.16.0 [...] pgp : false which is contradictory and misleading, because it was available and detected, just not required. So it tries to build with PGP support. BUILD_PGP is the Makefile.am define, not the C define. This should set HAVE_LIBGPGME. Later, in core_sources_c, check if pgp_dep.found() and add 'src/pgp/gpg.c' as an additional source. ``` --- meson_options.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/meson_options.txt b/meson_options.txt index 994ee073..72e5aa3f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,9 +1,9 @@ option('notifications', type: 'feature', value: 'auto', description: 'enable desktop notifications') -option('python-plugins', type : 'boolean', value : 'false', description : 'enable Python plugins') -option('c-plugins', type : 'boolean', value : 'false', description : 'enable C plugins') -option('plugins', type : 'boolean', value : 'false', description : 'enable plugins') -option('otr', type : 'boolean', value : 'false', description : 'OTR encryption') -option('pgp', type : 'boolean', value : 'false', description : 'PGP encryption') -option('omemo', type : 'boolean', value : 'false', description : 'OMEMO encryption') -option('xscreensaver', type : 'boolean', value : 'false', description : 'use libXScrnSaver to determine idle time') -option('icons-and-clipboard', type : 'boolean', value : 'false', description : 'enable GTK tray icons and clipboard paste support') +option('python-plugins', type : 'feature', value : 'auto', description : 'enable Python plugins') +option('c-plugins', type : 'feature', value : 'auto', description : 'enable C plugins') +option('plugins', type : 'feature', value : 'auto', description : 'enable plugins') +option('otr', type : 'feature', value : 'auto', description : 'OTR encryption') +option('pgp', type : 'feature', value : 'auto', description : 'PGP encryption') +option('omemo', type : 'feature', value : 'auto', description : 'OMEMO encryption') +option('xscreensaver', type : 'feature', value : 'auto', description : 'use libXScrnSaver to determine idle time') +option('icons-and-clipboard', type : 'feature', value : 'auto', description : 'enable GTK tray icons and clipboard paste support')