1 |
commit: 1d8530706e7610f2ddd3a7d5488fbcaf16c25358 |
2 |
Author: Mart Raudsepp <leio <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 1 15:41:00 2020 +0000 |
4 |
Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 1 16:17:41 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d853070 |
7 |
|
8 |
gnome-base/gnome-control-center: fix dbusmock test dep handling |
9 |
|
10 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
11 |
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org> |
12 |
|
13 |
.../gnome-control-center-3.32.2.ebuild | 25 ++++++++++++++++++++-- |
14 |
1 file changed, 23 insertions(+), 2 deletions(-) |
15 |
|
16 |
diff --git a/gnome-base/gnome-control-center/gnome-control-center-3.32.2.ebuild b/gnome-base/gnome-control-center/gnome-control-center-3.32.2.ebuild |
17 |
index 70a11f09240..9441fe8260d 100644 |
18 |
--- a/gnome-base/gnome-control-center/gnome-control-center-3.32.2.ebuild |
19 |
+++ b/gnome-base/gnome-control-center/gnome-control-center-3.32.2.ebuild |
20 |
@@ -2,8 +2,9 @@ |
21 |
# Distributed under the terms of the GNU General Public License v2 |
22 |
|
23 |
EAPI=6 |
24 |
+PYTHON_COMPAT=( python3_{6,7,8} ) |
25 |
|
26 |
-inherit gnome.org gnome2-utils meson xdg |
27 |
+inherit gnome.org gnome2-utils meson python-any-r1 xdg |
28 |
|
29 |
DESCRIPTION="GNOME's main interface to configure various aspects of the desktop" |
30 |
HOMEPAGE="https://git.gnome.org/browse/gnome-control-center/" |
31 |
@@ -11,7 +12,8 @@ SRC_URI+=" https://dev.gentoo.org/~leio/distfiles/${P}-patchset.tar.xz" |
32 |
|
33 |
LICENSE="GPL-2+" |
34 |
SLOT="2" |
35 |
-IUSE="+bluetooth +cups debug elogind flickr +gnome-online-accounts +ibus input_devices_wacom kerberos networkmanager systemd v4l wayland" |
36 |
+IUSE="+bluetooth +cups debug elogind flickr +gnome-online-accounts +ibus input_devices_wacom kerberos networkmanager systemd test v4l wayland" |
37 |
+RESTRICT="!test? ( test )" |
38 |
REQUIRED_USE=" |
39 |
flickr? ( gnome-online-accounts ) |
40 |
^^ ( elogind systemd ) |
41 |
@@ -115,6 +117,9 @@ DEPEND="${COMMON_DEPEND} |
42 |
dev-util/glib-utils |
43 |
>=sys-devel/gettext-0.19.8 |
44 |
virtual/pkgconfig |
45 |
+ test? ( $(python_gen_any_dep ' |
46 |
+ dev-python/dbusmock[${PYTHON_USEDEP}] |
47 |
+ ') ) |
48 |
" |
49 |
|
50 |
PATCHES=( |
51 |
@@ -127,6 +132,22 @@ PATCHES=( |
52 |
"${FILESDIR}"/${PN}-3.32.2-fix-gcc10-fno-common.patch # fixed in 3.35.90 |
53 |
) |
54 |
|
55 |
+python_check_deps() { |
56 |
+ use test && \ |
57 |
+ has_version "dev-python/dbusmock[${PYTHON_USEDEP}]" |
58 |
+} |
59 |
+ |
60 |
+pkg_setup() { |
61 |
+ use test && python-any-r1_pkg_setup |
62 |
+} |
63 |
+ |
64 |
+src_prepare() { |
65 |
+ xdg_src_prepare |
66 |
+ # Mark python tests with shebang executable, so that meson will launch them directly, instead |
67 |
+ # of via its own python-single-r1 version, which might not match what we get from python_check_deps |
68 |
+ chmod a+x tests/network/test-network-panel.py tests/datetime/test-datetime.py || die |
69 |
+} |
70 |
+ |
71 |
src_configure() { |
72 |
local emesonargs=( |
73 |
$(meson_use bluetooth) |