Skip to contentSkip to conversation

Re-introducing libgtk3

PATCH New Eric Le Bihan 2 participants 5 messages Oct 13, 2014 – Oct 15, 2014

lore
Share & tools
lore
#0 lore raw

v2 cover Re-introducing libgtk3

Hi!

This small series re-introduces libgtk3.

The following changes have been made to the latest version posted by H. Bouteville:

- Add multiple backend support (X11, Wayland, Broadway).
- Use pkgconf, from host-pkgconf, to build host-libgtk3 and some native tools in libgtk3.
- GSettings schemas compilation after installation (needed by gtk3-demo).
- Introduction of hicolor-icon-theme (needed by gtk3-demo).

The following tests have been performed:

- running gtk3-demo in QEMU x86/ARM in a X11/Fluxbox environment.
- running gtk3-demo in QEMU x86/ARM in a Wayland/Weston environment.

Note: since wayland has been bumped to 1.6.0, running gtk3-demo in Weston does not work anymore. Gtk+ 3.12.2 uses protocol version 3, whereas wayland 1.6.0 introduces version 4. A runtime check is performed and the program refuses to start. This is solved with Gtk+ 3.14.0. Once this series is accepted, I will provide a series bumping libgtk3 and friends (libglib2, pango, etc).

Best regards,
ELB

Changes v1 -> v2:

- removed patch introducing pkg-config-native, as pkgconf does the same job (suggested by PeterK).
- updated comments for hicolor-icon-theme, to explain this is not a full icon theme, but a fallback one (suggested by ThomasP).
- use LIBGTK3_CONF_OPTS instead of LIBGTK3_CONF_OPT.

Eric Le Bihan (1):
hicolor-icon-theme: new package

Hadrien Boutteville (1):
libgtk3: new package

 package/Config.in                                  |   2 +
 package/hicolor-icon-theme/Config.in               |   8 +
 package/hicolor-icon-theme/hicolor-icon-theme.mk   |  12 ++
 package/libgtk3/Config.in                          |  87 +++++++++++
 package/libgtk3/libgtk3-0001-no-gtk-doc.patch      |  25 +++
 .../libgtk3-0002-fix-introspection-check.patch     |  28 ++++
 .../libgtk3/libgtk3-0003-disable-atk-bridge.patch  |  45 ++++++
 package/libgtk3/libgtk3.mk                         | 174 +++++++++++++++++++++
 8 files changed, 381 insertions(+)
 create mode 100644 package/hicolor-icon-theme/Config.in
 create mode 100644 package/hicolor-icon-theme/hicolor-icon-theme.mk
 create mode 100644 package/libgtk3/Config.in
 create mode 100644 package/libgtk3/libgtk3-0001-no-gtk-doc.patch
 create mode 100644 package/libgtk3/libgtk3-0002-fix-introspection-check.patch
 create mode 100644 package/libgtk3/libgtk3-0003-disable-atk-bridge.patch
 create mode 100644 package/libgtk3/libgtk3.mk

--
1.9.1

#1 lore raw

PATCH v2 1/2 hicolor-icon-theme: new package

This new package provides Freedesktop Hicolor icon theme.

This is the fallback icon theme, which only creates the standard directory structure for storing icons of third-party applications (i.e. the ones not available in usual icon themes).

---
 package/Config.in                                |  1 +
 package/hicolor-icon-theme/Config.in             |  8 ++++++++
 package/hicolor-icon-theme/hicolor-icon-theme.mk | 12 ++++++++++++
 3 files changed, 21 insertions(+)
 create mode 100644 package/hicolor-icon-theme/Config.in
 create mode 100644 package/hicolor-icon-theme/hicolor-icon-theme.mk
package/Config.in +1 -0
index 19bb9bf..ec22c35 100644
@@ -627,6 +627,7 @@ menu "Graphics"
 	source "package/gtk2-engines/Config.in"
 	source "package/gtk2-themes/Config.in"
 	source "package/harfbuzz/Config.in"
+	source "package/hicolor-icon-theme/Config.in"
 	source "package/imlib2/Config.in"
 	source "package/jasper/Config.in"
 	source "package/jpeg/Config.in"
