media-libs/libglvnd: Make X11 support optional
authorMatt Turner <mattst88@gentoo.org>
Wed, 18 Sep 2019 19:26:23 +0000 (12:26 -0700)
committerMatt Turner <mattst88@gentoo.org>
Wed, 18 Sep 2019 20:09:50 +0000 (13:09 -0700)
Closes: https://bugs.gentoo.org/693754
Signed-off-by: Matt Turner <mattst88@gentoo.org>
media-libs/libglvnd/libglvnd-9999.ebuild

index 7c3c16d23bea419c09268189dd85ada118fc75a5..be06e85ba9ad16ae29dbe395e027fb7018f29d09 100644 (file)
@@ -25,14 +25,17 @@ fi
 
 LICENSE="MIT"
 SLOT="0"
-IUSE=""
+IUSE="X"
 
 RDEPEND="
        !media-libs/mesa[-libglvnd(-)]
-       x11-libs/libX11[${MULTILIB_USEDEP}]
-       "
+       X? (
+               x11-libs/libX11[${MULTILIB_USEDEP}]
+               x11-libs/libXext[${MULTILIB_USEDEP}]
+       )"
 DEPEND="${PYTHON_DEPS}
-       ${RDEPEND}"
+       ${RDEPEND}
+       X? ( x11-base/xorg-proto )"
 
 src_prepare() {
        default
@@ -40,7 +43,12 @@ src_prepare() {
 }
 
 multilib_src_configure() {
-       ECONF_SOURCE=${S} econf
+       myconf=(
+               --disable-headers
+               $(use_enable X x11)
+               $(use_enable X glx)
+       )
+       ECONF_SOURCE=${S} econf "${myconf[@]}"
 }
 
 multilib_src_install() {