meson: Add option to use libelogind for DBus

Signed-off-by: xuxinyu <xuxinyu@xfusion.com>
This commit is contained in:
xuxinyu 2023-01-05 21:12:39 +08:00
parent aaf4021092
commit 64b746cf30
2 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,44 @@
From 1be0810b695a88407bca084a12063b78a719345e Mon Sep 17 00:00:00 2001
From: Benjamin Berg <bberg@redhat.com>
Date: Tue, 24 May 2022 15:31:31 +0200
Subject: [PATCH 05/14] meson: Add option to use libelogind for DBus
Co-authored-by: Matthew Thode <prometheanfire@gentoo.org>
Co-authored-by: Fabio Bas <fabio.bas@officineinformatiche.net>
---
meson.build | 2 +-
meson_options.txt | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 159f0e8..93f9655 100644
--- a/meson.build
+++ b/meson.build
@@ -92,7 +92,7 @@ gmodule_dep = dependency('gmodule-2.0', version: '>=' + glib_min_version)
libfprint_dep = dependency('libfprint-2', version: '>=' + libfprint_min_version)
polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.91')
dbus_dep = dependency('dbus-1', required: false)
-libsystemd_dep = dependency('libsystemd', required: get_option('pam'))
+libsystemd_dep = dependency(get_option('libsystemd'), required: get_option('pam'))
pam_dep = cc.find_library('pam',
required: get_option('pam'),
has_headers: 'security/pam_modules.h',
diff --git a/meson_options.txt b/meson_options.txt
index 5daa9a4..11aa0be 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -10,6 +10,11 @@ option('systemd',
description: 'Install system service files',
type: 'boolean',
value: true)
+option('libsystemd',
+ description: 'Libsystemd provider (libsystemd or libelogind)',
+ type: 'combo',
+ choices: [ 'libsystemd', 'libelogind' ],
+ value: 'libsystemd')
option('systemd_system_unit_dir',
description: 'Directory for systemd service files',
type: 'string')
--
2.37.1.windows.1

View File

@ -1,6 +1,6 @@
Name: fprintd Name: fprintd
Version: 1.94.2 Version: 1.94.2
Release: 5 Release: 6
Summary: D-Bus service for Fingerprint reader access Summary: D-Bus service for Fingerprint reader access
License: GPLv2+ License: GPLv2+
@ -11,6 +11,7 @@ Patch0001: 0001-Don-t-try-to-clear-storage-on-devices-without-intern.patch
Patch0002: 0002-tests-Fix-dbusmock-AddDevice-calls-to-include-option.patch Patch0002: 0002-tests-Fix-dbusmock-AddDevice-calls-to-include-option.patch
Patch0003: 0003-meson-Do-not-hard-require-test-dependencies.patch Patch0003: 0003-meson-Do-not-hard-require-test-dependencies.patch
Patch0004: 0004-tests-Hide-intermediate-error-in-output-checker.patch Patch0004: 0004-tests-Hide-intermediate-error-in-output-checker.patch
Patch0005: 0005-meson-Add-option-to-use-libelogind-for-DBus.patch
BuildRequires: meson BuildRequires: meson
BuildRequires: gcc BuildRequires: gcc
@ -97,6 +98,9 @@ fi
%{_mandir}/man8/pam_fprintd.8.gz %{_mandir}/man8/pam_fprintd.8.gz
%changelog %changelog
* Thu Jan 05 2023 xuxinyu <xuxinyu@xfusion.com> - 1.94.2-6
- meson: Add option to use libelogind for DBus
* Thu Jan 05 2023 xuxinyu <xuxinyu@xfusion.com> - 1.94.2-5 * Thu Jan 05 2023 xuxinyu <xuxinyu@xfusion.com> - 1.94.2-5
- tests: Hide intermediate error in output checker - tests: Hide intermediate error in output checker