package/hicolor-icon-theme/Config.in new file +8 -0
new file mode 100644
index 0000000..6cda097
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_HICOLOR_ICON_THEME
+	bool "hicolor icon theme"
+	help
+	  Freedesktop Hicolor icon theme
+
+	  This is the fallback icon theme, which only creates the
+	  standard directory structure for storing icons of third-party
+	  applications (i.e. the ones not available in usual icon themes).
package/hicolor-icon-theme/hicolor-icon-theme.mk new file +12 -0
new file mode 100644
index 0000000..768aec8
@@ -0,0 +1,12 @@
+################################################################################
+#
+# hicolor-icon-theme
+#
+################################################################################
+
+HICOLOR_ICON_THEME_VERSION = 0.13
+HICOLOR_ICON_THEME_SITE = http://icon-theme.freedesktop.org/releases/
+HICOLOR_ICON_THEME_LICENSE = GPLv2
+HICOLOR_ICON_THEME_LICENSE_FILES = COPYING
+
+$(eval $(autotools-package))
Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 1/2 hicolor-icon-theme: new package

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Eric" == Eric Le Bihan <[email protected]> writes:

This new package provides Freedesktop Hicolor icon theme. This is the fallback icon theme, which only creates the standard directory structure for storing icons of third-party applications (i.e. the ones not available in usual icon themes).

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH v2 2/2 libgtk3: new package

In reply to Eric Le Bihan

From: Hadrien Boutteville <[email protected]>

This package provides Gtk+ 3.0, a graphical toolkit.

[Eric: added backend support, use of pkgconf for host-libgtk3]
Cc Thomas Petazzoni <[email protected]>
Cc "Yann E. MORIN" <[email protected]>
---
 package/Config.in                                  |   1 +
 package/libgtk3/Config.in                          |  87 +++++++++++
 package/libgtk3/libgtk3-0001-no-gtk-doc.patch      |  25 +++
 .../libgtk3-0002-fix-introspection-check.patch     |  28 ++++
 .../libgtk3/libgtk3-0003-disable-atk-bridge.patch  |  45 ++++++
 package/libgtk3/libgtk3.mk                         | 174 +++++++++++++++++++++
 6 files changed, 360 insertions(+)
 create mode 100644 package/libgtk3/Config.in
 create mode 100644 package/libgtk3/libgtk3-0001-no-gtk-doc.patch
 create mode 100644 package/libgtk3/libgtk3-0002-fix-introspection-check.patch
 create mode 100644 package/libgtk3/libgtk3-0003-disable-atk-bridge.patch
 create mode 100644 package/libgtk3/libgtk3.mk
package/Config.in +1 -0
index ec22c35..93e148d 100644
@@ -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"
package/libgtk3/Config.in new file +87 -0

87 lines not on this page · raw message

package/libgtk3/libgtk3-0001-no-gtk-doc.patch new file +25 -0
new file mode 100644
index 0000000..926a263
@@ -0,0 +1,25 @@
+Same patch as for systemd in commit
+7144f2f04b705538a893e538a6b851f536f433b6:
+
+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 <[email protected]>
+Signed-off-by: Hadrien Boutteville <[email protected]>
+
+--- 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:
package/libgtk3/libgtk3-0002-fix-introspection-check.patch new file +28 -0
new file mode 100644
index 0000000..5b56b3a
@@ -0,0 +1,28 @@
+Fix HAVE_INTROSPECTION does not appear in AM_CONDITIONAL
+
+During autoreconf GOBJECT_INTROSPECTION_CHECK could not be resolve 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 <[email protected]>
+
+--- 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
package/libgtk3/libgtk3-0003-disable-atk-bridge.patch new file +45 -0

45 lines not on this page · raw message

package/libgtk3/libgtk3.mk new file +174 -0

174 lines not on this page · raw message

--
1.9.1

#4 lore raw

PATCH v2 2/2 libgtk3: new package

Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Eric" == Eric Le Bihan <[email protected]> writes:

From: Hadrien Boutteville <[email protected]> This package provides Gtk+ 3.0, a graphical toolkit.

[Eric: added backend support, use of pkgconf for host-libgtk3]
Cc Thomas Petazzoni <[email protected]>
Cc "Yann E. MORIN" <[email protected]>

+++ b/package/libgtk3/Config.in

package/libgtk3/Config.in new file +1 -0
@@ -0,0 +1,87 @@
+config BR2_PACKAGE_LIBGTK3

package/libgtk3/Config.in line 11

Quoted 10 lines
package/libgtk3/Config.in new file +10 -0
+	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
+	depends on BR2_PACKAGE_XORG7 || BR2_PACKAGE_WAYLAND

