commit:     99a4a4f0466ffa6a2c8af0f568b70ab7f1d07f1f
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 17 22:43:41 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Apr 17 22:48:54 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99a4a4f0

net-wireless/gnome-bluetooth: Add missing test dependencies

Closes: https://bugs.gentoo.org/783081
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 .../gnome-bluetooth/gnome-bluetooth-3.34.5.ebuild  | 23 ++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/net-wireless/gnome-bluetooth/gnome-bluetooth-3.34.5.ebuild 
b/net-wireless/gnome-bluetooth/gnome-bluetooth-3.34.5.ebuild
index 04b83b0833a..645a2ed658b 100644
--- a/net-wireless/gnome-bluetooth/gnome-bluetooth-3.34.5.ebuild
+++ b/net-wireless/gnome-bluetooth/gnome-bluetooth-3.34.5.ebuild
@@ -2,14 +2,16 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-inherit gnome.org gnome2-utils meson udev xdg
+PYTHON_COMPAT=( python3_{7..9} )
+inherit gnome.org gnome2-utils meson python-any-r1 udev xdg
 
 DESCRIPTION="Bluetooth graphical utilities integrated with GNOME"
 HOMEPAGE="https://wiki.gnome.org/Projects/GnomeBluetooth";
 
 LICENSE="GPL-2+ LGPL-2.1+ FDL-1.1+"
 SLOT="2/13" # subslot = libgnome-bluetooth soname version
-IUSE="gtk-doc +introspection"
+IUSE="gtk-doc +introspection test"
+RESTRICT="!test? ( test )"
 KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
 
 DEPEND="
@@ -31,8 +33,25 @@ BDEPEND="
        dev-util/glib-utils
        gtk-doc? ( >=dev-util/gtk-doc-1.9 )
        virtual/pkgconfig
+       test? (
+               $(python_gen_any_dep '
+                       dev-python/dbusmock[${PYTHON_USEDEP}]
+                       dev-python/dbus-python[${PYTHON_USEDEP}]
+               ')
+       )
 "
 
+python_check_deps() {
+       if use test; then
+               has_version -b "dev-python/dbusmock[${PYTHON_USEDEP}]" && \
+               has_version -b "dev-python/dbus-python[${PYTHON_USEDEP}]"
+       fi
+}
+
+pkg_setup() {
+       use test && python-any-r1_pkg_setup
+}
+
 src_configure() {
        local emesonargs=(
                -Dicon_update=false

Reply via email to