commit:     87ba3156a7ff395f67285fb589cd6f19a6a5d713
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  3 05:52:06 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun  3 05:52:52 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87ba3156

sys-auth/fprintd: add 1.94.3

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-auth/fprintd/Manifest                          |   1 +
 .../files/fprintd-1.94.3-test-optional.patch       |  81 +++++++++++++++++
 sys-auth/fprintd/fprintd-1.94.3.ebuild             | 100 +++++++++++++++++++++
 3 files changed, 182 insertions(+)

diff --git a/sys-auth/fprintd/Manifest b/sys-auth/fprintd/Manifest
index 151bfb56ca35..7d197571e4b1 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.3.tar.bz2 661765 BLAKE2B 
9cb1170092616cb095322cde4f55b354ad9f1481600fa4faf9d48d4dc22d3e71c1ff332877211d3ea4382cf37a8865a4b5aebb4f679b485d345abcb1d7ceb239
 SHA512 
bd6d9c6a78e445e55e0fb9da57d46ac354a1e768f34f2f1220e123db5d8d31773020fff43952b495262bb0188bb9b330682ff04ce6767c59043b511c03f55848

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 000000000000..859c8376def1
--- /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?=
+ <[email protected]>
+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 <[email protected]>
+---
+ 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.3.ebuild 
b/sys-auth/fprintd/fprintd-1.94.3.ebuild
new file mode 100644
index 000000000000..9b1e12181f22
--- /dev/null
+++ b/sys-auth/fprintd/fprintd-1.94.3.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 ~ia64 ~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/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."
+}

Reply via email to