commit:     840b90818081c7281d92c9cf01be658138ec0d6d
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 27 04:19:56 2022 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Mar 27 04:43:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=840b9081

gui-libs/gtk: Depend on pygobject for USE=introspection

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

 gui-libs/gtk/gtk-4.6.2.ebuild | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/gui-libs/gtk/gtk-4.6.2.ebuild b/gui-libs/gtk/gtk-4.6.2.ebuild
index 2b60e61d6409..b3e13e5d5acf 100644
--- a/gui-libs/gtk/gtk-4.6.2.ebuild
+++ b/gui-libs/gtk/gtk-4.6.2.ebuild
@@ -3,7 +3,8 @@
 
 EAPI=7
 
-inherit gnome.org gnome2-utils meson optfeature virtualx xdg
+PYTHON_COMPAT=( python3_{8..10} )
+inherit gnome.org gnome2-utils meson optfeature python-any-r1 virtualx xdg
 
 DESCRIPTION="GTK is a multi-platform toolkit for creating graphical user 
interfaces"
 HOMEPAGE="https://www.gtk.org/ https://gitlab.gnome.org/GNOME/gtk/";
@@ -72,6 +73,12 @@ PDEPEND="
 "
 BDEPEND="
        dev-libs/gobject-introspection-common
+       introspection? (
+               ${PYTHON_DEPS}
+               $(python_gen_any_dep '
+                       dev-python/pygobject:3[${PYTHON_USEDEP}]
+               ')
+       )
        dev-python/docutils
        >=dev-util/gdbus-codegen-2.48
        dev-util/glib-utils
@@ -83,6 +90,14 @@ BDEPEND="
        )
 "
 
+python_check_deps() {
+       python_has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
+}
+
+pkg_setup() {
+       use introspection && python-any-r1_pkg_setup
+}
+
 src_prepare() {
        xdg_src_prepare
        # dev-python/docutils installs rst2man.py, not rst2man

Reply via email to