diff mbox series

[v1] package/webkitgtk: restore libsoup support

Message ID 20240901121122.3113482-1-thomas@devoogdt.com
State Rejected
Headers show
Series [v1] package/webkitgtk: restore libsoup support | expand

Commit Message

Thomas Devoogdt Sept. 1, 2024, 12:11 p.m. UTC
The midori browser still uses libsoup and was broken since commit
38a098df133aaa2ebf09742054b02db5a44f58e5. This commit allows the
use of libsoup, libsoup3 stays the default.

Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
---
This is a bit a replacement for https://patchwork.ozlabs.org/project/buildroot/patch/20240829131232.2132854-2-thomas@devoogdt.com/.
I don't use midori or libsoup2, and it's still not maintained, so it's also fine to accept the other commit and drop midori altogether.
---
 package/webkitgtk/Config.in    | 11 ++++++-----
 package/webkitgtk/webkitgtk.mk | 12 ++++++++++--
 2 files changed, 16 insertions(+), 7 deletions(-)

Comments

Yann E. MORIN Sept. 2, 2024, 3:41 p.m. UTC | #1
Thomas, All,

On 2024-09-01 14:11 +0200, Thomas Devoogdt spake thusly:
> The midori browser still uses libsoup and was broken since commit
> 38a098df133aaa2ebf09742054b02db5a44f58e5. This commit allows the
> use of libsoup, libsoup3 stays the default.
> 
> Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
> ---
> This is a bit a replacement for https://patchwork.ozlabs.org/project/buildroot/patch/20240829131232.2132854-2-thomas@devoogdt.com/.
> I don't use midori or libsoup2, and it's still not maintained, so it's also fine to accept the other commit and drop midori altogether.

In the end, I applied the patch removing midori.

And apart for midori, does it make sense to restore using libsoup at
all, or should we drop this patch and keep only libsoup3?

Thanks!

Regards,
Yann E. MORIN.

> ---
>  package/webkitgtk/Config.in    | 11 ++++++-----
>  package/webkitgtk/webkitgtk.mk | 12 ++++++++++--
>  2 files changed, 16 insertions(+), 7 deletions(-)
> 
> diff --git a/package/webkitgtk/Config.in b/package/webkitgtk/Config.in
> index a556fec194..5f9c24d610 100644
> --- a/package/webkitgtk/Config.in
> +++ b/package/webkitgtk/Config.in
> @@ -33,9 +33,9 @@ config BR2_PACKAGE_WEBKITGTK
>  	depends on BR2_PACKAGE_HAS_LIBEGL
>  	depends on BR2_HOST_GCC_AT_LEAST_4_9 # icu, host-ruby
>  	depends on BR2_INSTALL_LIBSTDCPP
> -	depends on BR2_TOOLCHAIN_HAS_THREADS # wayland, icu, libsoup3
> +	depends on BR2_TOOLCHAIN_HAS_THREADS # wayland, icu, libsoup/libsoup3
>  	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_10
> -	depends on BR2_USE_WCHAR # icu, libsoup3
> +	depends on BR2_USE_WCHAR # icu, libsoup/libsoup3
>  	depends on BR2_PACKAGE_LIBGTK3 || BR2_PACKAGE_LIBGTK4
>  	depends on BR2_PACKAGE_WEBKITGTK_ARCH_SUPPORTS
>  	select BR2_PACKAGE_CAIRO
> @@ -47,7 +47,7 @@ config BR2_PACKAGE_WEBKITGTK
>  	select BR2_PACKAGE_LIBEPOXY
>  	select BR2_PACKAGE_LIBGCRYPT
>  	select BR2_PACKAGE_LIBSECRET
> -	select BR2_PACKAGE_LIBSOUP3
> +	select BR2_PACKAGE_LIBSOUP3 if !BR2_PACKAGE_LIBSOUP
>  	select BR2_PACKAGE_LIBTASN1
>  	select BR2_PACKAGE_LIBXML2
>  	select BR2_PACKAGE_LIBXSLT
> @@ -100,9 +100,10 @@ comment "sandboxing support needs a toolchain w/ headers >= 3.12"
>  
>  config BR2_PACKAGE_WEBKITGTK_HTTPS
>  	bool "HTTPS support"
> -	depends on !BR2_STATIC_LIBS # libsoup3 -> glib-networking, gnutls
> +	depends on !BR2_STATIC_LIBS # libsoup/libsoup3 -> glib-networking, gnutls
>  	select BR2_PACKAGE_CA_CERTIFICATES # runtime
> -	select BR2_PACKAGE_LIBSOUP3_SSL
> +	select BR2_PACKAGE_LIBSOUP_SSL if BR2_PACKAGE_LIBSOUP
> +	select BR2_PACKAGE_LIBSOUP3_SSL if BR2_PACKAGE_LIBSOUP3
>  	help
>  	  Enable HTTPS protocol support.
>  
> diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk
> index ff39ee01e1..af49aad96e 100644
> --- a/package/webkitgtk/webkitgtk.mk
> +++ b/package/webkitgtk/webkitgtk.mk
> @@ -14,8 +14,8 @@ WEBKITGTK_LICENSE_FILES = \
>  	Source/WebCore/LICENSE-LGPL-2.1
>  WEBKITGTK_CPE_ID_VENDOR = webkitgtk
>  WEBKITGTK_DEPENDENCIES = host-ruby host-python3 host-gperf host-unifdef \
> -	enchant harfbuzz icu jpeg libegl libepoxy libgcrypt libsecret \
> -	libsoup3 libtasn1 libxml2 libxslt sqlite webp woff2
> +	enchant harfbuzz icu jpeg libegl libepoxy libgcrypt libsecret libtasn1 \
> +	libxml2 libxslt sqlite webp woff2
>  
>  WEBKITGTK_CMAKE_BACKEND = ninja
>  
> @@ -31,6 +31,14 @@ WEBKITGTK_CONF_OPTS = \
>  	-DUSE_LIBHYPHEN=OFF \
>  	-DUSE_WOFF2=ON
>  
> +ifeq ($(BR2_PACKAGE_LIBSOUP),y)
> +WEBKITGTK_CONF_OPTS += -DUSE_SOUP2=ON
> +WEBKITGTK_DEPENDENCIES += libsoup
> +else
> +WEBKITGTK_CONF_OPTS += -DUSE_SOUP2=OFF
> +WEBKITGTK_DEPENDENCIES += libsoup3
> +endif
> +
>  ifeq ($(BR2_PACKAGE_LIBGTK4),y)
>  WEBKITGTK_CONF_OPTS += -DUSE_GTK4=ON
>  WEBKITGTK_DEPENDENCIES += libgtk4
> -- 
> 2.43.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Devoogdt Sept. 2, 2024, 4:06 p.m. UTC | #2
Hi,

