~kennylevinsen/seatd-devel

build: set pkgconfig/dependency variables for features v1 APPLIED

Simon Ser: 1
 build: set pkgconfig/dependency variables for features

 1 files changed, 11 insertions(+), 3 deletions(-)
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/21952/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH] build: set pkgconfig/dependency variables for features Export this patch

This allows libseat users to e.g. advise people to chmod a+s the
executable if libseat is built with the builtin backend.

While bumping the Meson version, adjust the scdoc logic to avoid
the following warnings:

    WARNING: Project targeting '>=0.56.0' but tried to use feature deprecated since '0.56.0': Dependency.get_pkgconfig_variable. use Dependency.get_variable(pkgconfig : ...) instead
    WARNING: Project targeting '>=0.56.0' but tried to use feature deprecated since '0.55.0': ExternalProgram.path. use ExternalProgram.full_path() instead
---

There is still one warning about meson.build_root(), but we can't get
rid of it until [1] is available.

[1]: https://github.com/mesonbuild/meson/pull/8629

 meson.build | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index a7e473433530..7a70cb6942fc 100644
--- a/meson.build
+++ b/meson.build
@@ -3,7 +3,7 @@ project(
	'c',
	version: '0.5.0',
	license: 'MIT',
	meson_version: '>=0.53.0',
	meson_version: '>=0.56.0',
	default_options: [
		'c_std=c11',
		'warning_level=3',
@@ -167,18 +167,26 @@ lib = library(

install_headers('include/libseat.h')

libseat_vars = {
	'have_seatd': with_seatd.to_string(),
	'have_logind': logind.found().to_string(),
	'have_builtin': with_builtin.to_string(),
}

pkgconfig = import('pkgconfig')
pkgconfig.generate(lib,
	version: meson.project_version(),
	filebase: 'libseat',
	name: 'libseat',
	description: 'Seat management library',
	variables: libseat_vars,
)

libseat = declare_dependency(
	link_with: lib,
	dependencies: private_deps,
	include_directories: include_directories('include', is_system: true),
	variables: libseat_vars,
)

if with_server
@@ -220,7 +228,7 @@ else
endif

if scdoc.found()
	scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
	scdoc_prog = find_program(scdoc.get_variable(pkgconfig: 'scdoc'), native: true)
	mandir = get_option('mandir')

	foreach src : ['seatd.1.scd']
@@ -233,7 +241,7 @@ if scdoc.found()
			input: 'man/' + src,
			output: output,
			command: [
				'sh', '-c', '@0@ < @INPUT@ > @1@'.format(scdoc_prog.path(), output)
				'sh', '-c', '@0@ < @INPUT@ > @1@'.format(scdoc_prog.full_path(), output)
			],
			install: true,
			install_dir: '@0@/man@1@'.format(mandir, section)
-- 
2.31.1
Applied, thanks!