From 126932d5d813b7e068882967036936a9e0867c94 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 9 Dec 2019 06:17:01 +0000 Subject: [PATCH] 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 --- 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 -- 2.24.0