Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/webkitgtk: allow both X11 and Wayland
@ 2023-04-13 14:29 Adrian Perez de Castro
  2023-04-13 14:37 ` Adrian Perez de Castro
  2023-09-08 12:53 ` [Buildroot] [PATCH v1 1/4] package/webkitgtk: security bump to version 2.40.5 Thomas Devoogdt
  0 siblings, 2 replies; 10+ messages in thread
From: Adrian Perez de Castro @ 2023-04-13 14:29 UTC (permalink / raw)
  To: buildroot; +Cc: Adrian Perez de Castro

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.

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
 package/webkitgtk/webkitgtk.mk | 37 +++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk
index 3263f7fea0..8d88d0914e 100644
--- a/package/webkitgtk/webkitgtk.mk
+++ b/package/webkitgtk/webkitgtk.mk
@@ -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)
-- 
2.40.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH] package/webkitgtk: allow both X11 and Wayland
  2023-04-13 14:29 [Buildroot] [PATCH] package/webkitgtk: allow both X11 and Wayland Adrian Perez de Castro
@ 2023-04-13 14:37 ` Adrian Perez de Castro
  2023-04-13 14:39   ` Adrian Perez de Castro
  2023-09-08 12:53 ` [Buildroot] [PATCH v1 1/4] package/webkitgtk: security bump to version 2.40.5 Thomas Devoogdt
  1 sibling, 1 reply; 10+ messages in thread
From: Adrian Perez de Castro @ 2023-04-13 14:37 UTC (permalink / raw)
  To: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 4142 bytes --]

Hi,

A couple of extra notes...

On Thu, 13 Apr 2023 17:29:27 +0300 Adrian Perez de Castro <aperez@igalia.com> wrote:

> 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.

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 ;-)

> 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.

> Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> ---
>  package/webkitgtk/webkitgtk.mk | 37 +++++++++++++++++-----------------
>  1 file changed, 19 insertions(+), 18 deletions(-)
> 
> diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk
> index 3263f7fea0..8d88d0914e 100644
> --- a/package/webkitgtk/webkitgtk.mk
> +++ b/package/webkitgtk/webkitgtk.mk
> @@ -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)
> -- 
> 2.40.0
> 
> 

Cheers,
—Adrián

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH] package/webkitgtk: allow both X11 and Wayland
  2023-04-13 14:37 ` Adrian Perez de Castro
@ 2023-04-13 14:39   ` Adrian Perez de Castro
  0 siblings, 0 replies; 10+ messages in thread
From: Adrian Perez de Castro @ 2023-04-13 14:39 UTC (permalink / raw)
  To: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 4635 bytes --]

One more thing...

On Thu, 13 Apr 2023 17:37:28 +0300 Adrian Perez de Castro <aperez@igalia.com> wrote:
 
> A couple of extra notes...
> 
> On Thu, 13 Apr 2023 17:29:27 +0300 Adrian Perez de Castro <aperez@igalia.com> wrote:
> 
> > 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.
> 
> 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 ;-)
> 
> > 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.

You will need this patch to successfully build WebKitGTK with X11 support:

  https://patchwork.ozlabs.org/project/buildroot/patch/20230412222640.109345-1-stefan@ott.net/

> > Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> > ---
> >  package/webkitgtk/webkitgtk.mk | 37 +++++++++++++++++-----------------
> >  1 file changed, 19 insertions(+), 18 deletions(-)
> > 
> > diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk
> > index 3263f7fea0..8d88d0914e 100644
> > --- a/package/webkitgtk/webkitgtk.mk
> > +++ b/package/webkitgtk/webkitgtk.mk
> > @@ -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)
> > -- 
> > 2.40.0
> > 
> > 
> 
> Cheers,
> —Adrián

Cheers,
—Adrián

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH] package/webkitgtk: allow both X11 and Wayland
@ 2023-04-13 21:14 Thomas Devoogdt
  2023-04-13 21:54 ` Adrian Perez de Castro
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Devoogdt @ 2023-04-13 21:14 UTC (permalink / raw)
  To: Adrian Perez de Castro; +Cc: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 419 bytes --]

Hi,

I have a serie of patches which are still open, related to that atk bridge.

https://patchwork.ozlabs.org/project/buildroot/list/?series=343801

I was also planning to make a patch with webkitgtk 2.40, but didn't do that
since my other patches aren't merged yet. If you do it, know that I already
upstreamed the host-unifdef package and that the minimum required GCC
version need to be bumped as well.

Kr

Thomas

[-- Attachment #1.2: Type: text/html, Size: 802 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH] package/webkitgtk: allow both X11 and Wayland
  2023-04-13 21:14 [Buildroot] [PATCH] package/webkitgtk: allow both X11 and Wayland Thomas Devoogdt
@ 2023-04-13 21:54 ` Adrian Perez de Castro
  2023-04-14  8:12   ` Thomas Devoogdt
  0 siblings, 1 reply; 10+ messages in thread
From: Adrian Perez de Castro @ 2023-04-13 21:54 UTC (permalink / raw)
  To: Thomas Devoogdt; +Cc: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 845 bytes --]

