From c509e468c00bd0e9331e9f1592f2b3d7e4b81e03 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 10 Jul 2021 23:31:20 +0300 Subject: [PATCH] mesa: aid users needing libglvnd This does a simple check during build time for libglvnd and enables it if present. This prevents users from having to fork the package to add GL support. I want to /eventually/ add some kind of "optional" dependency feature to the package manager so we can be rid of these hacks once and for all. --- extra/mesa/build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extra/mesa/build b/extra/mesa/build index 0255af03..4f919389 100755 --- a/extra/mesa/build +++ b/extra/mesa/build @@ -33,6 +33,11 @@ export CFLAGS="$CFLAGS -DGLX_X86_READONLY_TEXT" sed "/pre_args += '-DUSE_ELF_TLS'/d" meson.build > _ mv -f _ meson.build +# To prevent the need for users to fork the mesa package to add +# libglvnd support, the below code checks for its availability +# and enables it if present. ie: install glvnd, rebuild mesa. +! kiss l libglvnd >/dev/null 2>&1 || glvnd_enabled=true + meson \ --prefix=/usr \ --sysconfdir=/etc \ @@ -42,6 +47,7 @@ meson \ -Dplatforms=wayland \ -Dglx=disabled \ -Dzstd=false \ + -Dglvnd="${glvnd_enabled:-false}" . output ninja -C output