From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1583501-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 AA2E0158015
	for <garchives@archives.gentoo.org>; Mon, 25 Dec 2023 00:43:29 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 710D22BC01C;
	Mon, 25 Dec 2023 00:43:28 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(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 517DF2BC01C
	for <gentoo-commits@lists.gentoo.org>; Mon, 25 Dec 2023 00:43:28 +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 4B35D33D9AD
	for <gentoo-commits@lists.gentoo.org>; Mon, 25 Dec 2023 00:43:27 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 9FE351331
	for <gentoo-commits@lists.gentoo.org>; Mon, 25 Dec 2023 00:43:25 +0000 (UTC)
From: "Matt Turner" <mattst88@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, "Matt Turner" <mattst88@gentoo.org>
Message-ID: <1703464999.35860bfc65afcf8a4c721b3afaefeb8e3c3d25eb.mattst88@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-libs/libdrm/
X-VCS-Repository: repo/gentoo
X-VCS-Files: x11-libs/libdrm/libdrm-9999.ebuild x11-libs/libdrm/metadata.xml
X-VCS-Directories: x11-libs/libdrm/
X-VCS-Committer: mattst88
X-VCS-Committer-Name: Matt Turner
X-VCS-Revision: 35860bfc65afcf8a4c721b3afaefeb8e3c3d25eb
X-VCS-Branch: master
Date: Mon, 25 Dec 2023 00:43:25 +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: be0a7df5-f1b0-42f4-9538-0a799ffe4be3
X-Archives-Hash: f64015e5649bd9e3ba5759960db43cb6

commit:     35860bfc65afcf8a4c721b3afaefeb8e3c3d25eb
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 25 00:20:05 2023 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Dec 25 00:43:19 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35860bfc

x11-libs/libdrm: Add IUSE=tools

Closes: https://bugs.gentoo.org/920514
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 x11-libs/libdrm/libdrm-9999.ebuild | 11 +++++++++--
 x11-libs/libdrm/metadata.xml       |  3 +++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/x11-libs/libdrm/libdrm-9999.ebuild b/x11-libs/libdrm/libdrm-9999.ebuild
index 785b44cbb71c..72954f26c11f 100644
--- a/x11-libs/libdrm/libdrm-9999.ebuild
+++ b/x11-libs/libdrm/libdrm-9999.ebuild
@@ -24,7 +24,7 @@ for card in ${VIDEO_CARDS}; do
 	IUSE_VIDEO_CARDS+=" video_cards_${card}"
 done
 
-IUSE="${IUSE_VIDEO_CARDS} udev valgrind"
+IUSE="${IUSE_VIDEO_CARDS} tools udev valgrind"
 RESTRICT="test" # see bug #236845
 LICENSE="MIT"
 SLOT="0"
@@ -34,6 +34,7 @@ COMMON_DEPEND="
 DEPEND="${COMMON_DEPEND}
 	valgrind? ( dev-util/valgrind )"
 RDEPEND="${COMMON_DEPEND}
+	video_cards_amdgpu? ( tools? ( >=dev-util/cunit-2.1 ) )
 	udev? ( virtual/udev )"
 BDEPEND="${PYTHON_DEPS}
 	$(python_gen_any_dep 'dev-python/docutils[${PYTHON_USEDEP}]')"
@@ -59,7 +60,13 @@ multilib_src_configure() {
 		$(meson_feature video_cards_vmware vmwgfx)
 		# valgrind installs its .pc file to the pkgconfig for the primary arch
 		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dtests=false # Tests are restricted
+		$(meson_native_use_bool tools install-test-programs)
 	)
+
+	if multilib_is_native_abi && use tools; then
+		emesonargs+=( -Dtests=true  )
+	else
+		emesonargs+=( -Dtests=false )
+	fi
 	meson_src_configure
 }

diff --git a/x11-libs/libdrm/metadata.xml b/x11-libs/libdrm/metadata.xml
index 144ba2de99b3..be660f032d0c 100644
--- a/x11-libs/libdrm/metadata.xml
+++ b/x11-libs/libdrm/metadata.xml
@@ -5,6 +5,9 @@
     <email>x11@gentoo.org</email>
     <name>X11</name>
   </maintainer>
+  <use>
+    <flag name="tools">Install optional tests and tools</flag>
+  </use>
   <upstream>
     <remote-id type="freedesktop-gitlab">mesa/drm</remote-id>
   </upstream>