commit:     378052578c7a89a49ecec89c8944c5f5c7190dda
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 18 19:26:23 2019 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Sep 18 20:09:50 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37805257

media-libs/libglvnd: Make X11 support optional

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

 media-libs/libglvnd/libglvnd-9999.ebuild | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/media-libs/libglvnd/libglvnd-9999.ebuild 
b/media-libs/libglvnd/libglvnd-9999.ebuild
index 7c3c16d23be..be06e85ba9a 100644
--- a/media-libs/libglvnd/libglvnd-9999.ebuild
+++ b/media-libs/libglvnd/libglvnd-9999.ebuild
@@ -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() {

Reply via email to