Gentoo Archives: gentoo-commits

From: Matthew Thode <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-auth/fprintd/files/, sys-auth/fprintd/
Date: Fri, 08 Jan 2021 17:09:31
Message-Id: 1610125763.7c1b363ca1aecbe5c0c878d5d6583d869b01d073.prometheanfire@gentoo
1 commit: 7c1b363ca1aecbe5c0c878d5d6583d869b01d073
2 Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 8 17:09:07 2021 +0000
4 Commit: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 8 17:09:23 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c1b363c
7
8 sys-auth/fprintd: 1.90.8 bump
9
10 tested locally, seems fine
11
12 Package-Manager: Portage-3.0.12, Repoman-3.0.2
13 Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>
14
15 sys-auth/fprintd/Manifest | 1 +
16 ...-add-test-feature-and-make-tests-optional.patch | 75 +++++++++++++++++++++
17 ...-configure-option-for-libsystemd-provider.patch | 24 +++++++
18 sys-auth/fprintd/fprintd-1.90.8.ebuild | 76 ++++++++++++++++++++++
19 4 files changed, 176 insertions(+)
20
21 diff --git a/sys-auth/fprintd/Manifest b/sys-auth/fprintd/Manifest
22 index c0a22b06a9d..7995d31c2be 100644
23 --- a/sys-auth/fprintd/Manifest
24 +++ b/sys-auth/fprintd/Manifest
25 @@ -1 +1,2 @@
26 DIST fprintd-0.8.1.tar.bz2 75254 BLAKE2B bf59c47c3d0186677bfd180e472e13773afebd4c3438e0e8e8cce34156df1c64c142b73d541fa876b96d4881e6967745a8c29be310dd33a509cb1863c836634e SHA512 438098fb677b742fdb279f3df85a1f2c800fce7498130c09b7408f21656ff256323b3bce4c22a2499e52c2ca7cddbc7f26033be7869939d23f9b5c436aa1f252
27 +DIST fprintd-v1.90.8.tar.bz2 635139 BLAKE2B 4f9e5c395c32dd5de3f5ed4d17e81c28a55de0f411deb3ccbc5d1330129be2bc8263c63c61a5e4910f74e49ebbbf508e858f5ee131eb4552e2ea8ab167bc6021 SHA512 0f38e0ce9f7c1459ba5359d0834569fe5d3f5ec3c9499d008dc39b9c869bbfa1cb293b1d96d22f9f36708f26984a1b3f0776685d628df69f1ed6db14de04a489
28
29 diff --git a/sys-auth/fprintd/files/fprintd-1.90.7_0001-add-test-feature-and-make-tests-optional.patch b/sys-auth/fprintd/files/fprintd-1.90.7_0001-add-test-feature-and-make-tests-optional.patch
30 new file mode 100644
31 index 00000000000..95428184c2f
32 --- /dev/null
33 +++ b/sys-auth/fprintd/files/fprintd-1.90.7_0001-add-test-feature-and-make-tests-optional.patch
34 @@ -0,0 +1,75 @@
35 +From 7820465f078e9655af70036d8c570fd644b38f22 Mon Sep 17 00:00:00 2001
36 +From: Martin Gysel <me@××××××.org>
37 +Date: Thu, 19 Nov 2020 07:04:10 +0100
38 +Subject: [PATCH 1/2] add test feature and make tests optional
39 +
40 +---
41 + meson.build | 14 ++++++++++----
42 + meson_options.txt | 4 ++++
43 + 2 files changed, 14 insertions(+), 4 deletions(-)
44 +
45 +diff --git a/meson.build b/meson.build
46 +index 66aa2f7..ba44788 100644
47 +--- a/meson.build
48 ++++ b/meson.build
49 +@@ -125,7 +125,7 @@ endif
50 + polkit_policy_directory = polkit_gobject_dep.get_pkgconfig_variable('policydir')
51 +
52 + # Tests dependencies
53 +-pam_wrapper_dep = dependency('pam_wrapper', required: get_option('pam'))
54 ++pam_wrapper_dep = dependency('pam_wrapper', required: get_option('pam') and get_option('test').enabled() )
55 +
56 + xmllint = find_program('xmllint', required: false)
57 + python3 = find_program('python3') # No meson without it!
58 +@@ -139,11 +139,13 @@ python3_test_modules = {
59 + }
60 + python3_available_modules = []
61 +
62 ++if get_option('test').enabled()
63 + foreach module, required : python3_test_modules
64 + if required and run_command(python3, '-c', 'import @0@'.format(module)).returncode() != 0
65 + error('Python3 module \'' + module + '\' required by test suite not found')
66 + endif
67 + endforeach
68 ++endif
69 +
70 + cdata = configuration_data()
71 + cdata.set_quoted('GETTEXT_PACKAGE', meson.project_name())
72 +@@ -167,7 +169,9 @@ endif
73 + if get_option('gtk_doc')
74 + subdir('doc')
75 + endif
76 +-subdir('tests')
77 ++if get_option('test').enabled()
78 ++ subdir('tests')
79 ++endif
80 + subdir('po')
81 +
82 + output = []
83 +@@ -189,7 +193,9 @@ output += ' PAM module: ' + pam_dep.found().to_string()
84 + output += ' Manuals: ' + get_option('man').to_string()
85 + output += ' GTK Doc: ' + get_option('gtk_doc').to_string()
86 + output += ' XML Linter ' + xmllint.found().to_string()
87 +-output += '\nTest setup:\n'
88 +-output += ' With address sanitizer: ' + address_sanitizer.to_string()
89 ++if get_option('test').enabled()
90 ++ output += '\nTest setup:\n'
91 ++ output += ' With address sanitizer: ' + address_sanitizer.to_string()
92 ++endif
93 +
94 + message('\n'+'\n'.join(output)+'\n')
95 +diff --git a/meson_options.txt b/meson_options.txt
96 +index be31fe1..92c01cd 100644
97 +--- a/meson_options.txt
98 ++++ b/meson_options.txt
99 +@@ -19,3 +19,7 @@ option('gtk_doc',
100 + type: 'boolean',
101 + value: false,
102 + description: 'Use gtk-doc to build documentation')
103 ++option('test',
104 ++ type: 'feature',
105 ++ value: 'disabled',
106 ++ description: 'Enable tests')
107 +--
108 +2.29.2
109 +
110
111 diff --git a/sys-auth/fprintd/files/fprintd-1.90.8_0002-add-configure-option-for-libsystemd-provider.patch b/sys-auth/fprintd/files/fprintd-1.90.8_0002-add-configure-option-for-libsystemd-provider.patch
112 new file mode 100644
113 index 00000000000..a10026f3346
114 --- /dev/null
115 +++ b/sys-auth/fprintd/files/fprintd-1.90.8_0002-add-configure-option-for-libsystemd-provider.patch
116 @@ -0,0 +1,24 @@
117 +--- fprintd-v1.90.8/meson.build.orig 2020-12-13 08:08:13.886367478 +0100
118 ++++ fprintd-v1.90.8/meson.build 2020-12-13 08:30:16.056756878 +0100
119 +@@ -84,7 +84,7 @@
120 + libfprint_dep = dependency('libfprint-2', version: '>=' + libfprint_min_version)
121 + polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.91')
122 + dbus_dep = dependency('dbus-1', required: false)
123 +-libsystemd_dep = dependency('libsystemd', required: get_option('pam'))
124 ++libsystemd_dep = dependency(get_option('libsystemd'), required: get_option('pam'))
125 + pam_dep = cc.find_library('pam',
126 + required: get_option('pam'),
127 + has_headers: 'security/pam_modules.h',
128 +--- fprintd-v1.90.8/meson_options.txt.orig 2020-12-13 08:08:13.886367478 +0100
129 ++++ fprintd-v1.90.8/meson_options.txt 2020-12-13 08:26:57.111919403 +0100
130 +@@ -10,6 +10,10 @@
131 + description: 'Install system service files',
132 + type: 'boolean',
133 + value: true)
134 ++option('libsystemd',
135 ++ description: 'Libsystemd provider (libsystemd or libelogind)',
136 ++ type: 'string',
137 ++ value: 'libsystemd')
138 + option('systemd_system_unit_dir',
139 + description: 'Directory for systemd service files',
140 + type: 'string')
141
142 diff --git a/sys-auth/fprintd/fprintd-1.90.8.ebuild b/sys-auth/fprintd/fprintd-1.90.8.ebuild
143 new file mode 100644
144 index 00000000000..1dcc64b3e95
145 --- /dev/null
146 +++ b/sys-auth/fprintd/fprintd-1.90.8.ebuild
147 @@ -0,0 +1,76 @@
148 +# Copyright 1999-2021 Gentoo Authors
149 +# Distributed under the terms of the GNU General Public License v2
150 +
151 +EAPI=7
152 +
153 +inherit meson pam systemd
154 +
155 +DESCRIPTION="D-Bus service to access fingerprint readers"
156 +HOMEPAGE="https://gitlab.freedesktop.org/libfprint/fprintd"
157 +SRC_URI="https://gitlab.freedesktop.org/libfprint/${PN}/-/archive/v${PV}/${PN}-v${PV}.tar.bz2"
158 +
159 +LICENSE="GPL-2"
160 +SLOT="0"
161 +KEYWORDS="~amd64 ~x86"
162 +IUSE="doc pam systemd test"
163 +RESTRICT="!test? ( test )"
164 +
165 +RDEPEND="
166 + dev-libs/dbus-glib
167 + dev-libs/glib:2
168 + sys-auth/libfprint:2
169 + sys-auth/polkit
170 + pam? (
171 + systemd? ( sys-apps/systemd )
172 + !systemd? ( sys-auth/elogind )
173 + sys-libs/pam
174 + )
175 +"
176 +DEPEND="${RDEPEND}"
177 +
178 +BDEPEND="
179 + dev-lang/perl
180 + doc? (
181 + dev-libs/libxml2
182 + dev-libs/libxslt
183 + dev-util/gtk-doc
184 + )
185 + test? (
186 + dev-python/dbusmock
187 + dev-python/dbus-python
188 + dev-python/pycairo
189 + pam? ( sys-libs/pam_wrapper )
190 + )
191 + virtual/pkgconfig
192 +"
193 +
194 +PATCHES=(
195 + "${FILESDIR}/${PN}-1.90.7_0001-add-test-feature-and-make-tests-optional.patch"
196 + "${FILESDIR}/${PN}-1.90.8_0002-add-configure-option-for-libsystemd-provider.patch"
197 +)
198 +
199 +S="${WORKDIR}/${PN}-v${PV}"
200 +
201 +src_configure() {
202 + local emesonargs=(
203 + $(meson_feature test)
204 + $(meson_use pam)
205 + -Dgtk_doc=$(usex doc true false)
206 + -Dman=true
207 + -Dsystemd_system_unit_dir=$(systemd_get_systemunitdir)
208 + -Dpam_modules_dir=$(getpam_mod_dir)
209 + -Dlibsystemd=$(usex systemd libsystemd libelogind)
210 + )
211 + meson_src_configure
212 +}
213 +
214 +src_install() {
215 + meson_src_install
216 +
217 + dodoc AUTHORS NEWS README TODO
218 + newdoc pam/README README.pam_fprintd
219 +}
220 +
221 +pkg_postinst() {
222 + elog "Please take a look at README.pam_fprintd for integration docs."
223 +}