[Buildroot] [RFC PATCH v4 4/9] libgtk3: remove patch to disable atk-bridge support

Thomas Petazzoni thomas.petazzoni at bootlin.com
Fri Jun 15 19:53:31 UTC 2018


Hello,

On Thu, 14 Jun 2018 15:48:15 -0700, Joseph Kogut wrote:
> Signed-off-by: Joseph Kogut <joseph.kogut at gmail.com>
> ---
>  package/libgtk3/0003-disable-atk-bridge.patch | 45 -------------------
>  package/libgtk3/Config.in                     |  1 +
>  package/libgtk3/libgtk3.mk                    |  3 +-
>  3 files changed, 3 insertions(+), 46 deletions(-)
>  delete mode 100644 package/libgtk3/0003-disable-atk-bridge.patch
> 
> diff --git a/package/libgtk3/0003-disable-atk-bridge.patch b/package/libgtk3/0003-disable-atk-bridge.patch
> deleted file mode 100644
> index c92174f400..0000000000
> --- a/package/libgtk3/0003-disable-atk-bridge.patch
> +++ /dev/null
> @@ -1,45 +0,0 @@
> -Remove atk-bridge support.
> -
> -atk-bridge doesn't seem useful for now in Buildroot and requires to
> -add two new packages just for it: at-spi2-core and at-spi2-atk.
> -
> -Signed-off-by: Hadrien Boutteville <hadrien.boutteville at gmail.com>

Could we instead keep them optional, by improving this patch ? We
really try to keep dependencies to a reasonable level in Buildroot, so
it would be nice if we could avoid making those mandatory dependencies
of libgtk3.

> -
> ---- a/configure.ac
> -+++ b/configure.ac
> -@@ -1349,11 +1349,7 @@
> - # Check for Accessibility Toolkit flags
> - ########################################
> -
> --if test x$enable_x11_backend = xyes; then
> --   ATK_PACKAGES="atk atk-bridge-2.0"
> --else
> --   ATK_PACKAGES="atk"
> --fi
> -+ATK_PACKAGES="atk"
> -
> - PKG_CHECK_MODULES(ATK, $ATK_PACKAGES)
> -
> ---- a/gtk/a11y/gtkaccessibility.c
> -+++ b/gtk/a11y/gtkaccessibility.c
> -@@ -37,10 +37,6 @@
> - #include <gtk/gtkcombobox.h>
> - #include <gtk/gtkaccessible.h>
> -
> --#ifdef GDK_WINDOWING_X11
> --#include <atk-bridge.h>
> --#endif
> --
> - static gboolean gail_focus_watcher      (GSignalInvocationHint *ihint,
> -                                          guint                  n_param_values,
> -                                          const GValue          *param_values,
> -@@ -987,9 +983,5 @@
> -   _gtk_accessibility_override_atk_util ();
> -   do_window_event_initialization ();
> -
> --#ifdef GDK_WINDOWING_X11
> --  atk_bridge_adaptor_init (NULL, NULL);
> --#endif
> --
> -   atk_misc_instance = g_object_new (GTK_TYPE_MISC_IMPL, NULL);
> - }
> diff --git a/package/libgtk3/Config.in b/package/libgtk3/Config.in
> index 12e64707bd..f14b9deaf8 100644
> --- a/package/libgtk3/Config.in
> +++ b/package/libgtk3/Config.in
> @@ -20,6 +20,7 @@ config BR2_PACKAGE_LIBGTK3
>  	depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND || \
>  		BR2_PACKAGE_HAS_LIBGL
>  	select BR2_PACKAGE_ATK
> +	select BR2_PACKAGE_AT_SPI2_ATK

Be careful here: AT_SPI2_ATK is only available with X11, so you can't
just select it like this.

>  	select BR2_PACKAGE_CAIRO
>  	select BR2_PACKAGE_CAIRO_PS
>  	select BR2_PACKAGE_CAIRO_PDF
> diff --git a/package/libgtk3/libgtk3.mk b/package/libgtk3/libgtk3.mk
> index 1b85d00aae..e3c3dc5237 100644
> --- a/package/libgtk3/libgtk3.mk
> +++ b/package/libgtk3/libgtk3.mk
> @@ -26,7 +26,8 @@ LIBGTK3_CONF_OPTS = \
>  LIBGTK3_MAKE_OPTS = \
>  	WAYLAND_PROTOCOLS_DATADIR=$(STAGING_DIR)/usr/share/wayland-protocols
>  
> -LIBGTK3_DEPENDENCIES = host-pkgconf host-libgtk3 atk libglib2 cairo pango gdk-pixbuf libepoxy
> +LIBGTK3_DEPENDENCIES = host-pkgconf host-libgtk3 atk at-spi2-atk libglib2 \
> +		       cairo pango gdk-pixbuf libepoxy

And its dependency should only be added..

>  
>  ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y)
>  LIBGTK3_DEPENDENCIES += fontconfig xlib_libX11 xlib_libXext xlib_libXrender xlib_libXi

... when the X11 backend is used.

But again, it would be nicer if the dependency was kept optional.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the buildroot mailing list