Libsoup2 is still supported by webkitgtk, so having support makes sense.
But given the fact that no complain arose since the bump to libsoup3, I
doubt the usage of it. So if someone really need it, then that person can
reply on this patch as well I guess.

Kr,

Thomas

Op ma 2 sep. 2024 17:41 schreef Yann E. MORIN <yann.morin.1998@free.fr>:

> Thomas, All,
>
> On 2024-09-01 14:11 +0200, Thomas Devoogdt spake thusly:
> > The midori browser still uses libsoup and was broken since commit
> > 38a098df133aaa2ebf09742054b02db5a44f58e5. This commit allows the
> > use of libsoup, libsoup3 stays the default.
> >
> > Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
> > ---
> > This is a bit a replacement for
> https://patchwork.ozlabs.org/project/buildroot/patch/20240829131232.2132854-2-thomas@devoogdt.com/
> .
> > I don't use midori or libsoup2, and it's still not maintained, so it's
> also fine to accept the other commit and drop midori altogether.
>
> In the end, I applied the patch removing midori.
>
> And apart for midori, does it make sense to restore using libsoup at
> all, or should we drop this patch and keep only libsoup3?
>
> Thanks!
>
> Regards,
> Yann E. MORIN.
>
> > ---
> >  package/webkitgtk/Config.in    | 11 ++++++-----
> >  package/webkitgtk/webkitgtk.mk | 12 ++++++++++--
> >  2 files changed, 16 insertions(+), 7 deletions(-)
> >
> > diff --git a/package/webkitgtk/Config.in b/package/webkitgtk/Config.in
> > index a556fec194..5f9c24d610 100644
> > --- a/package/webkitgtk/Config.in
> > +++ b/package/webkitgtk/Config.in
> > @@ -33,9 +33,9 @@ config BR2_PACKAGE_WEBKITGTK
> >       depends on BR2_PACKAGE_HAS_LIBEGL
> >       depends on BR2_HOST_GCC_AT_LEAST_4_9 # icu, host-ruby
> >       depends on BR2_INSTALL_LIBSTDCPP
> > -     depends on BR2_TOOLCHAIN_HAS_THREADS # wayland, icu, libsoup3
> > +     depends on BR2_TOOLCHAIN_HAS_THREADS # wayland, icu,
> libsoup/libsoup3
> >       depends on BR2_TOOLCHAIN_GCC_AT_LEAST_10
> > -     depends on BR2_USE_WCHAR # icu, libsoup3
> > +     depends on BR2_USE_WCHAR # icu, libsoup/libsoup3
> >       depends on BR2_PACKAGE_LIBGTK3 || BR2_PACKAGE_LIBGTK4
> >       depends on BR2_PACKAGE_WEBKITGTK_ARCH_SUPPORTS
> >       select BR2_PACKAGE_CAIRO
> > @@ -47,7 +47,7 @@ config BR2_PACKAGE_WEBKITGTK
> >       select BR2_PACKAGE_LIBEPOXY
> >       select BR2_PACKAGE_LIBGCRYPT
> >       select BR2_PACKAGE_LIBSECRET
> > -     select BR2_PACKAGE_LIBSOUP3
> > +     select BR2_PACKAGE_LIBSOUP3 if !BR2_PACKAGE_LIBSOUP
> >       select BR2_PACKAGE_LIBTASN1
> >       select BR2_PACKAGE_LIBXML2
> >       select BR2_PACKAGE_LIBXSLT
> > @@ -100,9 +100,10 @@ comment "sandboxing support needs a toolchain w/
> headers >= 3.12"
> >
> >  config BR2_PACKAGE_WEBKITGTK_HTTPS
> >       bool "HTTPS support"
> > -     depends on !BR2_STATIC_LIBS # libsoup3 -> glib-networking, gnutls
> > +     depends on !BR2_STATIC_LIBS # libsoup/libsoup3 -> glib-networking,
> gnutls
> >       select BR2_PACKAGE_CA_CERTIFICATES # runtime
> > -     select BR2_PACKAGE_LIBSOUP3_SSL
> > +     select BR2_PACKAGE_LIBSOUP_SSL if BR2_PACKAGE_LIBSOUP
> > +     select BR2_PACKAGE_LIBSOUP3_SSL if BR2_PACKAGE_LIBSOUP3
> >       help
> >         Enable HTTPS protocol support.
> >
> > diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/
> webkitgtk.mk
> > index ff39ee01e1..af49aad96e 100644
> > --- a/package/webkitgtk/webkitgtk.mk
> > +++ b/package/webkitgtk/webkitgtk.mk
> > @@ -14,8 +14,8 @@ WEBKITGTK_LICENSE_FILES = \
> >       Source/WebCore/LICENSE-LGPL-2.1
> >  WEBKITGTK_CPE_ID_VENDOR = webkitgtk
> >  WEBKITGTK_DEPENDENCIES = host-ruby host-python3 host-gperf host-unifdef
> \
> > -     enchant harfbuzz icu jpeg libegl libepoxy libgcrypt libsecret \
> > -     libsoup3 libtasn1 libxml2 libxslt sqlite webp woff2
> > +     enchant harfbuzz icu jpeg libegl libepoxy libgcrypt libsecret
> libtasn1 \
> > +     libxml2 libxslt sqlite webp woff2
> >
> >  WEBKITGTK_CMAKE_BACKEND = ninja
> >
> > @@ -31,6 +31,14 @@ WEBKITGTK_CONF_OPTS = \
> >       -DUSE_LIBHYPHEN=OFF \
> >       -DUSE_WOFF2=ON
> >
> > +ifeq ($(BR2_PACKAGE_LIBSOUP),y)
> > +WEBKITGTK_CONF_OPTS += -DUSE_SOUP2=ON
> > +WEBKITGTK_DEPENDENCIES += libsoup
> > +else
> > +WEBKITGTK_CONF_OPTS += -DUSE_SOUP2=OFF
> > +WEBKITGTK_DEPENDENCIES += libsoup3
> > +endif
> > +
> >  ifeq ($(BR2_PACKAGE_LIBGTK4),y)
> >  WEBKITGTK_CONF_OPTS += -DUSE_GTK4=ON
> >  WEBKITGTK_DEPENDENCIES += libgtk4
> > --
> > 2.43.0
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
>
> --
>
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics'
> conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___
>      |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is
> no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v
>  conspiracy.  |
>
> '------------------------------^-------^------------------^--------------------'
>
>
Yann E. MORIN Sept. 2, 2024, 4:26 p.m. UTC | #3
Thomas, All,

