commit:     bc2a9bed0542ca7fc32fb057fd6db4b75dbe13e1
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Mon Dec  9 06:17:01 2019 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Dec  9 16:40:08 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc2a9bed

media-libs/gegl: Use python-any-r1.eclass again (and more correctly).

Define python_check_deps() function which was previously missing.
Move some dependencies from DEPEND to BDEPEND.

Closes: https://bugs.gentoo.org/699522
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 media-libs/gegl/gegl-0.4.18.ebuild | 17 +++++++++++++----
 media-libs/gegl/gegl-9999.ebuild   | 17 +++++++++++++----
 2 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/media-libs/gegl/gegl-0.4.18.ebuild 
b/media-libs/gegl/gegl-0.4.18.ebuild
index c341a208411..53a55ca5b57 100644
--- a/media-libs/gegl/gegl-0.4.18.ebuild
+++ b/media-libs/gegl/gegl-0.4.18.ebuild
@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
 # vala and introspection support is broken, bug #468208
 VALA_USE_DEPEND=vapigen
 
-inherit meson gnome2-utils python-r1 vala
+inherit meson gnome2-utils python-any-r1 vala
 
 if [[ ${PV} == *9999* ]]; then
        inherit git-r3
@@ -26,7 +26,6 @@ SLOT="0.4"
 
 IUSE="cairo debug ffmpeg +introspection lcms lensfun libav openexr pdf raw sdl 
svg test tiff umfpack vala v4l webp"
 REQUIRED_USE="
-       ${PYTHON_REQUIRED_USE}
        svg? ( cairo )
        test? ( introspection )
        vala? ( introspection )
@@ -38,7 +37,6 @@ RESTRICT="!test? ( test )"
 #       so there is no chance to support libav right now (Gentoo bug #567638)
 #       If it returns, please check prior GEGL ebuilds for how libav was 
integrated.  Thanks!
 RDEPEND="
-       ${PYTHON_DEPS}
        >=dev-libs/glib-2.44:2
        >=dev-libs/json-glib-1.2.6
        >=media-libs/babl-0.1.72[introspection?]
@@ -69,12 +67,15 @@ RDEPEND="
 
 DEPEND="
        ${RDEPEND}
+"
+
+BDEPEND="
        dev-lang/perl
        >=dev-util/gtk-doc-am-1
        >=sys-devel/gettext-0.19.8
        >=sys-devel/libtool-2.2
        virtual/pkgconfig
-       test? ( >=dev-python/pygobject-3.2[${PYTHON_USEDEP}] )
+       test? ( $(python_gen_any_dep 
'>=dev-python/pygobject-3.2:3[${PYTHON_USEDEP}]') )
        vala? ( $(vala_depend) )
 "
 
@@ -86,6 +87,14 @@ PATCHES=(
        "${FILESDIR}"/${P}-meson_cpu_detection.patch
 )
 
+python_check_deps() {
+       has_version -b ">=dev-python/pygobject-3.2:3[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+       use test && python-any-r1_pkg_setup
+}
+
 src_prepare() {
        default
 

diff --git a/media-libs/gegl/gegl-9999.ebuild b/media-libs/gegl/gegl-9999.ebuild
index ea450170416..945cf8d149c 100644
--- a/media-libs/gegl/gegl-9999.ebuild
+++ b/media-libs/gegl/gegl-9999.ebuild
@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
 # vala and introspection support is broken, bug #468208
 VALA_USE_DEPEND=vapigen
 
-inherit meson gnome2-utils python-r1 vala
+inherit meson gnome2-utils python-any-r1 vala
 
 if [[ ${PV} == *9999* ]]; then
        inherit git-r3
@@ -26,7 +26,6 @@ SLOT="0.4"
 
 IUSE="cairo debug ffmpeg +introspection lcms lensfun libav openexr pdf raw sdl 
svg test tiff umfpack vala v4l webp"
 REQUIRED_USE="
-       ${PYTHON_REQUIRED_USE}
        svg? ( cairo )
        test? ( introspection )
        vala? ( introspection )
@@ -38,7 +37,6 @@ RESTRICT="!test? ( test )"
 #       so there is no chance to support libav right now (Gentoo bug #567638)
 #       If it returns, please check prior GEGL ebuilds for how libav was 
integrated.  Thanks!
 RDEPEND="
-       ${PYTHON_DEPS}
        >=dev-libs/glib-2.44:2
        >=dev-libs/json-glib-1.2.6
        >=media-libs/babl-0.1.72[introspection?]
@@ -69,12 +67,15 @@ RDEPEND="
 
 DEPEND="
        ${RDEPEND}
+"
+
+BDEPEND="
        dev-lang/perl
        >=dev-util/gtk-doc-am-1
        >=sys-devel/gettext-0.19.8
        >=sys-devel/libtool-2.2
        virtual/pkgconfig
-       test? ( >=dev-python/pygobject-3.2[${PYTHON_USEDEP}] )
+       test? ( $(python_gen_any_dep 
'>=dev-python/pygobject-3.2:3[${PYTHON_USEDEP}]') )
        vala? ( $(vala_depend) )
 "
 
@@ -85,6 +86,14 @@ PATCHES=(
        "${FILESDIR}"/${PN}-0.4.18-program-suffix.patch
 )
 
+python_check_deps() {
+       has_version -b ">=dev-python/pygobject-3.2:3[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+       use test && python-any-r1_pkg_setup
+}
+
 src_prepare() {
        default
 

Reply via email to