From: Thomas Devoogdt <thomas@devoogdt.com>
To: buildroot@buildroot.org
Cc: Adrian Perez de Castro <aperez@igalia.com>,
Thomas Devoogdt <thomas@devoogdt.com>,
Thomas Devoogdt <thomas.devoogdt@barco.com>
Subject: [Buildroot] [PATCH v2 4/4] package/webkitgtk: add a USE_OPENGL_OR_ES config option
Date: Sat, 9 Sep 2023 09:57:53 +0200 [thread overview]
Message-ID: <20230909075753.7471-4-thomas@devoogdt.com> (raw)
In-Reply-To: <20230909075753.7471-1-thomas@devoogdt.com>
OpenGL or GLES support is not mandatory, so make if configurable.
The default was -DUSE_OPENGL_OR_ES=ON, so keep it that way.
It's a quite complex dependency matrix to select libgl, libgles, and libegl.
So for simplicity, always depend on them if the corresponding BR2_PACKAGE_HAS flag is set.
Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
---
v2: no change
---
package/webkitgtk/Config.in | 10 ++++++++++
package/webkitgtk/webkitgtk.mk | 24 +++++++++++++++++++-----
2 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/package/webkitgtk/Config.in b/package/webkitgtk/Config.in
index 6835467c46..748e529208 100644
--- a/package/webkitgtk/Config.in
+++ b/package/webkitgtk/Config.in
@@ -65,6 +65,16 @@ config BR2_PACKAGE_WEBKITGTK
if BR2_PACKAGE_WEBKITGTK
+config BR2_PACKAGE_WEBKITGTK_OPENGL_OR_ES
+ bool "OpenGL or GLES support"
+ default y
+ depends on BR2_PACKAGE_HAS_LIBGBM
+ depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBGLES
+
+comment "OpenGL or GLES support needs an OpenGL or GLES backend, libgbm"
+ depends on !BR2_PACKAGE_HAS_LIBGBM
+ depends on !BR2_PACKAGE_HAS_LIBGL && !BR2_PACKAGE_HAS_LIBGLES
+
config BR2_PACKAGE_WEBKITGTK_SANDBOX
bool "sandboxing support"
depends on BR2_PACKAGE_LIBSECCOMP_ARCH_SUPPORTS # libseccomp
diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk
index 88bdfae27b..39dcaddcd8 100644
--- a/package/webkitgtk/webkitgtk.mk
+++ b/package/webkitgtk/webkitgtk.mk
@@ -32,6 +32,12 @@ WEBKITGTK_CONF_OPTS = \
-DUSE_OPENJPEG=ON \
-DUSE_WOFF2=ON
+ifeq ($(BR2_PACKAGE_WEBKITGTK_OPENGL_OR_ES),y)
+WEBKITGTK_CONF_OPTS += -DUSE_OPENGL_OR_ES=ON
+else
+WEBKITGTK_CONF_OPTS += -DUSE_OPENGL_OR_ES=OFF
+endif
+
ifeq ($(BR2_PACKAGE_WEBKITGTK_SANDBOX),y)
WEBKITGTK_CONF_OPTS += \
-DENABLE_BUBBLEWRAP_SANDBOX=ON \
@@ -83,7 +89,6 @@ endif
# Use GLES if available and desktop GL is not.
ifeq ($(BR2_PACKAGE_HAS_LIBGL):$(BR2_PACKAGE_HAS_LIBGLES),:y)
WEBKITGTK_CONF_OPTS += -DENABLE_GLES2=ON
-WEBKITGTK_DEPENDENCIES += libgles
else
WEBKITGTK_CONF_OPTS += -DENABLE_GLES2=OFF
endif
@@ -97,7 +102,7 @@ endif
ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y)
WEBKITGTK_CONF_OPTS += -DENABLE_X11_TARGET=ON
-WEBKITGTK_DEPENDENCIES += libgl \
+WEBKITGTK_DEPENDENCIES += \
xlib_libXcomposite xlib_libXdamage xlib_libXrender xlib_libXt
else
WEBKITGTK_CONF_OPTS += -DENABLE_X11_TARGET=OFF
@@ -105,13 +110,22 @@ endif
ifeq ($(BR2_PACKAGE_LIBGTK3_WAYLAND),y)
WEBKITGTK_CONF_OPTS += -DENABLE_WAYLAND_TARGET=ON
-WEBKITGTK_DEPENDENCIES += libegl
else
WEBKITGTK_CONF_OPTS += -DENABLE_WAYLAND_TARGET=OFF
endif
-# If only the GTK Broadway backend is enabled, EGL is still needed.
-ifeq ($(BR2_PACKAGE_LIBGTK3_X11):$(BR2_PACKAGE_LIBGTK3_WAYLAND):$(BR2_PACKAGE_LIBGTK3_BROADWAY),::y)
+# required for ENABLE_X11_TARGET, USE_OPENGL_OR_ES
+ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
+WEBKITGTK_DEPENDENCIES += libgl
+endif
+
+# required for ENABLE_GLES2, USE_OPENGL_OR_ES
+ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
+WEBKITGTK_DEPENDENCIES += libgles
+endif
+
+# required for ENABLE_WAYLAND_TARGET, BROADWAY
+ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y)
WEBKITGTK_DEPENDENCIES += libegl
endif
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-09-09 7:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-09 7:57 [Buildroot] [PATCH v2 1/4] package/webkitgtk: security bump to version 2.40.5 Thomas Devoogdt
2023-09-09 7:57 ` [Buildroot] [PATCH v2 2/4] package/webkitgtk: allow both X11 and Wayland Thomas Devoogdt
2023-09-22 16:01 ` Yann E. MORIN
2023-09-09 7:57 ` [Buildroot] [PATCH v2 3/4] package/webkitgtk: make gbm support optional Thomas Devoogdt
2023-09-09 7:57 ` Thomas Devoogdt [this message]
2023-09-22 16:01 ` [Buildroot] [PATCH v2 1/4] package/webkitgtk: security bump to version 2.40.5 Yann E. MORIN
2023-09-26 6:06 ` Peter Korsgaard
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=20230909075753.7471-4-thomas@devoogdt.com \
--to=thomas@devoogdt.com \
--cc=aperez@igalia.com \
--cc=buildroot@buildroot.org \
--cc=thomas.devoogdt@barco.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox