Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/libsecret/
Date: Wed, 30 Jun 2021 17:55:57
Message-Id: 1625075705.375d4ecea4f6065b75cdd99cc19c372ab7fd5c64.marecki@gentoo
1 commit: 375d4ecea4f6065b75cdd99cc19c372ab7fd5c64
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 30 13:33:59 2021 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 30 17:55:05 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=375d4ece
7
8 app-crypt/libsecret: virtualise Secret Service API dependency
9
10 User tests - including my own - show that app-admin/keepassxc works fine
11 as a Secret Service API provider, and KDE will likely acquire a
12 compatible provider soon.
13
14 Change made with permission from leio on behalf of the Gnome Project.
15
16 Closes: https://bugs.gentoo.org/705132
17 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
18
19 app-crypt/libsecret/libsecret-0.20.4-r1.ebuild | 89 ++++++++++++++++++++++++++
20 1 file changed, 89 insertions(+)
21
22 diff --git a/app-crypt/libsecret/libsecret-0.20.4-r1.ebuild b/app-crypt/libsecret/libsecret-0.20.4-r1.ebuild
23 new file mode 100644
24 index 00000000000..e43ef9d0b72
25 --- /dev/null
26 +++ b/app-crypt/libsecret/libsecret-0.20.4-r1.ebuild
27 @@ -0,0 +1,89 @@
28 +# Copyright 1999-2021 Gentoo Authors
29 +# Distributed under the terms of the GNU General Public License v2
30 +
31 +EAPI=7
32 +PYTHON_COMPAT=( python3_{8..9} )
33 +VALA_USE_DEPEND=vapigen
34 +
35 +inherit gnome2 meson-multilib python-any-r1 vala virtualx
36 +
37 +DESCRIPTION="GObject library for accessing the freedesktop.org Secret Service API"
38 +HOMEPAGE="https://wiki.gnome.org/Projects/Libsecret"
39 +
40 +LICENSE="LGPL-2.1+ Apache-2.0" # Apache-2.0 license is used for tests only
41 +SLOT="0"
42 +
43 +IUSE="+crypt gtk-doc +introspection test +vala"
44 +RESTRICT="!test? ( test )"
45 +REQUIRED_USE="
46 + vala? ( introspection )
47 + gtk-doc? ( crypt )
48 +"
49 +
50 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
51 +
52 +DEPEND="
53 + >=dev-libs/glib-2.44:2[${MULTILIB_USEDEP}]
54 + crypt? ( >=dev-libs/libgcrypt-1.2.2:0=[${MULTILIB_USEDEP}] )
55 + introspection? ( >=dev-libs/gobject-introspection-1.29:= )
56 +"
57 +RDEPEND="${DEPEND}
58 + virtual/secret-service"
59 +BDEPEND="
60 + dev-libs/libxslt
61 + dev-util/gdbus-codegen
62 + >=sys-devel/gettext-0.19.8
63 + virtual/pkgconfig
64 + test? (
65 + $(python_gen_any_dep '
66 + dev-python/mock[${PYTHON_USEDEP}]
67 + dev-python/dbus-python[${PYTHON_USEDEP}]
68 + introspection? ( dev-python/pygobject:3[${PYTHON_USEDEP}] )')
69 + introspection? ( >=dev-libs/gjs-1.32 )
70 + )
71 + vala? ( $(vala_depend) )
72 +"
73 +
74 +PATCHES=(
75 + "${FILESDIR}"/${P}-meson-build-test-vala-unstable-with-DSECRET_WITH_UNS.patch
76 +)
77 +
78 +python_check_deps() {
79 + if use introspection; then
80 + has_version -b "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
81 + fi
82 + has_version -b "dev-python/mock[${PYTHON_USEDEP}]" &&
83 + has_version -b "dev-python/dbus-python[${PYTHON_USEDEP}]"
84 +}
85 +
86 +pkg_setup() {
87 + use test && python-any-r1_pkg_setup
88 +}
89 +
90 +src_prepare() {
91 + use vala && vala_src_prepare
92 + default
93 +
94 + # Remove @filename@ from the header template that would otherwise cause
95 + # differences dependent on the ABI
96 + sed -e '/enumerations from "@filename@"/d' \
97 + -i libsecret/secret-enum-types.h.template || die
98 +}
99 +
100 +multilib_src_configure() {
101 + local emesonargs=(
102 + $(meson_use crypt gcrypt)
103 +
104 + # Don't build docs multiple times
105 + $(meson_native_true manpage)
106 + $(meson_native_use_bool gtk-doc gtk_doc)
107 +
108 + $(meson_native_use_bool introspection)
109 + $(meson_native_use_bool vala vapi)
110 + )
111 + meson_src_configure
112 +}
113 +
114 +multilib_src_test() {
115 + virtx meson_src_test
116 +}