Hi Thomas,

On Thu, 13 Apr 2023 23:14:23 +0200 Thomas Devoogdt <thomas@devoogdt.com> wrote:

> I have a serie of patches which are still open, related to that atk bridge.
> 
> https://patchwork.ozlabs.org/project/buildroot/list/?series=343801

Ah, interesting, I will take a look tomorrow.
 
> I was also planning to make a patch with webkitgtk 2.40, but didn't do that
> since my other patches aren't merged yet. If you do it, know that I already
> upstreamed the host-unifdef package and that the minimum required GCC
> version need to be bumped as well.

Nice, you saved me from having to do host-unifdef myself. I have already a
patch [1] for the 2.40.0 update, which is now receiving a round of testing
before I submit it :)

Cheers,
—Adrián

---
[1] https://git.sr.ht/~aperezdc/buildroot/commit/15e3ffeabec515f07108079660a26aba025a39f6

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH] package/webkitgtk: allow both X11 and Wayland
  2023-04-13 21:54 ` Adrian Perez de Castro
@ 2023-04-14  8:12   ` Thomas Devoogdt
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Devoogdt @ 2023-04-14  8:12 UTC (permalink / raw)
  To: Adrian Perez de Castro; +Cc: Thomas Devoogdt, buildroot

Hi,

I saw your commit, don't forget to update the comment "comment
"webkitgtk needs ...",
there is also a mention of the GCC version there.

Kr,

Thomas

Op do 13 apr 2023 om 23:54 schreef Adrian Perez de Castro <aperez@igalia.com>:
>
> Hi Thomas,
>
> On Thu, 13 Apr 2023 23:14:23 +0200 Thomas Devoogdt <thomas@devoogdt.com> wrote:
>
> > I have a serie of patches which are still open, related to that atk bridge.
> >
> > https://patchwork.ozlabs.org/project/buildroot/list/?series=343801
>
> Ah, interesting, I will take a look tomorrow.
>
> > I was also planning to make a patch with webkitgtk 2.40, but didn't do that
> > since my other patches aren't merged yet. If you do it, know that I already
> > upstreamed the host-unifdef package and that the minimum required GCC
> > version need to be bumped as well.
>
> Nice, you saved me from having to do host-unifdef myself. I have already a
> patch [1] for the 2.40.0 update, which is now receiving a round of testing
> before I submit it :)
>
> Cheers,
> —Adrián
>
> ---
> [1] https://git.sr.ht/~aperezdc/buildroot/commit/15e3ffeabec515f07108079660a26aba025a39f6
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v1 1/4] package/webkitgtk: security bump to version 2.40.5
  2023-04-13 14:29 [Buildroot] [PATCH] package/webkitgtk: allow both X11 and Wayland Adrian Perez de Castro
  2023-04-13 14:37 ` Adrian Perez de Castro
@ 2023-09-08 12:53 ` Thomas Devoogdt
  2023-09-08 12:53   ` [Buildroot] [PATCH v1 2/4] package/webkitgtk: allow both X11 and Wayland Thomas Devoogdt
                     ` (2 more replies)
  1 sibling, 3 replies; 10+ messages in thread
From: Thomas Devoogdt @ 2023-09-08 12:53 UTC (permalink / raw)
  To: buildroot; +Cc: Adrian Perez de Castro, Thomas Devoogdt

Bugfix 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

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
---
 ...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

diff --git a/package/webkitgtk/0001-Fix-build-failure-when-gstreamer-support-is-disabled.patch b/package/webkitgtk/0001-Fix-build-failure-when-gstreamer-support-is-disabled.patch
new file mode 100644
index 0000000000..3fa23b215b
--- /dev/null
+++ b/package/webkitgtk/0001-Fix-build-failure-when-gstreamer-support-is-disabled.patch
@@ -0,0 +1,36 @@
+From 9b31965cdf362768e86f7e592e59e68fb3351261 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+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 <thomas.devoogdt@barco.com>
+---
+ 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
+
diff --git a/package/webkitgtk/webkitgtk.hash b/package/webkitgtk/webkitgtk.hash
index 756ac13ec2..7f50f1aa7b 100644
--- a/package/webkitgtk/webkitgtk.hash
+++ b/package/webkitgtk/webkitgtk.hash
@@ -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
diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk
index 32f6102797..71599477f2 100644
--- a/package/webkitgtk/webkitgtk.mk
+++ b/package/webkitgtk/webkitgtk.mk
@@ -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
-- 
2.42.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v1 2/4] package/webkitgtk: allow both X11 and Wayland
  2023-09-08 12:53 ` [Buildroot] [PATCH v1 1/4] package/webkitgtk: security bump to version 2.40.5 Thomas Devoogdt
@ 2023-09-08 12:53   ` Thomas Devoogdt
  2023-09-08 12:53   ` [Buildroot] [PATCH v1 3/4] package/webkitgtk: make gbm support optional Thomas Devoogdt
  2023-09-08 12:54   ` [Buildroot] [PATCH v1 4/4] package/webkitgtk: add a USE_OPENGL_OR_ES config option Thomas Devoogdt
  2 siblings, 0 replies; 10+ messages in thread