On 2024-09-02 18:06 +0200, Thomas Devoogdt spake thusly:
> Libsoup2 is still supported by webkitgtk, so having support makes sense. But
> given the fact that no complain arose since the bump to libsoup3, I doubt the
> usage of it. So if someone really need it, then that person can reply on this
> patch as well I guess.

Agreed. I'll let the patch pending for a while, and if noone complains,
we'll drop it in a few days.

Thanks!

Regards,
Yann E. MORIN.
Adrian Perez de Castro Sept. 2, 2024, 7:37 p.m. UTC | #4
Hi Thomas, Yann,

On Mon, 02 Sep 2024 18:26:38 +0200 "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> Thomas, All,
> 
> On 2024-09-02 18:06 +0200, Thomas Devoogdt spake thusly:
> > Libsoup2 is still supported by webkitgtk, so having support makes sense. But
> > given the fact that no complain arose since the bump to libsoup3, I doubt the
> > usage of it. So if someone really need it, then that person can reply on this
> > patch as well I guess.
> 
> Agreed. I'll let the patch pending for a while, and if noone complains,
> we'll drop it in a few days.

With my WebKit developer hat on, I would also recommend keeping only one
option, and use libsoup3 =)

Now, thinking as a Buildroot user, it would be nice to have *some*
browser that uses WebKitGTK, if only for testing things before somebody
would go on and develop their own thing on top of WebKitGTK. How about
adding an option to pass ENABLE_MINIBROWSER=ON to CMake in webkitgtk.mk?
That would install /usr/libexec/webkitgtk-6.0/MiniBrowser, and a
post-install hook could add a symlink to it under /usr/bin. WDYT?
 

