media-libs/mesa: introduce X USE flag
authorPhilipp Ammann <philipp.ammann@posteo.de>
Wed, 26 Jun 2019 19:42:36 +0000 (19:42 +0000)
committerMatt Turner <mattst88@gentoo.org>
Mon, 29 Jul 2019 03:44:24 +0000 (20:44 -0700)
Bug: https://bugs.gentoo.org/560096
Signed-off-by: Philipp Ammann <philipp.ammann@posteo.de>
Signed-off-by: Matt Turner <mattst88@gentoo.org>
media-libs/mesa/mesa-9999.ebuild

index d530ead0300c88e75809eb062503fa6d95bbcbfd..b28120fdcc83bdcc88ed343b963412acb7e029ef 100644 (file)
@@ -38,7 +38,7 @@ done
 IUSE="${IUSE_VIDEO_CARDS}
        +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +libglvnd +llvm
        lm_sensors opencl osmesa pax_kernel selinux test unwind vaapi valgrind
-       vdpau vulkan vulkan-overlay wayland xa xvmc"
+       vdpau vulkan vulkan-overlay wayland +X xa xvmc"
 
 REQUIRED_USE="
        d3d9?   ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
@@ -68,6 +68,8 @@ REQUIRED_USE="
        video_cards_virgl? ( gallium )
        video_cards_vivante? ( gallium gbm )
        video_cards_vmware? ( gallium )
+       xa? ( X )
+       xvmc? ( X )
 "
 
 LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.99"
@@ -75,13 +77,6 @@ RDEPEND="
        !app-eselect/eselect-mesa
        >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
        >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
-       >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
-       >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
-       >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
-       >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
-       >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
-       >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
-       x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
        libglvnd? (
                media-libs/libglvnd[${MULTILIB_USEDEP}]
                !app-eselect/eselect-opengl
@@ -126,6 +121,15 @@ RDEPEND="
        )
        video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
        vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
+       X? (
+               >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+               >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+               >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+               >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+               >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+               >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
+               x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
+       )
 "
 for card in ${RADEON_CARDS}; do
        RDEPEND="${RDEPEND}
@@ -213,8 +217,10 @@ unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
 
 DEPEND="${RDEPEND}
        valgrind? ( dev-util/valgrind )
-       x11-libs/libXrandr[${MULTILIB_USEDEP}]
-       x11-base/xorg-proto
+       X? (
+               x11-libs/libXrandr[${MULTILIB_USEDEP}]
+               x11-base/xorg-proto
+       )
 "
 BDEPEND="
        ${PYTHON_DEPS}
@@ -350,7 +356,7 @@ multilib_src_configure() {
                fi
        fi
 
-       emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
+       emesonargs+=( -Dplatforms=surfaceless$(use X && echo ",x11")$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
 
        if use gallium; then
                emesonargs+=(
@@ -472,7 +478,7 @@ multilib_src_configure() {
 
        emesonargs+=(
                $(meson_use test build-tests)
-               -Dglx=dri
+               -Dglx=$(usex X dri disabled)
                -Dshared-glapi=true
                $(meson_use dri3)
                $(meson_use egl)