summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2023-12-24 19:20:05 -0500
committerMatt Turner <mattst88@gentoo.org>2023-12-24 19:43:19 -0500
commit35860bfc65afcf8a4c721b3afaefeb8e3c3d25eb (patch)
treecbb6004ddb545a540c565dca31f0afe823d6ba1d /x11-libs
parentx11-libs/libdrm: Drop Python 3.9 compatibility (diff)
downloadgentoo-35860bfc65afcf8a4c721b3afaefeb8e3c3d25eb.tar.gz
gentoo-35860bfc65afcf8a4c721b3afaefeb8e3c3d25eb.tar.bz2
gentoo-35860bfc65afcf8a4c721b3afaefeb8e3c3d25eb.zip
x11-libs/libdrm: Add IUSE=tools
Closes: https://bugs.gentoo.org/920514 Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'x11-libs')
-rw-r--r--x11-libs/libdrm/libdrm-9999.ebuild11
-rw-r--r--x11-libs/libdrm/metadata.xml3
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>