From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1500366-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 4480315864F
	for <garchives@archives.gentoo.org>; Sat, 25 Mar 2023 08:34:54 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id F121BE07A9;
	Sat, 25 Mar 2023 08:34:51 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id C7F63E07A9
	for <gentoo-commits@lists.gentoo.org>; Sat, 25 Mar 2023 08:34:51 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id CD6CB335D00
	for <gentoo-commits@lists.gentoo.org>; Sat, 25 Mar 2023 08:34:50 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 2C49F8E5
	for <gentoo-commits@lists.gentoo.org>; Sat, 25 Mar 2023 08:34:48 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1679733275.62cf35e04c65efdc6b5a8ed2670c9b48451571ea.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-libs/cairo/
X-VCS-Repository: repo/gentoo
X-VCS-Files: x11-libs/cairo/cairo-1.17.8.ebuild x11-libs/cairo/cairo-9999.ebuild
X-VCS-Directories: x11-libs/cairo/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 62cf35e04c65efdc6b5a8ed2670c9b48451571ea
X-VCS-Branch: master
Date: Sat, 25 Mar 2023 08:34:48 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 616b0183-d7b4-433a-95fd-af81223f8fd0
X-Archives-Hash: 3a16868efee82d52ecb0f847851ce9e6

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