Cheers,
—Adrián
Yann E. MORIN Sept. 2, 2024, 8:04 p.m. UTC | #5
Adrián, All,

On 2024-09-02 22:37 +0300, Adrian Perez de Castro spake thusly:
> On Mon, 02 Sep 2024 18:26:38 +0200 "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> > On 2024-09-02 18:06 +0200, Thomas Devoogdt spake thusly:
> > > Libsoup2 is still supported by webkitgtk, so having support makes sense. But
> > > given the fact that no complain arose since the bump to libsoup3, I doubt the
> > > usage of it. So if someone really need it, then that person can reply on this
> > > patch as well I guess.
> > Agreed. I'll let the patch pending for a while, and if noone complains,
> > we'll drop it in a few days.
> With my WebKit developer hat on, I would also recommend keeping only one
> option, and use libsoup3 =)

ACK

> Now, thinking as a Buildroot user, it would be nice to have *some*
> browser that uses WebKitGTK, if only for testing things before somebody
> would go on and develop their own thing on top of WebKitGTK. How about
> adding an option to pass ENABLE_MINIBROWSER=ON to CMake in webkitgtk.mk?
> That would install /usr/libexec/webkitgtk-6.0/MiniBrowser, and a
> post-install hook could add a symlink to it under /usr/bin. WDYT?

Yes, please!

Regards,
Yann E. MORIN.
Adrian Perez de Castro Sept. 3, 2024, 10:54 a.m. UTC | #6
On Mon, 02 Sep 2024 22:04:47 +0200 "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> Adrián, All,
> 
> On 2024-09-02 22:37 +0300, Adrian Perez de Castro spake thusly:
>
> > Now, thinking as a Buildroot user, it would be nice to have *some*
> > browser that uses WebKitGTK, if only for testing things before somebody
> > would go on and develop their own thing on top of WebKitGTK. How about
> > adding an option to pass ENABLE_MINIBROWSER=ON to CMake in webkitgtk.mk?
> > That would install /usr/libexec/webkitgtk-6.0/MiniBrowser, and a
> > post-install hook could add a symlink to it under /usr/bin. WDYT?
> 
> Yes, please!

There we go:

  https://patchwork.ozlabs.org/project/buildroot/patch/20240903105105.3285178-1-aperez@igalia.com/
 
 Note the symlink is to "../libexec/webkit2gtk-4.1/MiniBrowser"; when we
 make WebKitGTK build against GTK4 we will have to change it to read
 "webkitgtk-6.0" instead =]

