gentoo/sys-apps/fwupd/files/fwupd-2.0.18-elogind.patch
Sam James a3eab6f3f8
sys-apps/fwupd: add 2.0.18
Signed-off-by: Sam James <sam@gentoo.org>
2025-12-02 12:30:13 +00:00

50 lines
1.3 KiB
Diff

--- a/meson.build
+++ b/meson.build
@@ -713,6 +713,11 @@ if libsystemd.found()
endif
endif
+elogind = dependency('systemd', 'libelogind', required: get_option('elogind'))
+if elogind.found()
+ conf.set('HAVE_LOGIND' , '1')
+endif
+
supported_build = get_option('supported_build').disable_auto_if(not tag).allowed()
if supported_build
conf.set('SUPPORTED_BUILD', '1')
@@ -940,6 +945,7 @@ summary(
'dbus_socket_address': get_option('dbus_socket_address'),
'vendor_ids_dir': vendor_ids_dir,
'docs': build_docs,
+ 'elogind': elogind,
'gnutls': gnutls,
'introspection': introspection.allowed(),
'libblkid': libblkid,
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -48,6 +48,10 @@ option(
type: 'string',
description: 'the hardcoded name of OS directory in ESP, e.g. fedora',
)
+option('elogind',
+ type: 'feature',
+ description: 'elogind support',
+)
option(
'firmware-packager',
type: 'boolean',
--- a/plugins/logind/meson.build
+++ b/plugins/logind/meson.build
@@ -1,4 +1,4 @@
-libsystemd.found() or subdir_done()
+if libsystemd.found() or elogind.found()
cargs = ['-DG_LOG_DOMAIN="FuPluginLogind"']
plugins += {meson.current_source_dir().split('/')[-1]: true}
@@ -12,3 +12,5 @@ plugin_builtins += static_library('fu_plugin_logind',
c_args: cargs,
dependencies: plugin_deps,
)
+
+endif