All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Francois Perrad <francois.perrad@gadz.org>
Cc: buildroot@busybox.net
Subject: Re: [Buildroot] [PATCH 2/2] package/libgtk4: new package
Date: Wed, 17 Jul 2024 22:44:56 +0200	[thread overview]
Message-ID: <20240717224456.3434e170@windsurf> (raw)
In-Reply-To: <20240403084807.512825-2-francois.perrad@gadz.org>

On Wed,  3 Apr 2024 10:48:07 +0200
Francois Perrad <francois.perrad@gadz.org> wrote:

> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  DEVELOPERS                   |   1 +
>  package/Config.in            |   1 +
>  package/libgtk4/Config.in    | 106 +++++++++++++++++++++++++++++++++
>  package/libgtk4/libgtk4.hash |   5 ++
>  package/libgtk4/libgtk4.mk   | 111 +++++++++++++++++++++++++++++++++++
>  5 files changed, 224 insertions(+)
>  create mode 100644 package/libgtk4/Config.in
>  create mode 100644 package/libgtk4/libgtk4.hash
>  create mode 100644 package/libgtk4/libgtk4.mk

I've applied, after doing a few changes. See below.


> diff --git a/package/libgtk4/Config.in b/package/libgtk4/Config.in
> new file mode 100644
> index 000000000..cda183c8d
> --- /dev/null
> +++ b/package/libgtk4/Config.in
> @@ -0,0 +1,106 @@
> +comment "libgtk4 needs a toolchain w/ wchar, threads, C++, gcc >= 4.9"
> +	depends on BR2_USE_MMU
> +	depends on BR2_TOOLCHAIN_HAS_SYNC_4
> +	depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP || \
> +		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
> +		!BR2_TOOLCHAIN_HAS_THREADS
> +
> +comment "libgtk4 needs an OpenGL or an OpenGL-EGL/wayland backend"
> +	depends on BR2_USE_MMU
> +	depends on BR2_TOOLCHAIN_HAS_SYNC_4
> +	depends on !BR2_PACKAGE_HAS_LIBEGL_WAYLAND && !BR2_PACKAGE_HAS_LIBGL

BR2_PACKAGE_HAS_LIBEGL_WAYLAND is gone. And in fact, even on X11/OpenGL
systems, EGL is needed. So I simplified this to:

+comment "libgtk4 needs an OpenGL(ES) EGL backend"
+       depends on BR2_USE_MMU
+       depends on BR2_TOOLCHAIN_HAS_SYNC_4
+       depends on !BR2_PACKAGE_HAS_LIBEGL


> +
> +config BR2_PACKAGE_LIBGTK4
> +	bool "libgtk4"
> +	depends on BR2_USE_WCHAR # glib2
> +	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
> +	depends on BR2_USE_MMU # glib2
> +	depends on BR2_INSTALL_LIBSTDCPP # pango
> +	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pango -> harfbuzz
> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # pango -> harfbuzz
> +	depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND || BR2_PACKAGE_HAS_LIBGL

And this to:

+       # Even in the case of X11/OpenGL, libgtk4 needs epoxy built
+       # with EGL support, see
+       # https://gitlab.gnome.org/GNOME/gtk/-/issues/6866.
+       depends on BR2_PACKAGE_HAS_LIBEGL


> +	select BR2_PACKAGE_CAIRO
> +	select BR2_PACKAGE_CAIRO_PS
> +	select BR2_PACKAGE_CAIRO_PDF
> +	select BR2_PACKAGE_CAIRO_SVG

These 3 options no longer exist, so I dropped them.

> +if BR2_PACKAGE_LIBGTK4
> +
> +config BR2_PACKAGE_LIBGTK4_BROADWAY
> +	bool "Broadway GDK backend"
> +	default y
> +	  help
> +	  This enables the Broadway backend for GDK, which provides
> +	  support for displaying GTK+ applications in a web browser,
> +	  using HTML5 and web sockets.
> +
> +	  For example, to run gtk4-demo on a target which IP address is
> +	  192.168.0.1 and use it from a web browser, execute the
> +	  following commands:
> +
> +	  $ broadwayd -a 192.168.0.1 -p 8080 :2 &
> +	  $ export GDK_BACKEND=broadway
> +	  $ export BROADWAY_DISPLAY=:2
> +	  $ gtk4-demo
> +
> +	  Then open a web browser at address http://192.168.0.1:8080.
> +	  Javascript and web sockets should be enabled.
> +
> +comment "Wayland GDK backend needs an OpenGL EGL backend provided by mesa3d w/ headers >= 3.17"
> +	depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
> +
> +config BR2_PACKAGE_LIBGTK4_WAYLAND
> +	bool "Wayland GDK backend"
> +	default y
> +	depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND

Dropped, as the main option now implies EGL is available.

> +	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
> +	select BR2_PACKAGE_WAYLAND

+       select BR2_PACKAGE_WAYLAND_PROTOCOLS

was missing.


> diff --git a/package/libgtk4/libgtk4.mk b/package/libgtk4/libgtk4.mk
> new file mode 100644
> index 000000000..2d3e5049a
> --- /dev/null
> +++ b/package/libgtk4/libgtk4.mk
> @@ -0,0 +1,111 @@
> +################################################################################
> +#
> +# libgtk4
> +#
> +################################################################################
> +
> +LIBGTK4_VERSION_MAJOR = 4.12
> +LIBGTK4_VERSION = $(LIBGTK4_VERSION_MAJOR).4
> +LIBGTK4_SOURCE = gtk-$(LIBGTK4_VERSION).tar.xz
> +LIBGTK4_SITE = https://download.gnome.org/sources/gtk/$(LIBGTK4_VERSION_MAJOR)
> +LIBGTK4_LICENSE = LGPL-2.0+
> +LIBGTK4_LICENSE_FILES = COPYING
> +LIBGTK4_CPE_ID_VENDOR = gnome
> +LIBGTK4_CPE_ID_PRODUCT = gtk
> +LIBGTK4_INSTALL_STAGING = YES
> +
> +LIBGTK4_DEPENDENCIES = host-pkgconf host-libgtk4 \
> +	gdk-pixbuf graphene libepoxy libglib2 pango \
> +	$(TARGET_NLS_DEPENDENCIES)
> +
> +LIBGTK4_CONF_OPTS = -Dbuild-tests=false

Added many more disabling:

+LIBGTK4_CONF_OPTS = \
+       -Dbuild-tests=false \
+       -Dmedia-ffmpeg=disabled \
+       -Dprint-cpdb=disabled \
+       -Dvulkan=disabled \
+       -Dcloudproviders=disabled \
+       -Dsysprof=disabled \
+       -Dtracker=disabled \
+       -Dcolord=disabled \
+       -Dintrospection=disabled \
+       -Ddocumentation=false \
+       -Dscreenshots=false \
+       -Dman-pages=false


> +
> +ifeq ($(BR2_PACKAGE_LIBGTK4_X11),y)
> +LIBGTK4_DEPENDENCIES += xlib_libXcursor xlib_libXi xlib_libXinerama
> +LIBGTK4_CONF_OPTS += -Dx11-backend=true
> +else
> +LIBGTK4_CONF_OPTS += -Dx11-backend=false
> +endif
> +
> +ifeq ($(BR2_PACKAGE_LIBGTK4_WAYLAND),y)
> +LIBGTK4_DEPENDENCIES += wayland libxkbcommon

Added wayland-protocols here, which was missing.

And I think that's pretty much it. Thanks a lot for the contribution!

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-07-17 20:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03  8:48 [Buildroot] [PATCH 1/2] package/graphene: new package Francois Perrad
2024-04-03  8:48 ` [Buildroot] [PATCH 2/2] package/libgtk4: " Francois Perrad
2024-07-17 20:44   ` Thomas Petazzoni via buildroot [this message]
2024-07-17 20:41 ` [Buildroot] [PATCH 1/2] package/graphene: " Thomas Petazzoni via buildroot
  -- strict thread matches above, loose matches on Subject: below --
2023-03-18 19:31 Francois Perrad
2023-03-18 19:31 ` [Buildroot] [PATCH 2/2] package/libgtk4: " Francois Perrad

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=20240717224456.3434e170@windsurf \
    --to=buildroot@buildroot.org \
    --cc=buildroot@busybox.net \
    --cc=francois.perrad@gadz.org \
    --cc=thomas.petazzoni@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.