From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1263036-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 225261382C5
	for <garchives@archives.gentoo.org>; Sun, 21 Mar 2021 13:16:41 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 557ADE0898;
	Sun, 21 Mar 2021 13:16:40 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 381D7E0898
	for <gentoo-commits@lists.gentoo.org>; Sun, 21 Mar 2021 13:16:40 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 1287D335D35
	for <gentoo-commits@lists.gentoo.org>; Sun, 21 Mar 2021 13:16:39 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id A550513B
	for <gentoo-commits@lists.gentoo.org>; Sun, 21 Mar 2021 13:16:37 +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: <1616332589.53c0b6ffcebc589e9df56dafea59877ac9ef4c5f.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/glib-networking/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-libs/glib-networking/glib-networking-2.68.0.ebuild
X-VCS-Directories: net-libs/glib-networking/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 53c0b6ffcebc589e9df56dafea59877ac9ef4c5f
X-VCS-Branch: master
Date: Sun, 21 Mar 2021 13:16:37 +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: ed9f839a-9314-49f9-ad31-8663e5b93eba
X-Archives-Hash: 7916c3f041f7774cc875f8eb9b765c7c

commit:     53c0b6ffcebc589e9df56dafea59877ac9ef4c5f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 21 13:15:37 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Mar 21 13:16:29 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53c0b6ff

net-libs/glib-networking: build tests conditionally

Closes: https://bugs.gentoo.org/777462
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-libs/glib-networking/glib-networking-2.68.0.ebuild | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/net-libs/glib-networking/glib-networking-2.68.0.ebuild b/net-libs/glib-networking/glib-networking-2.68.0.ebuild
index 77f31df6c8c..5d4e94cae8f 100644
--- a/net-libs/glib-networking/glib-networking-2.68.0.ebuild
+++ b/net-libs/glib-networking/glib-networking-2.68.0.ebuild
@@ -30,6 +30,19 @@ BDEPEND="
 	test? ( sys-apps/dbus )
 "
 
+src_prepare() {
+	xdg_src_prepare
+
+	if ! use test ; then
+		# Don't build tests unconditionally
+		# This is a hack to avoid needing gnutls[pkcs11] when USE=-test
+		# It may become a real runtime dependency in future
+		# Please check!
+		# bug #777462
+		sed -i "/^subdir('tls\/tests')/d" meson.build || die
+	fi
+}
+
 multilib_src_configure() {
 	local emesonargs=(
 		-Dgnutls=enabled