Cheers,
—Adrián
diff mbox series

Patch

diff --git a/package/webkitgtk/Config.in b/package/webkitgtk/Config.in
index a556fec194..5f9c24d610 100644
--- a/package/webkitgtk/Config.in
+++ b/package/webkitgtk/Config.in
@@ -33,9 +33,9 @@  config BR2_PACKAGE_WEBKITGTK
 	depends on BR2_PACKAGE_HAS_LIBEGL
 	depends on BR2_HOST_GCC_AT_LEAST_4_9 # icu, host-ruby
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on BR2_TOOLCHAIN_HAS_THREADS # wayland, icu, libsoup3
+	depends on BR2_TOOLCHAIN_HAS_THREADS # wayland, icu, libsoup/libsoup3
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_10
-	depends on BR2_USE_WCHAR # icu, libsoup3
+	depends on BR2_USE_WCHAR # icu, libsoup/libsoup3
 	depends on BR2_PACKAGE_LIBGTK3 || BR2_PACKAGE_LIBGTK4
 	depends on BR2_PACKAGE_WEBKITGTK_ARCH_SUPPORTS
 	select BR2_PACKAGE_CAIRO
@@ -47,7 +47,7 @@  config BR2_PACKAGE_WEBKITGTK
 	select BR2_PACKAGE_LIBEPOXY
 	select BR2_PACKAGE_LIBGCRYPT
 	select BR2_PACKAGE_LIBSECRET
-	select BR2_PACKAGE_LIBSOUP3
+	select BR2_PACKAGE_LIBSOUP3 if !BR2_PACKAGE_LIBSOUP
 	select BR2_PACKAGE_LIBTASN1
 	select BR2_PACKAGE_LIBXML2
 	select BR2_PACKAGE_LIBXSLT
@@ -100,9 +100,10 @@  comment "sandboxing support needs a toolchain w/ headers >= 3.12"
 
 config BR2_PACKAGE_WEBKITGTK_HTTPS
 	bool "HTTPS support"
-	depends on !BR2_STATIC_LIBS # libsoup3 -> glib-networking, gnutls
+	depends on !BR2_STATIC_LIBS # libsoup/libsoup3 -> glib-networking, gnutls
 	select BR2_PACKAGE_CA_CERTIFICATES # runtime
-	select BR2_PACKAGE_LIBSOUP3_SSL
+	select BR2_PACKAGE_LIBSOUP_SSL if BR2_PACKAGE_LIBSOUP
+	select BR2_PACKAGE_LIBSOUP3_SSL if BR2_PACKAGE_LIBSOUP3
 	help
 	  Enable HTTPS protocol support.
 
diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk
index ff39ee01e1..af49aad96e 100644
--- a/package/webkitgtk/webkitgtk.mk
+++ b/package/webkitgtk/webkitgtk.mk
@@ -14,8 +14,8 @@  WEBKITGTK_LICENSE_FILES = \
 	Source/WebCore/LICENSE-LGPL-2.1
 WEBKITGTK_CPE_ID_VENDOR = webkitgtk
 WEBKITGTK_DEPENDENCIES = host-ruby host-python3 host-gperf host-unifdef \
-	enchant harfbuzz icu jpeg libegl libepoxy libgcrypt libsecret \
-	libsoup3 libtasn1 libxml2 libxslt sqlite webp woff2
+	enchant harfbuzz icu jpeg libegl libepoxy libgcrypt libsecret libtasn1 \
+	libxml2 libxslt sqlite webp woff2
 
 WEBKITGTK_CMAKE_BACKEND = ninja
 
@@ -31,6 +31,14 @@  WEBKITGTK_CONF_OPTS = \
 	-DUSE_LIBHYPHEN=OFF \
 	-DUSE_WOFF2=ON
 
+ifeq ($(BR2_PACKAGE_LIBSOUP),y)
+WEBKITGTK_CONF_OPTS += -DUSE_SOUP2=ON
+WEBKITGTK_DEPENDENCIES += libsoup
+else
+WEBKITGTK_CONF_OPTS += -DUSE_SOUP2=OFF
+WEBKITGTK_DEPENDENCIES += libsoup3
+endif
+
 ifeq ($(BR2_PACKAGE_LIBGTK4),y)
 WEBKITGTK_CONF_OPTS += -DUSE_GTK4=ON
 WEBKITGTK_DEPENDENCIES += libgtk4