commit:     e2085d0c2993116abb98e87a8ec06d59839dbc36
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  6 21:34:50 2024 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Mar  6 21:51:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2085d0c

dev-util/vulkan-tools: Allow building USE=cube without X/wayland

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

 dev-util/vulkan-tools/vulkan-tools-9999.ebuild | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/dev-util/vulkan-tools/vulkan-tools-9999.ebuild 
b/dev-util/vulkan-tools/vulkan-tools-9999.ebuild
index ef16acd05d20..19a70d8f2a16 100644
--- a/dev-util/vulkan-tools/vulkan-tools-9999.ebuild
+++ b/dev-util/vulkan-tools/vulkan-tools-9999.ebuild
@@ -22,9 +22,7 @@ HOMEPAGE="https://github.com/KhronosGroup/Vulkan-Tools";
 
 LICENSE="Apache-2.0"
 SLOT="0"
-IUSE="cube wayland +X"
-
-REQUIRED_USE="cube? ( || ( X wayland ) )"
+IUSE="cube wayland X"
 
 BDEPEND="${PYTHON_DEPS}
        cube? ( ~dev-util/glslang-${PV}:=[${MULTILIB_USEDEP}] )
@@ -72,9 +70,15 @@ multilib_src_configure() {
                -DVULKAN_HEADERS_INSTALL_DIR="${ESYSROOT}/usr"
        )
 
-       use cube && mycmakeargs+=(
-               -DCUBE_WSI_SELECTION=$(usex X XCB WAYLAND)
-       )
+       if use cube; then
+               if use X; then
+                       mycmakeargs+=(-DCUBE_WSI_SELECTION=XCB)
+               elif use wayland; then
+                       mycmakeargs+=(-DCUBE_WSI_SELECTION=WAYLAND)
+               else
+                       mycmakeargs+=(-DCUBE_WSI_SELECTION=DISPLAY)
+               fi
+       fi
 
        cmake_src_configure
 }

Reply via email to