Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-power/upower/, profiles/arch/alpha/
Date: Fri, 29 Apr 2022 08:13:46
Message-Id: 1651220015.3e2c5fa402036e2953057cd98cd80a71565dc3ce.sam@gentoo
1 commit: 3e2c5fa402036e2953057cd98cd80a71565dc3ce
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 29 08:12:07 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 29 08:13:35 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e2c5fa4
7
8 sys-power/upower: fix tests
9
10 Closes: https://bugs.gentoo.org/836269
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 profiles/arch/alpha/package.use.mask | 4 ++++
14 sys-power/upower/upower-0.99.17.ebuild | 22 ++++++++++++++++++++--
15 2 files changed, 24 insertions(+), 2 deletions(-)
16
17 diff --git a/profiles/arch/alpha/package.use.mask b/profiles/arch/alpha/package.use.mask
18 index 7f798ffa6b0e..d97f9162b1fd 100644
19 --- a/profiles/arch/alpha/package.use.mask
20 +++ b/profiles/arch/alpha/package.use.mask
21 @@ -1,6 +1,10 @@
22 # Copyright 1999-2022 Gentoo Authors
23 # Distributed under the terms of the GNU General Public License v2
24
25 +# Sam James <sam@g.o> (2022-04-29)
26 +# Needs unkeyworded dev-util/umockdev
27 +sys-power/upower test
28 +
29 # Michał Górny <mgorny@g.o> (2022-04-26)
30 # Unkeyworded dependencies.
31 dev-python/click doc
32
33 diff --git a/sys-power/upower/upower-0.99.17.ebuild b/sys-power/upower/upower-0.99.17.ebuild
34 index 3e2e50731bc6..c1206d3987ed 100644
35 --- a/sys-power/upower/upower-0.99.17.ebuild
36 +++ b/sys-power/upower/upower-0.99.17.ebuild
37 @@ -3,7 +3,8 @@
38
39 EAPI=8
40
41 -inherit meson systemd udev xdg-utils
42 +PYTHON_COMPAT=( python3_{8..10} )
43 +inherit meson python-any-r1 systemd udev xdg-utils
44
45 DESCRIPTION="D-Bus abstraction for enumerating power devices, querying history and statistics"
46 HOMEPAGE="https://upower.freedesktop.org/"
47 @@ -14,7 +15,8 @@ SLOT="0/3" # based on SONAME of libupower-glib.so
48 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
49
50 # gtk-doc files are not available as prebuilt in the tarball
51 -IUSE="doc +introspection ios selinux"
52 +IUSE="doc +introspection ios selinux test"
53 +RESTRICT="!test? ( test )"
54
55 DEPEND="
56 >=dev-libs/glib-2.56:2
57 @@ -39,6 +41,13 @@ BDEPEND="
58 >=sys-devel/gettext-0.19.8
59 virtual/pkgconfig
60 doc? ( dev-util/gtk-doc )
61 + test? (
62 + $(python_gen_any_dep '
63 + dev-python/dbus-python[${PYTHON_USEDEP}]
64 + dev-python/python-dbusmock[${PYTHON_USEDEP}]
65 + ')
66 + dev-util/umockdev
67 + )
68 "
69
70 S="${WORKDIR}/${PN}-v${PV}"
71 @@ -49,6 +58,15 @@ PATCHES=(
72 "${FILESDIR}"/${P}-meson-Don-t-search-for-gtk-doc-if-disabled.patch
73 )
74
75 +python_check_deps() {
76 + python_has_version -b "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
77 + python_has_version -b "dev-python/python-dbusmock[${PYTHON_USEDEP}]"
78 +}
79 +
80 +pkg_setup() {
81 + use test && python-any-r1_pkg_setup
82 +}
83 +
84 src_prepare() {
85 default
86 xdg_environment_reset