diff mbox series

[v2,3/4] package/wpewebkit: do not depend on wpebackend-fdo

Message ID 20240627193335.4069574-4-aperez@igalia.com
State Changes Requested
Headers show
Series None | expand

Commit Message

Adrian Perez de Castro June 27, 2024, 7:33 p.m. UTC
Remove the wpewebkit package dependency on wpebackend-fdo, as it is not
needed at all during the build. What is needed is a WPE backend at run
time, which may be provided by wpebackend-fdo or wpebackend-rdk. To
reflect this, we make wpewebkit depend on either being selected.

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
 package/wpewebkit/Config.in    | 9 ++++-----
 package/wpewebkit/wpewebkit.mk | 2 +-
 2 files changed, 5 insertions(+), 6 deletions(-)

---
v1 -> v2:
- Remove openjpeg dependency, which has been dropped in 2.44.x

Comments

Thomas Petazzoni Aug. 2, 2024, 9:08 p.m. UTC | #1
Hello,

On Thu, 27 Jun 2024 22:33:31 +0300
Adrian Perez de Castro <aperez@igalia.com> wrote:

> Remove the wpewebkit package dependency on wpebackend-fdo, as it is not
> needed at all during the build. What is needed is a WPE backend at run
> time, which may be provided by wpebackend-fdo or wpebackend-rdk. To
> reflect this, we make wpewebkit depend on either being selected.
> 
> Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> ---
>  package/wpewebkit/Config.in    | 9 ++++-----
>  package/wpewebkit/wpewebkit.mk | 2 +-
>  2 files changed, 5 insertions(+), 6 deletions(-)
> 
> ---
> v1 -> v2:
> - Remove openjpeg dependency, which has been dropped in 2.44.x
> 
> diff --git a/package/wpewebkit/Config.in b/package/wpewebkit/Config.in
> index e4b0320e1da..c55b827e2b8 100644
> --- a/package/wpewebkit/Config.in
> +++ b/package/wpewebkit/Config.in
> @@ -24,11 +24,11 @@ comment "wpewebkit needs a toolchain w/ C++, wchar, threads, dynamic library, gc
>  		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_10 \
>  		|| !BR2_HOST_GCC_AT_LEAST_4_9
>  
> -comment "wpewebkit needs an OpenGL ES w/ EGL-capable Wayland backend"
> +comment "wpewebkit needs an OpenGL ES w/ EGL-capable implementation and an WPE backend"
>  	depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
>  	depends on !BR2_BINFMT_FLAT
> -	depends on !BR2_PACKAGE_HAS_LIBGLES || !BR2_PACKAGE_HAS_LIBEGL \
> -		|| !BR2_PACKAGE_HAS_LIBEGL_WAYLAND
> +	depends on !BR2_PACKAGE_HAS_LIBGLES || !BR2_PACKAGE_HAS_LIBEGL
> +	depends on !BR2_PACKAGE_WPEBACKEND_FDO && !BR2_PACKAGE_WPEBACKEND_RDK

I think we will want to select one, see below.

>  
>  config BR2_PACKAGE_WPEWEBKIT
>  	bool "wpewebkit"
> @@ -41,8 +41,8 @@ config BR2_PACKAGE_WPEWEBKIT
>  	depends on BR2_USE_WCHAR # icu, libsoup3
>  	depends on BR2_PACKAGE_HAS_LIBGLES # libepoxy
>  	depends on BR2_PACKAGE_HAS_LIBEGL # libepoxy
> -	depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND # wpebackend-fdo
>  	depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
> +	depends on BR2_PACKAGE_WPEBACKEND_FDO || BR2_PACKAGE_WPEBACKEND_RDK

Please use instead:

	select BR2_PACKAGE_WPEBACKEND_FDO if !BR2_PACKAGE_WPEBACKEND_RDK # runtime

this will ensure that at least one is selected, taking by default
wpebackend-fdo, but allowing the user to enable wpebackend-rdk (and
disable wpebackend-fdo).

Also the "# runtime" comment is important, because it explains why an
option is selected, but not added to the build dependencies of the
package.

Thanks!

Thomas
Adrian Perez de Castro Sept. 2, 2024, 8:15 p.m. UTC | #2
Hi,

On Fri, 02 Aug 2024 23:08:32 +0200 Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote:

> On Thu, 27 Jun 2024 22:33:31 +0300
> Adrian Perez de Castro <aperez@igalia.com> wrote:
> 
> > Remove the wpewebkit package dependency on wpebackend-fdo, as it is not
> > needed at all during the build. What is needed is a WPE backend at run
> > time, which may be provided by wpebackend-fdo or wpebackend-rdk. To
> > reflect this, we make wpewebkit depend on either being selected.
> > 
> > Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> > ---
> >  package/wpewebkit/Config.in    | 9 ++++-----
> >  package/wpewebkit/wpewebkit.mk | 2 +-
> >  2 files changed, 5 insertions(+), 6 deletions(-)
> > 
> > ---
> > v1 -> v2:
> > - Remove openjpeg dependency, which has been dropped in 2.44.x
> > 
> > diff --git a/package/wpewebkit/Config.in b/package/wpewebkit/Config.in
> > index e4b0320e1da..c55b827e2b8 100644
> > --- a/package/wpewebkit/Config.in
> > +++ b/package/wpewebkit/Config.in
> > @@ -24,11 +24,11 @@ comment "wpewebkit needs a toolchain w/ C++, wchar, threads, dynamic library, gc
> >  		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_10 \
> >  		|| !BR2_HOST_GCC_AT_LEAST_4_9
> >  
> > -comment "wpewebkit needs an OpenGL ES w/ EGL-capable Wayland backend"
> > +comment "wpewebkit needs an OpenGL ES w/ EGL-capable implementation and an WPE backend"
> >  	depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
> >  	depends on !BR2_BINFMT_FLAT
> > -	depends on !BR2_PACKAGE_HAS_LIBGLES || !BR2_PACKAGE_HAS_LIBEGL \
> > -		|| !BR2_PACKAGE_HAS_LIBEGL_WAYLAND
> > +	depends on !BR2_PACKAGE_HAS_LIBGLES || !BR2_PACKAGE_HAS_LIBEGL
> > +	depends on !BR2_PACKAGE_WPEBACKEND_FDO && !BR2_PACKAGE_WPEBACKEND_RDK
> 
> I think we will want to select one, see below.
 
