commit:     62cf35e04c65efdc6b5a8ed2670c9b48451571ea
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 25 08:07:29 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 25 08:34:35 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62cf35e0

x11-libs/cairo: further test plumbing

- Only build tests for native ABI because poppler[glib] isn't available for
  multilib.

- Depend on poppler[glib] for tests.

- Depend on ghostscript for tests.

But we keep tests restricted for now because they seem to hang for me and 
there's
a rather elaborate test setup in CI: 
https://gitlab.freedesktop.org/cairo/cairo/-/blob/master/.gitlab-ci.yml.

This partly reverts commit 4350d1484c0ab46f8f74f973438e47ec24e2c01b.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 x11-libs/cairo/cairo-1.17.8.ebuild | 18 +++++++++++++++---
 x11-libs/cairo/cairo-9999.ebuild   | 18 +++++++++++++++---
 2 files changed, 30 insertions(+), 6 deletions(-)

diff --git a/x11-libs/cairo/cairo-1.17.8.ebuild 
b/x11-libs/cairo/cairo-1.17.8.ebuild
index c32c5a8d50e5..edc9523e91bc 100644
--- a/x11-libs/cairo/cairo-1.17.8.ebuild
+++ b/x11-libs/cairo/cairo-1.17.8.ebuild
@@ -18,8 +18,10 @@ DESCRIPTION="A vector graphics library with cross-device 
output support"
 HOMEPAGE="https://www.cairographics.org/ 
https://gitlab.freedesktop.org/cairo/cairo";
 LICENSE="|| ( LGPL-2.1 MPL-1.1 )"
 SLOT="0"
-IUSE="X aqua debug +glib gtk-doc"
-RESTRICT="test" # Test suite has many failures. Requires poppler-glib, which 
isn't available in multilib
+IUSE="X aqua debug +glib gtk-doc test"
+# Tests need more wiring up like e.g. 
https://gitlab.freedesktop.org/cairo/cairo/-/blob/master/.gitlab-ci.yml
+# any2ppm tests seem to hang for now.
+RESTRICT="test !test? ( test )"
 
 RDEPEND="
        >=dev-libs/lzo-2.06-r1:2[${MULTILIB_USEDEP}]
@@ -37,6 +39,11 @@ RDEPEND="
                >=x11-libs/libxcb-1.9.1:=[${MULTILIB_USEDEP}]
        )"
 DEPEND="${RDEPEND}
+       test? (
+               app-text/ghostscript-gpl
+               app-text/poppler[cairo]
+               gnome-base/librsvg
+       )
        X? ( x11-base/xorg-proto )"
 BDEPEND="virtual/pkgconfig"
 
@@ -61,7 +68,8 @@ multilib_src_configure() {
                -Dxml=disabled
                -Dzlib=enabled
 
-               -Dtests=disabled
+               # Requires poppler-glib (poppler[cairo]) which isn't available 
in multilib
+               $(meson_native_use_feature test tests)
 
                -Dgtk2-utils=disabled
 
@@ -75,6 +83,10 @@ multilib_src_configure() {
        meson_src_configure
 }
 
+multilib_src_test() {
+       multilib_is_native_abi && meson_src_test
+}
+
 multilib_src_install_all() {
        einstalldocs
 

diff --git a/x11-libs/cairo/cairo-9999.ebuild b/x11-libs/cairo/cairo-9999.ebuild
index 5ead761e1e7f..21df436410a7 100644
--- a/x11-libs/cairo/cairo-9999.ebuild
+++ b/x11-libs/cairo/cairo-9999.ebuild
@@ -18,8 +18,10 @@ DESCRIPTION="A vector graphics library with cross-device 
output support"
 HOMEPAGE="https://www.cairographics.org/ 
https://gitlab.freedesktop.org/cairo/cairo";
 LICENSE="|| ( LGPL-2.1 MPL-1.1 )"
 SLOT="0"
-IUSE="X aqua debug +glib gtk-doc"
-RESTRICT="test" # Test suite has many failures. Requires poppler-glib, which 
isn't available in multilib
+IUSE="X aqua debug +glib gtk-doc test"
+# Tests need more wiring up like e.g. 
https://gitlab.freedesktop.org/cairo/cairo/-/blob/master/.gitlab-ci.yml
+# any2ppm tests seem to hang for now.
+RESTRICT="test !test? ( test )"
 
 RDEPEND="
        >=dev-libs/lzo-2.06-r1:2[${MULTILIB_USEDEP}]
@@ -37,6 +39,11 @@ RDEPEND="
                >=x11-libs/libxcb-1.9.1:=[${MULTILIB_USEDEP}]
        )"
 DEPEND="${RDEPEND}
+       test? (
+               app-text/ghostscript-gpl
+               app-text/poppler[cairo]
+               gnome-base/librsvg
+       )
        X? ( x11-base/xorg-proto )"
 BDEPEND="virtual/pkgconfig"
 
@@ -56,7 +63,8 @@ multilib_src_configure() {
                -Dxlib-xcb=disabled
                -Dzlib=enabled
 
-               -Dtests=disabled
+               # Requires poppler-glib (poppler[cairo]) which isn't available 
in multilib
+               $(meson_native_use_feature test tests)
 
                -Dgtk2-utils=disabled
 
@@ -70,6 +78,10 @@ multilib_src_configure() {
        meson_src_configure
 }
 
+multilib_src_test() {
+       multilib_is_native_abi && meson_src_test
+}
+
 multilib_src_install_all() {
        einstalldocs
 

Reply via email to