Files
gentoo/dev-util/umockdev/files/umockdev-0.19.7-selinux-automagic.patch
Sam James 453d21ba29 dev-util/umockdev: avoid automagic SELinux
Signed-off-by: Sam James <sam@gentoo.org>
2026-05-19 03:06:18 +01:00

30 lines
950 B
Diff

--- a/meson.build
+++ b/meson.build
@@ -84,11 +84,10 @@ meson.add_dist_script(srcdir / 'getversion.sh')
optional_defines = []
dl = cc.find_library('dl')
-selinux = cc.find_library('libselinux', required: false)
-if selinux.found()
- if cc.check_header('selinux/selinux.h')
- optional_defines += ['--define=HAVE_SELINUX']
- endif
+selinux = cc.find_library('libselinux', required: get_option('selinux'))
+selinux_header = cc.check_header('selinux/selinux.h', required: get_option('selinux'))
+if get_option('selinux').enabled()
+ optional_defines += ['--define=HAVE_SELINUX']
endif
glib = dependency('glib-2.0', version: '>= 2.32.0')
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -2,3 +2,8 @@ option('gtk_doc',
type : 'boolean',
value : false,
description : 'use gtk-doc to build documentation')
+
+option('selinux',
+ type : 'feature',
+ value : 'auto',
+ description : 'SELinux support')