From 35860bfc65afcf8a4c721b3afaefeb8e3c3d25eb Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sun, 24 Dec 2023 19:20:05 -0500 Subject: x11-libs/libdrm: Add IUSE=tools Closes: https://bugs.gentoo.org/920514 Signed-off-by: Matt Turner --- x11-libs/libdrm/libdrm-9999.ebuild | 11 +++++++++-- x11-libs/libdrm/metadata.xml | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'x11-libs') 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 @@ x11@gentoo.org X11 + + Install optional tests and tools + mesa/drm -- cgit v1.2.3-65-gdbad