diff --git a/sys-auth/fprintd/Manifest b/sys-auth/fprintd/Manifest index 151bfb5..0707ab8 100644 --- a/sys-auth/fprintd/Manifest +++ b/sys-auth/fprintd/Manifest @@ -1 +1,2 @@ DIST fprintd-v1.94.2.tar.bz2 657989 BLAKE2B 5855ab453ae6d73e08c60c699a95609262fd121ab020f9ffeafb8d1891a60f761f47e4acd11554179b6d9cbed8a734aafb012a4b6de3e9ad67d4160534a0e6c6 SHA512 0b5ebc595b617fbe9167c41a80e31ae74e7bdc87350b0420839e1a6229d7709e51ff2836858c46d8d30549a1f0811b0f697034fcdd09512b5c1099f0f0a3b112 +DIST fprintd-v1.94.4.tar.bz2 664460 BLAKE2B 42013d612f3790a8fe79a41cb64bbc9b7262a2dca2607f40885a2f83cb7c3a73db6fbb3e7af601eaa5bffb14acd3bcf97b72367b0ff13fdeb92c96c6345f4054 SHA512 d517310616c795ca100664ecbc1cc291e89ed9bb2e513d29e57ebc4b1f2b5668f8f304d15b977ed63a9629682f4742fd9e206edc1144ed0bb6cd526d19b819b7 diff --git a/sys-auth/fprintd/files/fprintd-1.94.3-test-optional.patch b/sys-auth/fprintd/files/fprintd-1.94.3-test-optional.patch new file mode 100644 index 0000000..859c837 --- /dev/null +++ b/sys-auth/fprintd/files/fprintd-1.94.3-test-optional.patch @@ -0,0 +1,81 @@ +https://gitlab.freedesktop.org/libfprint/fprintd/-/merge_requests/199 + +From 494df63b916bbf3ebf5e0bfc843a1b5298de63b6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= + +Date: Thu, 30 Mar 2023 15:06:14 +0200 +Subject: [PATCH] Make building tests optional +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Zoltán Böszörményi +--- + meson.build | 10 +++++++++- + meson_options.txt | 4 ++++ + 2 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 859bcf2..2abdd1f 100644 +--- a/meson.build ++++ b/meson.build +@@ -137,13 +137,16 @@ endif + polkit_policy_directory = polkit_gobject_dep.get_pkgconfig_variable('policydir') + + # Tests dependencies ++if get_option('tests') + 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 ++endif + + xmllint = find_program('xmllint', required: false) + python3 = find_program('python3') # No meson without it! ++if get_option('tests') + python3_test_modules = { + 'cairo': true, + 'dbus': true, +@@ -159,6 +162,7 @@ foreach module, required : python3_test_modules + warning('Python3 module \'' + module + '\' required by test suite not found') + endif + endforeach ++endif + + cdata = configuration_data() + cdata.set_quoted('GETTEXT_PACKAGE', meson.project_name()) +@@ -182,7 +186,9 @@ endif + if get_option('gtk_doc') + subdir('doc') + endif +-subdir('tests') ++if get_option('tests') ++ subdir('tests') ++endif + subdir('po') + + output = [] +@@ -205,6 +211,8 @@ output += ' Manuals: ' + get_option('man').to_string() + output += ' GTK Doc: ' + get_option('gtk_doc').to_string() + output += ' XML Linter ' + xmllint.found().to_string() + output += '\nTest setup:\n' ++if get_option('tests') + output += ' With address sanitizer: ' + address_sanitizer.to_string() ++endif + + message('\n'+'\n'.join(output)+'\n') +diff --git a/meson_options.txt b/meson_options.txt +index 286889e..73b28f2 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -28,3 +28,7 @@ option('gtk_doc', + type: 'boolean', + value: false, + description: 'Use gtk-doc to build documentation') ++option('tests', ++ type: 'boolean', ++ value: true, ++ description: 'Run tests') +-- +GitLab + diff --git a/sys-auth/fprintd/fprintd-1.94.4.ebuild b/sys-auth/fprintd/fprintd-1.94.4.ebuild new file mode 100644 index 0000000..fcb0582 --- /dev/null +++ b/sys-auth/fprintd/fprintd-1.94.4.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit meson pam python-any-r1 systemd + +MY_P="${PN}-v${PV}" + +DESCRIPTION="D-Bus service to access fingerprint readers" +HOMEPAGE="https://gitlab.freedesktop.org/libfprint/fprintd" +SRC_URI="https://gitlab.freedesktop.org/libfprint/${PN}/-/archive/v${PV}/${MY_P}.tar.bz2" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="doc pam selinux systemd test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-libs/dbus-glib + dev-libs/glib:2 + || ( >=sys-auth/libfprint-1.94.0:2 >=sys-auth/libfprint-tod-1.94.2:2 ) + sys-auth/polkit + pam? ( + sys-libs/pam + systemd? ( sys-apps/systemd:= ) + !systemd? ( sys-auth/elogind:= ) + ) +" + +DEPEND=" + ${RDEPEND} + test? ( + $(python_gen_any_dep ' + dev-python/python-dbusmock[${PYTHON_USEDEP}] + dev-python/dbus-python[${PYTHON_USEDEP}] + dev-python/pycairo[${PYTHON_USEDEP}] + pam? ( sys-libs/pam_wrapper[${PYTHON_USEDEP}] ) + ') + ) +" + +BDEPEND=" + dev-lang/perl + dev-util/gdbus-codegen + virtual/pkgconfig + doc? ( + dev-libs/libxml2 + dev-libs/libxslt + dev-util/gtk-doc + ) +" + +RDEPEND+=" selinux? ( sec-policy/selinux-fprintd )" + +PATCHES=( + "${FILESDIR}/fprintd-1.94.3-test-optional.patch" +) + +python_check_deps() { + if use test; then + python_has_version -d "sys-libs/pam_wrapper[${PYTHON_USEDEP}]" + fi + + python_has_version -d "dev-python/python-dbusmock[${PYTHON_USEDEP}]" && + python_has_version -d "dev-python/dbus-python[${PYTHON_USEDEP}]" && + python_has_version -d "dev-python/pycairo[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_configure() { + local emesonargs=( + $(meson_use test tests) + $(meson_use pam) + -Dgtk_doc=$(usex doc true false) + -Dman=true + -Dsystemd_system_unit_dir=$(systemd_get_systemunitdir) + -Dpam_modules_dir=$(getpam_mod_dir) + -Dlibsystemd=$(usex systemd libsystemd libelogind) + ) + meson_src_configure +} + +src_install() { + meson_src_install + + dodoc AUTHORS NEWS README TODO + newdoc pam/README README.pam_fprintd +} + +pkg_postinst() { + elog "Please take a look at README.pam_fprintd for integration docs." +}