Indeed, I didn't come up myself with a good way of making sure at least
one is picked...
  
> >  config BR2_PACKAGE_WPEWEBKIT
> >  	bool "wpewebkit"
> > @@ -41,8 +41,8 @@ config BR2_PACKAGE_WPEWEBKIT
> >  	depends on BR2_USE_WCHAR # icu, libsoup3
> >  	depends on BR2_PACKAGE_HAS_LIBGLES # libepoxy
> >  	depends on BR2_PACKAGE_HAS_LIBEGL # libepoxy
> > -	depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND # wpebackend-fdo
> >  	depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
> > +	depends on BR2_PACKAGE_WPEBACKEND_FDO || BR2_PACKAGE_WPEBACKEND_RDK
> 
> Please use instead:
> 
> 	select BR2_PACKAGE_WPEBACKEND_FDO if !BR2_PACKAGE_WPEBACKEND_RDK # runtime
> 
> this will ensure that at least one is selected, taking by default
> wpebackend-fdo, but allowing the user to enable wpebackend-rdk (and
> disable wpebackend-fdo).

...and no idea why this didn't cross my mind. Thanks for the suggestion,
this is the right thing to do.
 
> Also the "# runtime" comment is important, because it explains why an
> option is selected, but not added to the build dependencies of the
> package.

TIL, thanks.

Cheers,
—Adrián
diff mbox series

Patch

diff --git a/package/wpewebkit/Config.in b/package/wpewebkit/Config.in
index e4b0320e1da..c55b827e2b8 100644
--- a/package/wpewebkit/Config.in
+++ b/package/wpewebkit/Config.in
@@ -24,11 +24,11 @@  comment "wpewebkit needs a toolchain w/ C++, wchar, threads, dynamic library, gc
 		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_10 \
 		|| !BR2_HOST_GCC_AT_LEAST_4_9
 
-comment "wpewebkit needs an OpenGL ES w/ EGL-capable Wayland backend"
+comment "wpewebkit needs an OpenGL ES w/ EGL-capable implementation and an WPE backend"
 	depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
 	depends on !BR2_BINFMT_FLAT
-	depends on !BR2_PACKAGE_HAS_LIBGLES || !BR2_PACKAGE_HAS_LIBEGL \
-		|| !BR2_PACKAGE_HAS_LIBEGL_WAYLAND
+	depends on !BR2_PACKAGE_HAS_LIBGLES || !BR2_PACKAGE_HAS_LIBEGL
+	depends on !BR2_PACKAGE_WPEBACKEND_FDO && !BR2_PACKAGE_WPEBACKEND_RDK
 
 config BR2_PACKAGE_WPEWEBKIT
 	bool "wpewebkit"
@@ -41,8 +41,8 @@  config BR2_PACKAGE_WPEWEBKIT
 	depends on BR2_USE_WCHAR # icu, libsoup3
 	depends on BR2_PACKAGE_HAS_LIBGLES # libepoxy
 	depends on BR2_PACKAGE_HAS_LIBEGL # libepoxy
-	depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND # wpebackend-fdo
 	depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_WPEBACKEND_FDO || BR2_PACKAGE_WPEBACKEND_RDK
 	select BR2_PACKAGE_CAIRO
 	select BR2_PACKAGE_CAIRO_PNG
 	select BR2_PACKAGE_HARFBUZZ
@@ -58,7 +58,6 @@  config BR2_PACKAGE_WPEWEBKIT
 	select BR2_PACKAGE_WAYLAND_PROTOCOLS
 	select BR2_PACKAGE_WEBP
 	select BR2_PACKAGE_WEBP_DEMUX
-	select BR2_PACKAGE_WPEBACKEND_FDO
 	help
 	  WPE (Web Platform for Embedded) port of the WebKit engine,
 	  to allow embedders to create simple and performant systems
diff --git a/package/wpewebkit/wpewebkit.mk b/package/wpewebkit/wpewebkit.mk
index ecb3b3e352b..382c2adca10 100644
--- a/package/wpewebkit/wpewebkit.mk
+++ b/package/wpewebkit/wpewebkit.mk
@@ -17,7 +17,7 @@  WPEWEBKIT_CPE_ID_VENDOR = wpewebkit
 WPEWEBKIT_CPE_ID_PRODUCT = wpe_webkit
 WPEWEBKIT_DEPENDENCIES = host-gperf host-python3 host-ruby host-unifdef \
 	harfbuzz cairo icu jpeg libepoxy libgcrypt libgles libsoup3 libtasn1 \
-	libpng libxslt wayland-protocols webp wpebackend-fdo
+	libpng libxslt libwpe wayland-protocols webp
 
 WPEWEBKIT_CMAKE_BACKEND = ninja