Permit build without pam_wrapper

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

View File

@ -0,0 +1,44 @@
From b04d4eb3e87da2627ac16364bc03bf6c2c452b8c Mon Sep 17 00:00:00 2001
From: Fabio Bas <fabio.bas@officineinformatiche.net>
Date: Tue, 24 May 2022 16:00:02 +0200
Subject: [PATCH 06/14] Permit build without pam_wrapper
---
meson.build | 5 ++++-
tests/pam/meson.build | 4 +++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 93f9655..859bcf2 100644
--- a/meson.build
+++ b/meson.build
@@ -137,7 +137,10 @@ endif
polkit_policy_directory = polkit_gobject_dep.get_pkgconfig_variable('policydir')
# Tests dependencies
-pam_wrapper_dep = dependency('pam_wrapper', required: get_option('pam'))
+pam_wrapper_dep = dependency('pam_wrapper', required: false)
+if get_option('pam') and not pam_wrapper_dep.found()
+ warning('Dependency "pam_wrapper" required by test suite not found')
+endif
xmllint = find_program('xmllint', required: false)
python3 = find_program('python3') # No meson without it!
diff --git a/tests/pam/meson.build b/tests/pam/meson.build
index dc0b071..bb3c1d9 100644
--- a/tests/pam/meson.build
+++ b/tests/pam/meson.build
@@ -12,7 +12,9 @@ if address_sanitizer
preloaded_libs += 'asan'
endif
-preloaded_libs += 'pam_wrapper'
+if pam_wrapper_dep.found()
+ preloaded_libs += 'pam_wrapper'
+endif
foreach libname: preloaded_libs
lib = run_command(meson.get_compiler('c'),
--
2.37.1.windows.1

View File

@ -1,6 +1,6 @@
Name: fprintd Name: fprintd
Version: 1.94.2 Version: 1.94.2
Release: 6 Release: 7
Summary: D-Bus service for Fingerprint reader access Summary: D-Bus service for Fingerprint reader access
License: GPLv2+ License: GPLv2+
@ -12,6 +12,7 @@ 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 Patch0005: 0005-meson-Add-option-to-use-libelogind-for-DBus.patch
Patch0006: 0006-Permit-build-without-pam_wrapper.patch
BuildRequires: meson BuildRequires: meson
BuildRequires: gcc BuildRequires: gcc
@ -98,6 +99,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-7
- Permit build without pam_wrapper
* Thu Jan 05 2023 xuxinyu <xuxinyu@xfusion.com> - 1.94.2-6 * Thu Jan 05 2023 xuxinyu <xuxinyu@xfusion.com> - 1.94.2-6
- meson: Add option to use libelogind for DBus - meson: Add option to use libelogind for DBus