package/webkitgtk: allow both X11 and Wayland
PATCH 1/1 package/webkitgtk: allow both X11 and Wayland
Allow enabling support for both the X11 and Wayland backends.
This in turn needs reorganizing how desktop GL or OpenGL ES is chosen, as it no longer can depend on whether Wayland support is enabled: the BR2_PACKAGE_HAS_LIBGL and BR2_PACKAGE_HAS_LIBGLES variables are both checked, and ENABLE_GLES2 is set only if the package providing OpenGL claims only GLES is supported; otherwise desktop GL is preferred. This matches the existing logic.
The existing comment indicating that only one of both windowing systems can be enabled was wrong: the same WebKitGTK build can target both X11 and Wayland at the same time, as long as GTK itself has been built accordingly. Enabling both is the approach taken by most Linux distributions, and has been supported for years.
--- package/webkitgtk/webkitgtk.mk | 37 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 18 deletions(-)
package/webkitgtk/webkitgtk.mk +19 -18
@@ -77,32 +77,33 @@ else WEBKITGTK_CONF_OPTS += -DENABLE_GAMEPAD=OFF endif -# Only one target platform can be built, assume X11 > Wayland - -# GTK3-X11 target gives OpenGL from newer libgtk3 versions -# Consider this better than EGL + maybe GLESv2 since both can't be built -# 2D CANVAS acceleration requires OpenGL proper with cairo-gl -ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y) -WEBKITGTK_CONF_OPTS += \ - -DENABLE_GLES2=OFF \ - -DENABLE_X11_TARGET=ON -WEBKITGTK_DEPENDENCIES += libgl \ - xlib_libXcomposite xlib_libXdamage xlib_libXrender xlib_libXt -else # !X11 -# GTK3-BROADWAY/WAYLAND needs at least EGL -WEBKITGTK_DEPENDENCIES += libegl -# GLESv2 support is optional though -ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y) +# Use GLES if available and desktop GL is not. +$(info $(BR2_PACKAGE_HAS_LIBGL):$(BR2_PACKAGE_HAS_LIBGLES)) +ifeq ($(BR2_PACKAGE_HAS_LIBGL):$(BR2_PACKAGE_HAS_LIBGLES),:y) WEBKITGTK_CONF_OPTS += -DENABLE_GLES2=ON WEBKITGTK_DEPENDENCIES += libgles else -# Disable general OpenGL (shading) if there's no GLESv2 WEBKITGTK_CONF_OPTS += -DENABLE_GLES2=OFF endif -# We must explicitly state the wayland target + +ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y) +WEBKITGTK_CONF_OPTS += -DENABLE_X11_TARGET=ON +WEBKITGTK_DEPENDENCIES += libgl \ + xlib_libXcomposite xlib_libXdamage xlib_libXrender xlib_libXt +else +WEBKITGTK_CONF_OPTS += -DENABLE_X11_TARGET=OFF +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) +WEBKITGTK_DEPENDENCIES += libegl endif ifeq ($(BR2_PACKAGE_LIBGTK3_WAYLAND)$(BR2_PACKAGE_WPEBACKEND_FDO),yy)
Signature · 6 lines
2.40.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi,
A couple of extra notes...
Quoted 8 lines · On Thu, 13 Apr 2023 17:29:27 +0300 Adrian Perez de Castro <[email protected]>…
Allow enabling support for both the X11 and Wayland backends.
This in turn needs reorganizing how desktop GL or OpenGL ES is chosen, as it no longer can depend on whether Wayland support is enabled: the
BR2_PACKAGE_HAS_LIBGLandBR2_PACKAGE_HAS_LIBGLESvariables are both checked, andENABLE_GLES2is set only if the package providing OpenGL claims only GLES is supported; otherwise desktop GL is preferred. This matches the existing logic.
Note that it is possible to pass -DUSE_OPENGL_OR_ES=OFF to CMake to make WebKitGTK use only Cairo, and skip using OpenGL at all. This is never used in Buildroot because the libgtk3 package depends on OpenGL being available anyway, so I figured there is no point in building WebKitGTK with OpenGL disabled. Moreover, some modern features (like CSS 3D transforms) don't work when OpenGL support is disabled, so with my WebKit developer hat on I cannot really recommend using -DUSE_OPENGL_OR_ES=OFF ;-)
Quoted 5 lines
The existing comment indicating that only one of both windowing systems can be enabled was wrong: the same WebKitGTK build can target both X11 and Wayland at the same time, as long as GTK itself has been built accordingly. Enabling both is the approach taken by most Linux distributions, and has been supported for years.
The comment can be traced all the way to the commit that added the WebKitGTK package (1f5bb4454474886a2e321ab59f71bdc919516312). I only recently needed to make a build with both enabled and noticed that only one backend was being allowed by webkitgtk.mk--a bit embarrasing, given that I have been maintaining the package for a few years now.
Quoted 65 lines
Signed-off-by Adrian Perez de Castro <[email protected]>--- package/webkitgtk/webkitgtk.mk | 37 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 18 deletions(-)package/webkitgtk/webkitgtk.mk +19
-18@@ -77,32 +77,33 @@ else WEBKITGTK_CONF_OPTS += -DENABLE_GAMEPAD=OFF endif -# Only one target platform can be built, assume X11 > Wayland - -# GTK3-X11 target gives OpenGL from newer libgtk3 versions -# Consider this better than EGL + maybe GLESv2 since both can't be built -# 2D CANVAS acceleration requires OpenGL proper with cairo-gl -ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y) -WEBKITGTK_CONF_OPTS += \ - -DENABLE_GLES2=OFF \ - -DENABLE_X11_TARGET=ON -WEBKITGTK_DEPENDENCIES += libgl \ - xlib_libXcomposite xlib_libXdamage xlib_libXrender xlib_libXt -else # !X11 -# GTK3-BROADWAY/WAYLAND needs at least EGL -WEBKITGTK_DEPENDENCIES += libegl -# GLESv2 support is optional though -ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y) +# Use GLES if available and desktop GL is not. +$(info $(BR2_PACKAGE_HAS_LIBGL):$(BR2_PACKAGE_HAS_LIBGLES)) +ifeq ($(BR2_PACKAGE_HAS_LIBGL):$(BR2_PACKAGE_HAS_LIBGLES),:y) WEBKITGTK_CONF_OPTS += -DENABLE_GLES2=ON WEBKITGTK_DEPENDENCIES += libgles else -# Disable general OpenGL (shading) if there's no GLESv2 WEBKITGTK_CONF_OPTS += -DENABLE_GLES2=OFF endif -# We must explicitly state the wayland target + +ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y) +WEBKITGTK_CONF_OPTS += -DENABLE_X11_TARGET=ON +WEBKITGTK_DEPENDENCIES += libgl \ + xlib_libXcomposite xlib_libXdamage xlib_libXrender xlib_libXt +else +WEBKITGTK_CONF_OPTS += -DENABLE_X11_TARGET=OFF +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) +WEBKITGTK_DEPENDENCIES += libegl endif ifeq ($(BR2_PACKAGE_LIBGTK3_WAYLAND)$(BR2_PACKAGE_WPEBACKEND_FDO),yy)Signature · 1 line
2.40.0
Cheers,
—Adrián
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
One more thing...
Quoted 27 lines · On Thu, 13 Apr 2023 17:37:28 +0300 Adrian Perez de Castro <[email protected]>…
A couple of extra notes...
Quoted 8 lines · On Thu, 13 Apr 2023 17:29:27 +0300 Adrian Perez de Castro <[email protected]>…
Allow enabling support for both the X11 and Wayland backends.
This in turn needs reorganizing how desktop GL or OpenGL ES is chosen, as it no longer can depend on whether Wayland support is enabled: the
BR2_PACKAGE_HAS_LIBGLandBR2_PACKAGE_HAS_LIBGLESvariables are both checked, andENABLE_GLES2is set only if the package providing OpenGL claims only GLES is supported; otherwise desktop GL is preferred. This matches the existing logic.Note that it is possible to pass -DUSE_OPENGL_OR_ES=OFF to CMake to make WebKitGTK use only Cairo, and skip using OpenGL at all. This is never used in Buildroot because the libgtk3 package depends on OpenGL being available anyway, so I figured there is no point in building WebKitGTK with OpenGL disabled. Moreover, some modern features (like CSS 3D transforms) don't work when OpenGL support is disabled, so with my WebKit developer hat on I cannot really recommend using -DUSE_OPENGL_OR_ES=OFF ;-)
Quoted 5 lines
The existing comment indicating that only one of both windowing systems can be enabled was wrong: the same WebKitGTK build can target both X11 and Wayland at the same time, as long as GTK itself has been built accordingly. Enabling both is the approach taken by most Linux distributions, and has been supported for years.
Quoted 5 lines
The comment can be traced all the way to the commit that added the WebKitGTK package (
1f5bb4454474886a2e321ab59f71bdc919516312). I only recently needed to make a build with both enabled and noticed that only one backend was being allowed by webkitgtk.mk--a bit embarrasing, given that I have been maintaining the package for a few years now.
You will need this patch to successfully build WebKitGTK with X11 support:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
Quoted 60 lines
Quoted 60 lines
Signed-off-by Adrian Perez de Castro <[email protected]>--- package/webkitgtk/webkitgtk.mk | 37 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 18 deletions(-)package/webkitgtk/webkitgtk.mk +19
-18@@ -77,32 +77,33 @@ else WEBKITGTK_CONF_OPTS += -DENABLE_GAMEPAD=OFF endif -# Only one target platform can be built, assume X11 > Wayland - -# GTK3-X11 target gives OpenGL from newer libgtk3 versions -# Consider this better than EGL + maybe GLESv2 since both can't be built -# 2D CANVAS acceleration requires OpenGL proper with cairo-gl -ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y) -WEBKITGTK_CONF_OPTS += \ - -DENABLE_GLES2=OFF \ - -DENABLE_X11_TARGET=ON -WEBKITGTK_DEPENDENCIES += libgl \ - xlib_libXcomposite xlib_libXdamage xlib_libXrender xlib_libXt -else # !X11 -# GTK3-BROADWAY/WAYLAND needs at least EGL -WEBKITGTK_DEPENDENCIES += libegl -# GLESv2 support is optional though -ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y) +# Use GLES if available and desktop GL is not. +$(info $(BR2_PACKAGE_HAS_LIBGL):$(BR2_PACKAGE_HAS_LIBGLES)) +ifeq ($(BR2_PACKAGE_HAS_LIBGL):$(BR2_PACKAGE_HAS_LIBGLES),:y) WEBKITGTK_CONF_OPTS += -DENABLE_GLES2=ON WEBKITGTK_DEPENDENCIES += libgles else -# Disable general OpenGL (shading) if there's no GLESv2 WEBKITGTK_CONF_OPTS += -DENABLE_GLES2=OFF endif -# We must explicitly state the wayland target + +ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y) +WEBKITGTK_CONF_OPTS += -DENABLE_X11_TARGET=ON +WEBKITGTK_DEPENDENCIES += libgl \ + xlib_libXcomposite xlib_libXdamage xlib_libXrender xlib_libXt +else +WEBKITGTK_CONF_OPTS += -DENABLE_X11_TARGET=OFF +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) +WEBKITGTK_DEPENDENCIES += libegl endif
Quoted 8 lines
Quoted 5 lines
package/webkitgtk/webkitgtk.mk +0
-0ifeq ($(BR2_PACKAGE_LIBGTK3_WAYLAND)$(BR2_PACKAGE_WPEBACKEND_FDO),yy)Signature · 1 line
2.40.0Cheers,
—Adrián
Cheers,
—Adrián
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 1/4 package/webkitgtk: security bump to version 2.40.5
In reply to Adrian Perez de CastroBugfix release with many security fixes, including (but not limited to) patches for CVE-2023-37450, CVE-2023-38133, CVE-2023-38572, CVE-2023-38592, CVE-2023-38594, CVE-2023-38595, CVE-2023-38597, CVE-2023-38599, CVE-2023-38600, and CVE-2023-38611.
Release notes:
https://webkitgtk.org/2023/07/21/webkitgtk2.40.4-released.html
https://webkitgtk.org/2023/08/01/webkitgtk2.40.5-released.html
Accompanying security advisory:
https://webkitgtk.org/security/WSA-2023-0006.html
https://webkitgtk.org/security/WSA-2023-0007.html
--- ...e-when-gstreamer-support-is-disabled.patch | 36 +++++++++++++++++++ package/webkitgtk/webkitgtk.hash | 6 ++-- package/webkitgtk/webkitgtk.mk | 2 +- 3 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 package/webkitgtk/0001-Fix-build-failure-when-gstreamer-support-is-disabled.patch
package/webkitgtk/0001-Fix-build-failure-when-gstreamer-support-is-disabled.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 9b31965cdf362768e86f7e592e59e68fb3351261 Mon Sep 17 00:00:00 2001 +From: Matt Turner <[email protected]> +Date: Tue, 8 Aug 2023 16:51:25 -0700 +Subject: [PATCH] Fix build failure when gstreamer support is disabled + https://bugs.webkit.org/show_bug.cgi?id=259931 https://bugs.gentoo.org/911663 + +Reviewed by Carlos Alberto Lopez Perez. + +* Source/WebCore/loader/MixedContentChecker.cpp: + +Canonical link: https://commits.webkit.org/260527.429@fix-build + +(cherry picked from commit f5ceef5bf2e3c4d7203a37b9e2d2fdd9b1bb2732) + +Upstream: https://github.com/WebKit/WebKit/commit/f5ceef5bf2e3c4d7203a37b9e2d2fdd9b1bb2732 +Signed-off-by: Thomas Devoogdt <[email protected]> +--- + Source/WebCore/loader/MixedContentChecker.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Source/WebCore/loader/MixedContentChecker.cpp b/Source/WebCore/loader/MixedContentChecker.cpp +index 9b4c7fe62020..ac4733bc08bc 100644 +--- a/Source/WebCore/loader/MixedContentChecker.cpp ++++ b/Source/WebCore/loader/MixedContentChecker.cpp +@@ -33,6 +33,8 @@ + #include "ContentSecurityPolicy.h" + #include "Document.h" + #include "Frame.h" ++#include "FrameLoader.h" ++#include "FrameLoaderClient.h" + #include "SecurityOrigin.h" + + namespace WebCore { +-- +2.42.0 +
package/webkitgtk/webkitgtk.hash +3 -3
@@ -1,6 +1,6 @@ -# From https://www.webkitgtk.org/releases/webkitgtk-2.40.3.tar.xz.sums -sha1 74ee7241f2add46897019e22bd4f8e19e09027bb webkitgtk-2.40.3.tar.xz -sha256 cc0aa83f40dbc64c1c6ae42ec6b85af4be2a9dbf524cfcb95f89a367fb5098dd webkitgtk-2.40.3.tar.xz +# From https://www.webkitgtk.org/releases/webkitgtk-2.40.5.tar.xz.sums +sha1 2f4d06b021115eb4106177f7d5f534f45b5d3b2e webkitgtk-2.40.5.tar.xz +sha256 7de051a263668621d91a61a5eb1c3771d1a7cec900043d4afef06c326c16037f webkitgtk-2.40.5.tar.xz # Hashes for license files: sha256 0b5d3a7cc325942567373b0ecd757d07c132e0ebd7c97bfc63f7e1a76094edb4 Source/WebCore/LICENSE-APPLE
package/webkitgtk/webkitgtk.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -WEBKITGTK_VERSION = 2.40.3 +WEBKITGTK_VERSION = 2.40.5 WEBKITGTK_SITE = https://www.webkitgtk.org/releases WEBKITGTK_SOURCE = webkitgtk-$(WEBKITGTK_VERSION).tar.xz WEBKITGTK_INSTALL_STAGING = YES
Signature · 6 lines
2.42.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/4 package/webkitgtk: allow both X11 and Wayland
From: Adrian Perez de Castro <[email protected]>
Allow enabling support for both the X11 and Wayland backends.
This in turn needs reorganizing how desktop GL or OpenGL ES is chosen, as it no longer can depend on whether Wayland support is enabled: the BR2_PACKAGE_HAS_LIBGL and BR2_PACKAGE_HAS_LIBGLES variables are both checked, and ENABLE_GLES2 is set only if the package providing OpenGL claims only GLES is supported; otherwise desktop GL is preferred. This matches the existing logic.
The existing comment indicating that only one of both windowing systems can be enabled was wrong: the same WebKitGTK build can target both X11 and Wayland at the same time, as long as GTK itself has been built accordingly. Enabling both is the approach taken by most Linux distributions, and has been supported for years.
--- package/webkitgtk/webkitgtk.mk | 35 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-)
package/webkitgtk/webkitgtk.mk +18 -17
@@ -80,32 +80,33 @@ else WEBKITGTK_CONF_OPTS += -DENABLE_GAMEPAD=OFF endif -# Only one target platform can be built, assume X11 > Wayland +# Use GLES if available and desktop GL is not. +$(info $(BR2_PACKAGE_HAS_LIBGL):$(BR2_PACKAGE_HAS_LIBGLES)) +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 -# GTK3-X11 target gives OpenGL from newer libgtk3 versions -# Consider this better than EGL + maybe GLESv2 since both can't be built -# 2D CANVAS acceleration requires OpenGL proper with cairo-gl ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y) -WEBKITGTK_CONF_OPTS += \ - -DENABLE_GLES2=OFF \ - -DENABLE_X11_TARGET=ON +WEBKITGTK_CONF_OPTS += -DENABLE_X11_TARGET=ON WEBKITGTK_DEPENDENCIES += libgl \ xlib_libXcomposite xlib_libXdamage xlib_libXrender xlib_libXt -else # !X11 -# GTK3-BROADWAY/WAYLAND needs at least EGL -WEBKITGTK_DEPENDENCIES += libegl -# GLESv2 support is optional though -ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y) -WEBKITGTK_CONF_OPTS += -DENABLE_GLES2=ON -WEBKITGTK_DEPENDENCIES += libgles else -# Disable general OpenGL (shading) if there's no GLESv2 -WEBKITGTK_CONF_OPTS += -DENABLE_GLES2=OFF +WEBKITGTK_CONF_OPTS += -DENABLE_X11_TARGET=OFF endif -# We must explicitly state the wayland target + 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) +WEBKITGTK_DEPENDENCIES += libegl endif ifeq ($(BR2_PACKAGE_LIBGTK3_WAYLAND)$(BR2_PACKAGE_WPEBACKEND_FDO),yy)
Signature · 6 lines
2.42.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 3/4 package/webkitgtk: make gbm support optional
In reply to Thomas DevoogdtThis was added upstream in commit:
https://github.com/WebKit/WebKit/commit/22e4c0386605d84f42f2d46fd20bdc46e3078498
Only enable it BR2_PACKAGE_HAS_LIBGBM.
--- package/webkitgtk/webkitgtk.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/webkitgtk/webkitgtk.mk +7 -0
@@ -89,6 +89,13 @@ else WEBKITGTK_CONF_OPTS += -DENABLE_GLES2=OFF endif +ifeq ($(BR2_PACKAGE_HAS_LIBGBM),y) +WEBKITGTK_CONF_OPTS += -DUSE_GBM=ON +WEBKITGTK_DEPENDENCIES += libgbm +else +WEBKITGTK_CONF_OPTS += -DUSE_GBM=OFF +endif + ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y) WEBKITGTK_CONF_OPTS += -DENABLE_X11_TARGET=ON WEBKITGTK_DEPENDENCIES += libgl \
Signature · 6 lines
2.42.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 4/4 package/webkitgtk: add a USE_OPENGL_OR_ES config option
In reply to Thomas DevoogdtOpenGL 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.
--- package/webkitgtk/Config.in | 10 ++++++++++ package/webkitgtk/webkitgtk.mk | 24 +++++++++++++++++++----- 2 files changed, 29 insertions(+), 5 deletions(-)
package/webkitgtk/Config.in +10 -0
@@ -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
package/webkitgtk/webkitgtk.mk +19 -5
@@ -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 \
@@ -84,7 +90,6 @@ endif $(info $(BR2_PACKAGE_HAS_LIBGL):$(BR2_PACKAGE_HAS_LIBGLES)) 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
@@ -98,7 +103,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
@@ -106,13 +111,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
Signature · 6 lines
2.42.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot