All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bernd Kuhls <bernd.kuhls@t-online.de>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v11 08/13] package/mesa3d: add a new option to enable GLX support
Date: Sun,  1 Sep 2019 14:37:02 +0200	[thread overview]
Message-ID: <20190901123707.19342-9-bernd.kuhls@t-online.de> (raw)
In-Reply-To: <20190901123707.19342-1-bernd.kuhls@t-online.de>

From: Romain Naour <romain.naour@smile.fr>

When switching to meson build system, enabling GLX support
require at least one DRI or Gallium dirver.

So add a dependency on BR2_PACKAGE_MESA3D_DRIVER for
BR2_PACKAGE_MESA3D_OPENGL_GLX option.

quoting the meson build system:
"dri based GLX requires at least one DRI driver." [1]
"Even when building just gallium drivers the user probably wants dri." [2]

[1] https://cgit.freedesktop.org/mesa/mesa/tree/meson.build?h=19.0#n340
[2] https://cgit.freedesktop.org/mesa/mesa/tree/meson.build?h=19.0#n266

Signed-off-by: Romain Naour <romain.naour@smile.fr>
[Bernd: moved x11 dependencies from glx condition to xorg7 condition to
 fix build error with enabled egl without glx
 BR2_PACKAGE_HAS_LIBGL needs to depend on BR2_PACKAGE_MESA3D_OPENGL_GLX]

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/mesa3d/Config.in | 32 ++++++++++++++++++++++----------
 package/mesa3d/mesa3d.mk | 24 ++++++++++++------------
 2 files changed, 34 insertions(+), 22 deletions(-)

diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index 08a8f1ed20..49923a5129 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -6,16 +6,7 @@ menuconfig BR2_PACKAGE_MESA3D
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	select BR2_PACKAGE_LIBDRM
 	select BR2_PACKAGE_EXPAT
-	select BR2_PACKAGE_HAS_LIBGL if BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_WAYLAND
-	select BR2_PACKAGE_XORGPROTO if BR2_PACKAGE_XORG7
-	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
-	select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7
-	select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_XORG7
-	select BR2_PACKAGE_XLIB_LIBXFIXES if BR2_PACKAGE_XORG7
-	select BR2_PACKAGE_XLIB_LIBXRANDR if BR2_PACKAGE_XORG7
-	select BR2_PACKAGE_XLIB_LIBXXF86VM if BR2_PACKAGE_XORG7
-	select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_ZLIB
 	help
 	  Mesa 3D, an open-source implementation of the OpenGL
@@ -290,6 +281,27 @@ comment "OSMesa classic requires dri (classic) swrast"
 
 if BR2_PACKAGE_MESA3D_DRIVER
 
+comment "OpenGL API Support"
+
+config BR2_PACKAGE_MESA3D_OPENGL_GLX
+	bool "OpenGL GLX"
+	depends on BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_HAS_LIBGL
+	select BR2_PACKAGE_LIBXCB
+	select BR2_PACKAGE_XLIB_LIBX11
+	select BR2_PACKAGE_XLIB_LIBXDAMAGE
+	select BR2_PACKAGE_XLIB_LIBXEXT
+	select BR2_PACKAGE_XLIB_LIBXFIXES
+	select BR2_PACKAGE_XLIB_LIBXRANDR
+	select BR2_PACKAGE_XLIB_LIBXXF86VM
+	select BR2_PACKAGE_XORGPROTO
+	help
+	  Enable GLX graphic acceleration (OpenGL + X11).
+	  GLX support needs X11 and at least one DRI or Gallium driver.
+
+comment "OpenGL GLX support needs X11"
+	depends on !BR2_PACKAGE_XORG7
+
 comment "Additional API Support"
 
 config BR2_PACKAGE_MESA3D_OPENGL_EGL
@@ -310,7 +322,7 @@ config BR2_PACKAGE_MESA3D_OPENGL_ES
 endif # BR2_PACKAGE_MESA3D_DRIVER
 
 config BR2_PACKAGE_PROVIDES_LIBGL
-	default "mesa3d" if BR2_PACKAGE_XORG7
+	default "mesa3d" if BR2_PACKAGE_MESA3D_OPENGL_GLX
 
 config BR2_PACKAGE_PROVIDES_LIBEGL
 	default "mesa3d" if BR2_PACKAGE_MESA3D_OPENGL_EGL
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index 7576a5954f..8da0825120 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -72,16 +72,7 @@ MESA3D_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -mno-compact-eh"
 MESA3D_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -mno-compact-eh"
 endif
 
-ifeq ($(BR2_PACKAGE_XORG7),y)
-MESA3D_DEPENDENCIES += \
-	xlib_libX11 \
-	xlib_libXext \
-	xlib_libXdamage \
-	xlib_libXfixes \
-	xlib_libXrandr \
-	xlib_libXxf86vm \
-	xorgproto \
-	libxcb
+ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX),y)
 MESA3D_CONF_OPTS += --enable-glx --disable-mangling
 ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_XA),y)
 MESA3D_CONF_OPTS += --enable-xa
@@ -170,7 +161,7 @@ MESA3D_CONF_OPTS += --enable-opengl --enable-dri
 MESA3D_CONF_OPTS += --disable-va
 
 # libGL is only provided for a full xorg stack
-ifeq ($(BR2_PACKAGE_XORG7),y)
+ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX),y)
 MESA3D_PROVIDES += libgl
 else
 define MESA3D_REMOVE_OPENGL_HEADERS
@@ -195,7 +186,16 @@ ifeq ($(BR2_PACKAGE_WAYLAND),y)
 MESA3D_DEPENDENCIES += wayland wayland-protocols
 MESA3D_PLATFORMS += wayland
 endif
-ifeq ($(BR2_PACKAGE_XORG7),y)
+ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX),y)
+MESA3D_DEPENDENCIES += \
+	xlib_libX11 \
+	xlib_libXext \
+	xlib_libXdamage \
+	xlib_libXfixes \
+	xlib_libXrandr \
+	xlib_libXxf86vm \
+	xorgproto \
+	libxcb
 MESA3D_PLATFORMS += x11
 endif
 
-- 
2.20.1

  parent reply	other threads:[~2019-09-01 12:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-01 12:36 [Buildroot] [PATCH v11 00/13] package/{mesa3d, mesa3d-headers}: bump version to 19.1.5 Bernd Kuhls
2019-09-01 12:36 ` [Buildroot] [PATCH v11 01/13] package/python3-mako: new package Bernd Kuhls
2019-09-01 12:36 ` [Buildroot] [PATCH v11 02/13] package/mesa3d: rename OSMesa option Bernd Kuhls
2019-09-01 12:36 ` [Buildroot] [PATCH v11 03/13] package/mesa3d: add OSMesa classic needs dri swrast Bernd Kuhls
2019-09-01 12:36 ` [Buildroot] [PATCH v11 04/13] package/mesa3d: Only one swrast provider can be built Bernd Kuhls
2019-09-01 12:36 ` [Buildroot] [PATCH v11 05/13] package/mesa3d: add xvmc option Bernd Kuhls
2019-09-01 12:37 ` [Buildroot] [PATCH v11 06/13] package/mesa3d: Gallium xa state tracker is only available for nouveau and svga Gallium drivers Bernd Kuhls
2019-09-01 12:37 ` [Buildroot] [PATCH v11 07/13] package/mesa3d: Gallium vdpau state tracker is only available for r300, r600, radeonsi and nouveau drivers Bernd Kuhls
2019-09-01 12:37 ` Bernd Kuhls [this message]
2019-09-01 12:37 ` [Buildroot] [PATCH v11 09/13] package/mesa3d: switch build system to meson Bernd Kuhls
2019-09-01 12:37 ` [Buildroot] [PATCH v11 10/13] package/mesa3d: select kmsro for etnaviv Bernd Kuhls
2019-09-01 12:37 ` [Buildroot] [PATCH v11 11/13] package/{mesa3d, mesa3d-headers}: bump version to 19.1.5 Bernd Kuhls
2019-09-01 12:37 ` [Buildroot] [PATCH v11 12/13] package/mesa3d: add support for gallium lima driver Bernd Kuhls
2019-09-01 12:37 ` [Buildroot] [PATCH v11 13/13] package/mesa3d: add support for gallium panfrost driver Bernd Kuhls
2019-09-03  2:20 ` [Buildroot] [PATCH v11 00/13] package/{mesa3d, mesa3d-headers}: bump version to 19.1.5 Fabio Estevam
2019-09-04 12:40 ` Andreas Naumann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190901123707.19342-9-bernd.kuhls@t-online.de \
    --to=bernd.kuhls@t-online.de \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.