That's not true, as you can build the HTML5 backend without any of these. What we do need to do is to ensure atleast one backend is enabled. As the HTML5 doesn't have any extra dependencies, that is the one we should force enable if needed like this:

	# atleast 1 backend must be enabled
	select BR2_PACKAGE_LIBGTK3_BROADWAY if \
	       !(BR2_PACKAGE_LIBGTK3_X11 || BR2_PACKAGE_LIBGTK3_WAYLAND)
Quoted 27 lines
package/libgtk3/Config.in new file +27 -0
+	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

package/libgtk3/Config.in line 48

Quoted 10 lines
package/libgtk3/Config.in new file +10 -0
+	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"
+	default n

'n' is the default value, so this can get dropped.

package/libgtk3/Config.in line 61

Quoted 13 lines
package/libgtk3/Config.in new file +13 -0
+	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

Thanks, that's very nice. For a "normal" (E.G. single network interface) I believe we can drop the -a 192.168.0.1 part.

package/libgtk3/libgtk3-0001-no-gtk-doc.patch line 2

Quoted 4 lines
package/libgtk3/libgtk3-0001-no-gtk-doc.patch new file +3 -0
+++ b/package/libgtk3/libgtk3-0001-no-gtk-doc.patch
@@ -0,0 +1,25 @@
+Same patch as for systemd in commit
+7144f2f04b705538a893e538a6b851f536f433b6:

It might not be clear to people what repository this commit id refers to so I've added a link to cgit.

package/libgtk3/libgtk3-0002-fix-introspection-check.patch line 3

Quoted 5 lines
package/libgtk3/libgtk3-0002-fix-introspection-check.patch new file +4 -0
+++ b/package/libgtk3/libgtk3-0002-fix-introspection-check.patch
@@ -0,0 +1,28 @@
+Fix HAVE_INTROSPECTION does not appear in AM_CONDITIONAL
+
+During autoreconf GOBJECT_INTROSPECTION_CHECK could not be resolve because we

s/resolve/resolved/

Quoted 15 lines
package/libgtk3/libgtk3.mk new file +14 -0
+++ b/package/libgtk3/libgtk3.mk
@@ -0,0 +1,174 @@
+################################################################################
+#
+# libgtk3
+#
+################################################################################
+
+LIBGTK3_VERSION_MAJOR = 3.12
+LIBGTK3_VERSION = $(LIBGTK3_VERSION_MAJOR).2
+LIBGTK3_SOURCE = gtk+-$(LIBGTK3_VERSION).tar.xz
+LIBGTK3_SITE = http://ftp.gnome.org/pub/gnome/sources/gtk+/$(LIBGTK3_VERSION_MAJOR)
+LIBGTK3_LICENSE = LGPLv2+
+LIBGTK3_LICENSE_FILES = COPYING
+LIBGTK3_INSTALL_STAGING = YES

package/libgtk3/libgtk3.mk line 23

Quoted 10 lines
package/libgtk3/libgtk3.mk new file +10 -0
+LIBGTK3_AUTORECONF = YES
+
+LIBGTK3_CONF_ENV = \
+	ac_cv_path_GTK_UPDATE_ICON_CACHE=$(HOST_DIR)/usr/bin/gtk-update-icon-cache \
+	ac_cv_path_GDK_PIXBUF_CSOURCE=$(HOST_DIR)/usr/bin/gdk-pixbuf-csource
+
+LIBGTK3_CONF_ENV  = ac_cv_path_GTK_UPDATE_ICON_CACHE=$(HOST_DIR)/usr/bin/gtk-update-icon-cache \
+		    ac_cv_path_GDK_PIXBUF_CSOURCE=$(HOST_DIR)/usr/bin/gdk-pixbuf-csource \
+		    PKG_CONFIG_FOR_BUILD=$(HOST_DIR)/usr/bin/pkgconf
+

_ENV is defined twice. We already pass the correct pkg-config to configure, so I've dropped the 2nd part.

package/libgtk3/libgtk3.mk line 26

Quoted 3 lines
package/libgtk3/libgtk3.mk new file +3 -0
+LIBGTK3_CONF_OPTS = --disable-glibtest \
+	--enable-explicit-deps=no \
+	--enable-gtk2-dependency \

Why? What does this do?

package/libgtk3/libgtk3.mk line 27

Quoted 1 line
package/libgtk3/libgtk3.mk new file +1 -0
+	--disable-debug \

Debugging is disabled by default (for stable gtk3 releases), and pkg-autotools.mk already pass --enable-debug if needed so this can get dropped.

Committed with these fixes, thanks!

Signature · 1 line
Bye, Peter Korsgaard