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