~kennylevinsen/seatd-devel

seatd: build: add prefix to libseat options v1 APPLIED

Simon Ser: 1
 build: add prefix to libseat options

 2 files changed, 14 insertions(+), 14 deletions(-)
build pending: smoketest-builtin.sh
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~kennylevinsen/seatd-devel/patches/23441/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH seatd] build: add prefix to libseat options Export this patch

The option names are a little bit confusing, because it's not clear
which ones toggle libseat features, and which ones toggle seatd
features.

Add a "libseat-" prefix to libseat-specific features, to make it
more obvious that they only are about the library.
---
 meson.build       | 22 +++++++++++-----------
 meson_options.txt |  6 +++---
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/meson.build b/meson.build
index 89fa8dfeb609..9d4870694a83 100644
--- a/meson.build
+++ b/meson.build
@@ -102,8 +102,8 @@ server_files = [
	'seatd/server.c',
]

with_seatd = get_option('seatd') == 'enabled'
with_builtin = get_option('builtin') == 'enabled'
with_seatd = get_option('libseat-seatd') == 'enabled'
with_builtin = get_option('libseat-builtin') == 'enabled'
with_server = get_option('server') == 'enabled'

if with_seatd or with_builtin
@@ -116,11 +116,11 @@ endif

logind = disabler()
logind_provider = ''
if get_option('logind') != 'disabled'
	if get_option('logind') == 'auto' and get_option('auto_features').disabled()
if get_option('libseat-logind') != 'disabled'
	if get_option('libseat-logind') == 'auto' and get_option('auto_features').disabled()
		# Disable logind
	elif get_option('logind') == 'auto'
		assert(get_option('auto_features').auto(), '-Dlogind must be set to systemd or elogind since auto_features != auto')
	elif get_option('libseat-logind') == 'auto'
		assert(get_option('auto_features').auto(), '-Dlibseat-logind must be set to systemd or elogind since auto_features != auto')
		foreach logind_provider : ['elogind', 'systemd']
			logind = dependency('lib@0@'.format(logind_provider), required: false)
			if logind.found()
@@ -128,7 +128,7 @@ if get_option('logind') != 'disabled'
			endif
		endforeach
	else
		logind_provider = get_option('logind')
		logind_provider = get_option('libseat-logind')
		logind = dependency('lib@0@'.format(logind_provider))
	endif

@@ -258,9 +258,9 @@ if scdoc.found()
endif

summary({
	'seatd': with_seatd,
	'builtin': with_builtin,
	'libseat-seatd': with_seatd,
	'libseat-builtin': with_builtin,
	'libseat-systemd': logind.found() and logind_provider == 'systemd',
	'libseat-elogind': logind.found() and logind_provider == 'elogind',
	'server': with_server,
	'systemd': logind.found() and logind_provider == 'systemd',
	'elogind': logind.found() and logind_provider == 'elogind',
}, bool_yn: true)
diff --git a/meson_options.txt b/meson_options.txt
index 144ce7a1644c..0731ac4cba37 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,6 +1,6 @@
option('logind', type: 'combo', choices: ['auto', 'disabled', 'elogind', 'systemd'], value: 'auto', description: 'logind support')
option('seatd', type: 'combo', choices: ['enabled', 'disabled'], value: 'enabled', description: 'seatd support')
option('builtin', type: 'combo', choices: ['enabled', 'disabled'], value: 'disabled', description: 'builtin seatd server')
option('libseat-logind', type: 'combo', choices: ['auto', 'disabled', 'elogind', 'systemd'], value: 'auto', description: 'logind support for libseat')
option('libseat-seatd', type: 'combo', choices: ['enabled', 'disabled'], value: 'enabled', description: 'seatd support for libseat')
option('libseat-builtin', type: 'combo', choices: ['enabled', 'disabled'], value: 'disabled', description: 'built-in seatd server for libseat')
option('server', type: 'combo', choices: ['enabled', 'disabled'], value: 'enabled', description: 'seatd server')
option('examples', type: 'combo', choices: ['enabled', 'disabled'], value: 'disabled', description: 'libseat example programs')
option('man-pages', type: 'feature', value: 'auto', description: 'Generate and install man pages')
-- 
2.32.0
Applied, thanks!