[2/2] package/mesa3d: provides libgbm

Message ID 20180913194410.24077-2-bernd.kuhls@t-online.de
State New
Headers show
Series
  • [1/2] package/opengl/libgbm: new virtual package
Related show

Commit Message

Bernd Kuhls Sept. 13, 2018, 7:44 p.m.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/mesa3d/Config.in | 10 ++++++++++
 package/mesa3d/mesa3d.mk |  8 +++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

Patch

diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index aea579d4e3..5f568bf385 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -239,10 +239,17 @@  if BR2_PACKAGE_MESA3D_DRIVER
 
 comment "Additional API Support"
 
+config BR2_PACKAGE_MESA3D_GBM
+	bool "gbm"
+	select BR2_PACKAGE_HAS_LIBGBM
+	help
+	  Enable Generic Buffer Management (gbm)
+
 config BR2_PACKAGE_MESA3D_OPENGL_EGL
 	bool "OpenGL EGL"
 	select BR2_PACKAGE_HAS_LIBEGL
 	select BR2_PACKAGE_HAS_LIBEGL_WAYLAND
+	select BR2_PACKAGE_MESA3D_GBM
 	help
 	  Use the Khronos EGL APIs. EGL is a window manager for OpenGL
 	  applications similar to GLX, for X, and WGL, for Windows.
@@ -256,6 +263,9 @@  config BR2_PACKAGE_MESA3D_OPENGL_ES
 
 endif # BR2_PACKAGE_MESA3D_DRIVER
 
+config BR2_PACKAGE_PROVIDES_LIBGBM
+	default "mesa3d" if BR2_PACKAGE_MESA3D_GBM
+
 config BR2_PACKAGE_PROVIDES_LIBGL
 	default "mesa3d" if BR2_PACKAGE_XORG7
 
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index 3835390574..3619077c12 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -186,10 +186,16 @@  endif
 MESA3D_CONF_OPTS += \
 	--with-platforms=$(subst $(space),$(comma),$(MESA3D_PLATFORMS))
 
+ifeq ($(BR2_PACKAGE_MESA3D_GBM),y)
+MESA3D_PROVIDES += libgbm
+MESA3D_CONF_OPTS += --enable-gbm
+else
+MESA3D_CONF_OPTS += --disable-gbm
+endif
+
 ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
 MESA3D_PROVIDES += libegl
 MESA3D_CONF_OPTS += \
-	--enable-gbm \
 	--enable-egl
 else
 MESA3D_CONF_OPTS += \