From: Thomas Devoogdt @ 2023-09-08 12:53 UTC (permalink / raw)
  To: buildroot; +Cc: Adrian Perez de Castro, Thomas Devoogdt

From: Adrian Perez de Castro <aperez@igalia.com>

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.

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
---
 package/webkitgtk/webkitgtk.mk | 35 +++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk
index 71599477f2..be2d04054c 100644
--- a/package/webkitgtk/webkitgtk.mk
+++ b/package/webkitgtk/webkitgtk.mk
@@ -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)
-- 
2.42.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v1 3/4] package/webkitgtk: make gbm support optional
  2023-09-08 12:53 ` [Buildroot] [PATCH v1 1/4] package/webkitgtk: security bump to version 2.40.5 Thomas Devoogdt
  2023-09-08 12:53   ` [Buildroot] [PATCH v1 2/4] package/webkitgtk: allow both X11 and Wayland Thomas Devoogdt
@ 2023-09-08 12:53   ` Thomas Devoogdt
  2023-09-08 12:54   ` [Buildroot] [PATCH v1 4/4] package/webkitgtk: add a USE_OPENGL_OR_ES config option Thomas Devoogdt
  2 siblings, 0 replies; 10+ messages in thread
From: Thomas Devoogdt @ 2023-09-08 12:53 UTC (permalink / raw)
  To: buildroot; +Cc: Adrian Perez de Castro, Thomas Devoogdt

This was added upstream in commit:
https://github.com/WebKit/WebKit/commit/22e4c0386605d84f42f2d46fd20bdc46e3078498

Only enable it BR2_PACKAGE_HAS_LIBGBM.

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
---
 package/webkitgtk/webkitgtk.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk
index be2d04054c..c096e3b3c1 100644
--- a/package/webkitgtk/webkitgtk.mk
+++ b/package/webkitgtk/webkitgtk.mk
@@ -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 \
-- 
2.42.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v1 4/4] package/webkitgtk: add a USE_OPENGL_OR_ES config option
  2023-09-08 12:53 ` [Buildroot] [PATCH v1 1/4] package/webkitgtk: security bump to version 2.40.5 Thomas Devoogdt
  2023-09-08 12:53   ` [Buildroot] [PATCH v1 2/4] package/webkitgtk: allow both X11 and Wayland Thomas Devoogdt
  2023-09-08 12:53   ` [Buildroot] [PATCH v1 3/4] package/webkitgtk: make gbm support optional Thomas Devoogdt
@ 2023-09-08 12:54   ` Thomas Devoogdt
  2 siblings, 0 replies; 10+ messages in thread
From: Thomas Devoogdt @ 2023-09-08 12:54 UTC (permalink / raw)
  To: buildroot; +Cc: Adrian Perez de Castro, Thomas Devoogdt

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>
---
 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 c096e3b3c1..2f48bc76d9 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 \
@@ -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
 
-- 
2.42.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-09-08 12:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-13 14:29 [Buildroot] [PATCH] package/webkitgtk: allow both X11 and Wayland Adrian Perez de Castro
2023-04-13 14:37 ` Adrian Perez de Castro
2023-04-13 14:39   ` Adrian Perez de Castro
2023-09-08 12:53 ` [Buildroot] [PATCH v1 1/4] package/webkitgtk: security bump to version 2.40.5 Thomas Devoogdt
2023-09-08 12:53   ` [Buildroot] [PATCH v1 2/4] package/webkitgtk: allow both X11 and Wayland Thomas Devoogdt
2023-09-08 12:53   ` [Buildroot] [PATCH v1 3/4] package/webkitgtk: make gbm support optional Thomas Devoogdt
2023-09-08 12:54   ` [Buildroot] [PATCH v1 4/4] package/webkitgtk: add a USE_OPENGL_OR_ES config option Thomas Devoogdt
  -- strict thread matches above, loose matches on Subject: below --
2023-04-13 21:14 [Buildroot] [PATCH] package/webkitgtk: allow both X11 and Wayland Thomas Devoogdt
2023-04-13 21:54 ` Adrian Perez de Castro
2023-04-14  8:12   ` Thomas Devoogdt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox