Commit c4ec97d5 authored by Hadrien Boutteville's avatar Hadrien Boutteville Committed by Peter Korsgaard
Browse files

libgtk3: new package



This package provides Gtk+ 3.0, a graphical toolkit.

[Peter: fix Config.in deps, ensure atleast 1 backend, remove redundant info]
Signed-off-by: default avatarHadrien Boutteville <hadrien.boutteville@gmail.com>
Signed-off-by: default avatarEric Le Bihan <eric.le.bihan.dev@free.fr>
[Eric: added backend support, use of pkgconf for host-libgtk3]
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent ced34ea1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -643,6 +643,7 @@ menu "Graphics"
	source "package/libglew/Config.in"
	source "package/libglu/Config.in"
	source "package/libgtk2/Config.in"
	source "package/libgtk3/Config.in"
	source "package/libpng/Config.in"
	source "package/libqrencode/Config.in"
	source "package/libraw/Config.in"
+87 −0
Original line number Diff line number Diff line
config BR2_PACKAGE_LIBGTK3
	bool "libgtk3"
	select BR2_PACKAGE_ATK
	select BR2_PACKAGE_CAIRO
	select BR2_PACKAGE_CAIRO_PS
	select BR2_PACKAGE_CAIRO_PDF
	select BR2_PACKAGE_CAIRO_SVG
	select BR2_PACKAGE_LIBGLIB2
	select BR2_PACKAGE_PANGO
	select BR2_PACKAGE_GDK_PIXBUF
	# atleast 1 backend must be enabled
	select BR2_PACKAGE_LIBGTK3_BROADWAY if \
	       !(BR2_PACKAGE_LIBGTK3_X11 || BR2_PACKAGE_LIBGTK3_WAYLAND)
	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_ARCH_HAS_ATOMICS # cairo
	help
	  The GTK+ version 3 graphical user interface library

	  http://www.gtk.org/

if BR2_PACKAGE_LIBGTK3

comment "GDK backend"

config BR2_PACKAGE_LIBGTK3_X11
	bool "GDK X11 backend"
	default y
	depends on BR2_PACKAGE_XORG7
	select BR2_PACKAGE_FONTCONFIG
	select BR2_PACKAGE_XLIB_LIBX11
	select BR2_PACKAGE_XLIB_LIBXEXT
	select BR2_PACKAGE_XLIB_LIBXRENDER
	select BR2_PACKAGE_XLIB_LIBXI
	help
	  This enables the X11 backend for GDK.

config BR2_PACKAGE_LIBGTK3_WAYLAND
	bool "GDK Wayland backend"
	default y
	depends on BR2_PACKAGE_WAYLAND
	select BR2_PACKAGE_LIBXKBCOMMON
	help
	  This enables the Wayland backend for GDK.

config BR2_PACKAGE_LIBGTK3_BROADWAY
	bool "GDK Broadway backend"
	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 gtk3-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
	    $ gtk3-demo

	  Then open a web browser at address http://192.168.0.1:8080.
	  Javascript and web sockets should be enabled.

config BR2_PACKAGE_LIBGTK3_DEMO
	bool "Install libgtk3 demo program"
	select BR2_PACKAGE_SHARED_MIME_INFO
	select BR2_PACKAGE_HICOLOR_ICON_THEME
	help
	  The GTK+ source base contains a demo program. This
	  option allows to install this program to the target.

config BR2_PACKAGE_LIBGTK3_TESTS
	bool "Install libgtk3 tests"
	help
	  The GTK+ source base contains tests. This option
	  allows to install them to the target.

endif

comment "libgtk3 needs a toolchain w/ wchar, threads, C++"
	depends on BR2_USE_MMU
	depends on BR2_ARCH_HAS_ATOMICS
	depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP || \
		!BR2_TOOLCHAIN_HAS_THREADS
+25 −0
Original line number Diff line number Diff line
Same patch as for systemd in commit
http://git.buildroot.net/buildroot/commit/?id=7144f2f04b70553

Fix deactivation of gtk-doc

The tarball contains the Makefile for building documentation with gtk-doc,
Unfortunately the AM_CONDITIONAL variable is not the correct one, which
results in an error when running autoreconf.

This patch fixes this issue.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Signed-off-by: Hadrien Boutteville <hadrien.boutteville@gmail.com>

--- a/gtk-doc.make
+++ b/gtk-doc.make
@@ -267,7 +267,7 @@
 #
 # Require gtk-doc when making dist
 #
-if HAVE_GTK_DOC
+if ENABLE_GTK_DOC
 dist-check-gtkdoc: docs
 else
 dist-check-gtkdoc:
+28 −0
Original line number Diff line number Diff line
Fix HAVE_INTROSPECTION does not appear in AM_CONDITIONAL

During autoreconf GOBJECT_INTROSPECTION_CHECK could not be resolved because we
don't have introspection which provides its custom m4 macro. Reconfigure fails
with:

gdk/Makefile.am:196: error: HAVE_INTROSPECTION does not appear in AM_CONDITIONAL
gtk/Makefile.am:1347: error: HAVE_INTROSPECTION does not appear in AM_CONDITIONAL

We avoid to add a copy of introspection.m4 in the m4 directory of libgtk3 by
adding a check, as performed in Systemd.

Signed-off-by: Hadrien Boutteville <hadrien.boutteville@gmail.com>

--- a/configure.ac
+++ b/configure.ac
@@ -1621,7 +1621,10 @@
 # GObject introspection
 ##################################################

-GOBJECT_INTROSPECTION_CHECK(introspection_required_version)
+m4_ifdef([GOBJECT_INTROSPECTION_CHECK],
+         [GOBJECT_INTROSPECTION_CHECK(introspection_required_version)],
+         [AM_CONDITIONAL([HAVE_INTROSPECTION], [false])
+          enable_introspection=no])

 ##################################################
 # colord module
+45 −0
Original line number Diff line number Diff line
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@gmail.com>

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