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>x...@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>