diff mbox series

[v2,2/4] package/mesa3d: make it aware of libglvnd and support it when present

Message ID 20200517204003.2187318-3-jskrzypnik@novomatic-tech.com
State New
Headers show
Series Initial GLVND support + NVIDIA drivers upgrade | expand

Commit Message

Jakub Skrzypnik May 17, 2020, 8:40 p.m. UTC
Signed-off-by: Jakub Skrzypnik <jskrzypnik@novomatic-tech.com>
---
 package/mesa3d/Config.in | 2 ++
 package/mesa3d/mesa3d.mk | 9 +++++++++
 2 files changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index dd512d9b76..9b3f1546c8 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -442,6 +442,7 @@  config BR2_PACKAGE_MESA3D_OPENGL_ES
 
 endif # BR2_PACKAGE_MESA3D_DRIVER
 
+if !BR2_PACKAGE_LIBGLVND
 config BR2_PACKAGE_PROVIDES_LIBGL
 	default "mesa3d" if BR2_PACKAGE_MESA3D_OPENGL_GLX
 
@@ -450,6 +451,7 @@  config BR2_PACKAGE_PROVIDES_LIBEGL
 
 config BR2_PACKAGE_PROVIDES_LIBGLES
 	default "mesa3d" if BR2_PACKAGE_MESA3D_OPENGL_ES
+endif
 
 config BR2_PACKAGE_PROVIDES_LIBOPENCL
 	default "mesa3d" if BR2_PACKAGE_MESA3D_OPENCL
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index d1933dabfd..da21870431 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -50,6 +50,8 @@  ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS),y)
 MESA3D_DEPENDENCIES += elfutils
 endif
 
+
+
 ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX),y)
 # Disable-mangling not yet supported by meson build system.
 # glx:
@@ -275,4 +277,11 @@  else
 MESA3D_CONF_OPTS += -Dzstd=false
 endif
 
+ifeq ($(BR2_PACKAGE_LIBGLVND),y)
+MESA3D_DEPENDENCIES += libglvnd
+MESA3D_CONF_OPTS += -Dglvnd=true
+MESA3D_WITH_GLVND_PROVIDES = $(filter-out libgl libegl libgles,$(MESA3D_PROVIDES))
+MESA3D_PROVIDES := $(MESA3D_WITH_GLVND_PROVIDES)
+endif
+
 $(eval $(meson-package))