summaryrefslogtreecommitdiff
path: root/yocto-poky/meta/recipes-gnome/gtk+
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta/recipes-gnome/gtk+')
-rw-r--r--yocto-poky/meta/recipes-gnome/gtk+/gtk+.inc97
-rw-r--r--yocto-poky/meta/recipes-gnome/gtk+/gtk+/doc-fixes.patch22
-rw-r--r--yocto-poky/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch35
-rw-r--r--yocto-poky/meta/recipes-gnome/gtk+/gtk+/strict-prototypes.patch24
-rw-r--r--yocto-poky/meta/recipes-gnome/gtk+/gtk+/toggle-font.diff102
-rw-r--r--yocto-poky/meta/recipes-gnome/gtk+/gtk+/xsettings.patch20
-rw-r--r--yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc111
-rw-r--r--yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Dont-force-csd.patch118
-rw-r--r--yocto-poky/meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch35
-rw-r--r--yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.16.6.bb18
-rw-r--r--yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.28.bb34
-rw-r--r--yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.16.6.bb63
-rw-r--r--yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils/Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch102
13 files changed, 781 insertions, 0 deletions
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk+.inc b/yocto-poky/meta/recipes-gnome/gtk+/gtk+.inc
new file mode 100644
index 000000000..be5273d62
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gtk+/gtk+.inc
@@ -0,0 +1,97 @@
+SUMMARY = "Multi-platform toolkit for creating GUIs"
+DESCRIPTION = "GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete \
+set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites."
+HOMEPAGE = "http://www.gtk.org"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
+
+SECTION = "libs"
+
+inherit distro_features_check
+ANY_OF_DISTRO_FEATURES = "directfb x11"
+
+X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender libxcomposite"
+DEPENDS = "glib-2.0 pango atk jpeg libpng gdk-pixbuf-native docbook-utils-native \
+ cairo gdk-pixbuf"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
+"
+
+PACKAGECONFIG[x11] = "--with-x=yes --with-gdktarget=x11,--with-x=no,${X11DEPENDS}"
+# without --with-gdktarget=directfb it will check for cairo-xlib which isn't available without X11 DISTRO_FEATURE
+PACKAGECONFIG[directfb] = "--with-gdktarget=directfb,,directfb"
+
+inherit autotools gtk-doc pkgconfig update-alternatives gtk-immodules-cache
+
+PACKAGES += "libgail gtk-demo"
+
+FILES_${PN} = "${bindir}/gtk-update-icon-cache-2.0 \
+ ${bindir}/gtk-query-immodules-2.0 \
+ ${libdir}/lib*${SOLIBS} \
+ ${datadir}/themes ${sysconfdir} \
+ ${libdir}/gtk-2.0/${LIBV}/engines/libpixmap.so"
+
+FILES_${PN}-dev += " \
+ ${datadir}/gtk-2.0/include \
+ ${libdir}/gtk-2.0/include \
+ ${libdir}/gtk-2.0/modules/*.la \
+ ${libdir}/gtk-2.0/${LIBV}/loaders/*.la \
+ ${libdir}/gtk-2.0/${LIBV}/immodules/*.la \
+ ${libdir}/gtk-2.0/${LIBV}/printbackends/*.la \
+ ${libdir}/gtk-2.0/${LIBV}/engines/*.la \
+ ${bindir}/gtk-builder-convert"
+
+FILES_${PN}-dbg += " \
+ ${libdir}/gtk-2.0/modules/.debug/* \
+ ${libdir}/gtk-2.0/${LIBV}/loaders/.debug/* \
+ ${libdir}/gtk-2.0/${LIBV}/immodules/.debug/* \
+ ${libdir}/gtk-2.0/${LIBV}/engines/.debug/* \
+ ${libdir}/gtk-2.0/${LIBV}/printbackends/.debug/*"
+
+FILES_gtk-demo = " \
+ ${datadir}/gtk-2.0/demo/* \
+ ${bindir}/gtk-demo \
+ "
+
+FILES_libgail = " \
+ ${libdir}/gtk-2.0/modules/libgail.so \
+ ${libdir}/gtk-2.0/modules/libferret.so \
+ "
+
+GTKBASE_RRECOMMENDS ?= "liberation-fonts gdk-pixbuf-loader-png gdk-pixbuf-loader-jpeg gdk-pixbuf-loader-gif gdk-pixbuf-loader-xpm shared-mime-info"
+GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1"
+
+RRECOMMENDS_${PN} = "${GTKBASE_RRECOMMENDS}"
+RRECOMMENDS_${PN}_libc-glibc = "${GTKGLIBC_RRECOMMENDS}"
+
+ALTERNATIVE_${PN} = "gtk-update-icon-cache"
+ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-2.0"
+
+do_install () {
+ autotools_do_install
+
+ install -d ${D}${sysconfdir}/gtk-2.0
+
+ mkdir -p ${D}${libdir}/gtk-2.0/include
+ install -m 0644 gdk/gdkconfig.h ${D}${libdir}/gtk-2.0/include/gdkconfig.h
+
+ install -m 0644 ${S}/gtk/gtkfilechooserprivate.h ${D}${includedir}/gtk-2.0/gtk/
+ install -m 0644 ${S}/gtk/gtkfilechooserutils.h ${D}${includedir}/gtk-2.0/gtk/
+ install -m 0644 ${S}/gtk/gtkfilesystemmodel.h ${D}${includedir}/gtk-2.0/gtk/
+
+ mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-2.0
+}
+
+SYSROOT_PREPROCESS_FUNCS += "gtk_sysroot_preprocess"
+
+gtk_sysroot_preprocess () {
+ if [ -e ${D}${bindir}/gtk-builder-convert ]; then
+ install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
+ install -m 755 ${D}${bindir}/gtk-builder-convert ${SYSROOT_DESTDIR}${bindir_crossscripts}/
+ fi
+}
+
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk+/doc-fixes.patch b/yocto-poky/meta/recipes-gnome/gtk+/gtk+/doc-fixes.patch
new file mode 100644
index 000000000..74e479fd1
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gtk+/gtk+/doc-fixes.patch
@@ -0,0 +1,22 @@
+There are issues building the gtk+ tutorial and faq documentation.
+Since they were removed in gtk+ upstream and are superfluous in
+embedded applications, just don't build them.
+
+Thanks to Joshua Lock for suggesting this approach.
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+
+diff -urN gtk+-2.22.1.orig/docs/Makefile.am gtk+-2.22.1/docs/Makefile.am
+--- gtk+-2.22.1.orig/docs/Makefile.am 2010-11-15 04:13:09.000000000 -0800
++++ gtk+-2.22.1/docs/Makefile.am 2011-02-23 19:25:16.914815097 -0800
+@@ -1,7 +1,7 @@
+ ## Process this file with automake to produce Makefile.in
+ include $(top_srcdir)/Makefile.decl
+
+-SUBDIRS = tutorial faq reference tools
++SUBDIRS = reference tools
+
+ EXTRA_DIST += \
+ defsformat.txt \
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch b/yocto-poky/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch
new file mode 100644
index 000000000..1ae728e70
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch
@@ -0,0 +1,35 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+Updated to apply to gtk+-2.24.15
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+diff -Nurd gtk+-2.24.15/configure.ac gtk+-2.24.15/configure.ac
+--- gtk+-2.24.15/configure.ac 2013-01-12 20:52:54.000000000 +0200
++++ gtk+-2.24.15/configure.ac 2013-02-12 21:33:30.689925967 +0200
+@@ -415,7 +415,7 @@
+ case $enable_explicit_deps in
+ auto)
+ export SED
+- deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
++ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
+ if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
+ enable_explicit_deps=yes
+ else
+@@ -774,7 +774,7 @@
+ dnl Now we check to see if our libtool supports shared lib deps
+ dnl (in a rather ugly way even)
+ if $dynworks; then
+- module_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
++ module_libtool_config="${CONFIG_SHELL-/bin/sh} $host_alias-libtool --config"
+ module_deplibs_check=`$module_libtool_config | \
+ grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
+ sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
+@@ -1574,7 +1574,7 @@
+ # We are using gmodule-no-export now, but I'm leaving the stripping
+ # code in place for now, since pango and atk still require gmodule.
+ export SED
+-export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
++export_dynamic=`($host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+ if test -n "$export_dynamic"; then
+ GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
+ GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk+/strict-prototypes.patch b/yocto-poky/meta/recipes-gnome/gtk+/gtk+/strict-prototypes.patch
new file mode 100644
index 000000000..96e1f5fea
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gtk+/gtk+/strict-prototypes.patch
@@ -0,0 +1,24 @@
+Fixes
+
+include/gtk-2.0/gtk/gtkitemfactory.h:47:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
+ typedef void (*GtkItemFactoryCallback) ();
+
+gcc5 has -Wstrict-prototypes on by default for -Werror so this becomes a build failure for consumers
+of this header e.g. matchbox-panel-2
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: gtk+-2.24.27/gtk/gtkitemfactory.h
+===================================================================
+--- gtk+-2.24.27.orig/gtk/gtkitemfactory.h
++++ gtk+-2.24.27/gtk/gtkitemfactory.h
+@@ -44,7 +44,7 @@ typedef void (*GtkPrintFunc) (gpoint
+ * (Note that if we are included from a C++ program () will mean
+ * (void) so an explicit cast will be needed.)
+ */
+-typedef void (*GtkItemFactoryCallback) ();
++typedef void (*GtkItemFactoryCallback) (void);
+ typedef void (*GtkItemFactoryCallback1) (gpointer callback_data,
+ guint callback_action,
+ GtkWidget *widget);
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk+/toggle-font.diff b/yocto-poky/meta/recipes-gnome/gtk+/gtk+/toggle-font.diff
new file mode 100644
index 000000000..340d12008
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gtk+/gtk+/toggle-font.diff
@@ -0,0 +1,102 @@
+Upstream-Status: Pending
+
+Index: gtk/gtkcellrenderertoggle.c
+===================================================================
+--- gtk/gtkcellrenderertoggle.c.orig 2010-06-22 18:11:33.000000000 +0800
++++ gtk/gtkcellrenderertoggle.c 2010-06-22 18:11:43.000000000 +0800
+@@ -71,6 +71,8 @@
+ PROP_INDICATOR_SIZE
+ };
+
++/* This is a hard-coded default which promptly gets overridden by a size
++ calculated from the font size. */
+ #define TOGGLE_WIDTH 13
+
+ static guint toggle_cell_signals[LAST_SIGNAL] = { 0 };
+@@ -80,8 +82,9 @@
+ typedef struct _GtkCellRendererTogglePrivate GtkCellRendererTogglePrivate;
+ struct _GtkCellRendererTogglePrivate
+ {
+- gint indicator_size;
+-
++ gint indicator_size; /* This is the real size */
++ gint override_size; /* This is the size set from the indicator-size property */
++ GtkWidget *cached_widget;
+ guint inconsistent : 1;
+ };
+
+@@ -104,6 +107,7 @@
+ GTK_CELL_RENDERER (celltoggle)->ypad = 2;
+
+ priv->indicator_size = TOGGLE_WIDTH;
++ priv->override_size = 0;
+ priv->inconsistent = FALSE;
+ }
+
+@@ -210,7 +214,7 @@
+ g_value_set_boolean (value, celltoggle->radio);
+ break;
+ case PROP_INDICATOR_SIZE:
+- g_value_set_int (value, priv->indicator_size);
++ g_value_set_int (value, priv->override_size ? priv->override_size : priv->indicator_size);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+@@ -245,7 +249,7 @@
+ celltoggle->radio = g_value_get_boolean (value);
+ break;
+ case PROP_INDICATOR_SIZE:
+- priv->indicator_size = g_value_get_int (value);
++ priv->override_size = g_value_get_int (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+@@ -273,6 +277,27 @@
+ }
+
+ static void
++on_widget_style_set (GtkWidget *widget, GtkStyle *previous, gpointer user_data)
++{
++ GtkCellRendererTogglePrivate *priv = user_data;
++ PangoContext *context;
++ PangoFontMetrics *metrics;
++ int height;
++
++ context = gtk_widget_get_pango_context (widget);
++ metrics = pango_context_get_metrics (context,
++ widget->style->font_desc,
++ pango_context_get_language (context));
++
++ height = pango_font_metrics_get_ascent (metrics) +
++ pango_font_metrics_get_descent (metrics);
++
++ pango_font_metrics_unref (metrics);
++
++ priv->indicator_size = PANGO_PIXELS (height * 0.85);
++}
++
++static void
+ gtk_cell_renderer_toggle_get_size (GtkCellRenderer *cell,
+ GtkWidget *widget,
+ GdkRectangle *cell_area,
+@@ -287,6 +312,20 @@
+
+ priv = GTK_CELL_RENDERER_TOGGLE_GET_PRIVATE (cell);
+
++ if (priv->override_size) {
++ priv->indicator_size = priv->override_size;
++ } else if (priv->cached_widget != widget) {
++ if (priv->cached_widget) {
++ g_object_remove_weak_pointer (widget, &priv->cached_widget);
++ g_signal_handlers_disconnect_by_func (priv->cached_widget, on_widget_style_set, priv);
++ }
++ priv->cached_widget = widget;
++ g_object_add_weak_pointer (widget, &priv->cached_widget);
++ g_signal_connect (widget, "style-set", on_widget_style_set, priv);
++
++ on_widget_style_set (widget, NULL, priv);
++ }
++
+ calc_width = (gint) cell->xpad * 2 + priv->indicator_size;
+ calc_height = (gint) cell->ypad * 2 + priv->indicator_size;
+
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk+/xsettings.patch b/yocto-poky/meta/recipes-gnome/gtk+/gtk+/xsettings.patch
new file mode 100644
index 000000000..d0a970ad4
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gtk+/gtk+/xsettings.patch
@@ -0,0 +1,20 @@
+Upstream-Status: Pending
+
+Index: gtk+-2.21.2/gdk/x11/gdkevents-x11.c
+===================================================================
+--- gtk+-2.21.2.orig/gdk/x11/gdkevents-x11.c 2010-06-22 17:28:04.000000000 +0800
++++ gtk+-2.21.2/gdk/x11/gdkevents-x11.c 2010-06-22 17:28:06.000000000 +0800
+@@ -3062,10 +3062,9 @@
+ {
+ GdkScreenX11 *screen = data;
+
+- if (xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent))
+- return GDK_FILTER_REMOVE;
+- else
+- return GDK_FILTER_CONTINUE;
++ xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent);
++
++ return GDK_FILTER_CONTINUE;
+ }
+
+ static Bool
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc b/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc
new file mode 100644
index 000000000..f29f0d303
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc
@@ -0,0 +1,111 @@
+SUMMARY = "Multi-platform toolkit for creating GUIs"
+DESCRIPTION = "GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete \
+set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites."
+HOMEPAGE = "http://www.gtk.org"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "libs"
+
+DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf \
+ docbook-utils-native gdk-pixbuf-native libepoxy"
+
+LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
+
+inherit autotools pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings
+
+# This should be in autotools.bbclass, but until something elses uses it putting
+# it here avoids rebuilding everything.
+export PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
+
+do_configure_prepend() {
+ # Do this because the configure script is running ./libtool directly
+ rm -f libtool
+ ln -s ${TARGET_PREFIX}libtool libtool
+}
+
+EXTRA_OECONF += " \
+ --disable-glibtest \
+ --disable-xinerama \
+ --enable-modules \
+ --disable-cups \
+ --disable-introspection \
+"
+
+PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)} \
+ ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "", d)}"
+
+PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes"
+PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland libxkbcommon virtual/mesa"
+
+do_install_append() {
+ mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0
+}
+
+PACKAGES =+ "${PN}-demo"
+LIBV = "3.0.0"
+
+FILES_${PN}-demo = "${bindir}/gtk3-demo \
+ ${bindir}/gtk3-demo-application \
+ ${bindir}/gtk3-icon-browser \
+ ${bindir}/gtk3-widget-factory \
+ ${datadir}/gtk-3.0/demo \
+ ${datadir}/applications/gtk3-demo.desktop \
+ ${datadir}/applications/gtk3-icon-browser.desktop \
+ ${datadir}/applications/gtk3-widget-factory.desktop \
+ ${datadir}/icons/hicolor/*/apps/gtk3-demo*.png \
+ ${datadir}/icons/hicolor/*/apps/gtk3-widget-factory*.png"
+
+# The demo uses PNG files and mime type sniffing, so ensure that these
+# dependencies are present.
+RDEPENDS_${PN}-demo += "gdk-pixbuf-loader-png shared-mime-info"
+
+FILES_${PN} = "${bindir}/gtk-update-icon-cache-3.0 \
+ ${bindir}/gtk-query-immodules-3.0 \
+ ${bindir}/gtk-launch \
+ ${libdir}/lib*${SOLIBS} \
+ ${datadir}/themes ${sysconfdir} ${datadir}/glib-2.0/schemas/ \
+ ${libdir}/gtk-3.0/${LIBV}/engines/libpixmap.so \
+ ${libdir}/gtk-3.0/modules/*.so"
+
+FILES_${PN}-dev += " \
+ ${datadir}/gtk-3.0/gtkbuilder.rng \
+ ${datadir}/gtk-3.0/include \
+ ${libdir}/gtk-3.0/include \
+ ${libdir}/gtk-3.0/${LIBV}/loaders/*.la \
+ ${libdir}/gtk-3.0/${LIBV}/immodules/*.la \
+ ${libdir}/gtk-3.0/3.0.0/printbackends/*.la \
+ ${libdir}/gtk-3.0/${LIBV}/engines/*.la \
+ ${libdir}/gtk-3.0/modules/*.la \
+ ${bindir}/gtk-builder-convert \
+ ${bindir}/gtk-encode-symbolic-svg"
+
+FILES_${PN}-dbg += " \
+ ${libdir}/gtk-3.0/${LIBV}/loaders/.debug \
+ ${libdir}/gtk-3.0/${LIBV}/immodules/.debug \
+ ${libdir}/gtk-3.0/${LIBV}/engines/.debug \
+ ${libdir}/gtk-3.0/${LIBV}/printbackends/.debug \
+ ${libdir}/gtk-3.0/modules/.debug"
+
+RRECOMMENDS_${PN} = "adwaita-icon-theme-symbolic"
+
+PACKAGES_DYNAMIC += "^gtk3-immodule-.* ^gtk3-printbackend-.*"
+
+ALTERNATIVE_${PN} = "gtk-update-icon-cache"
+ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-3.0"
+
+python populate_packages_prepend () {
+ import os.path
+
+ gtk_libdir = d.expand('${libdir}/gtk-3.0/${LIBV}')
+ immodules_root = os.path.join(gtk_libdir, 'immodules')
+ printmodules_root = os.path.join(gtk_libdir, 'printbackends');
+
+ immodules = do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s')
+ if immodules:
+ d.setVar("GTKIMMODULES_PACKAGES", " ".join(immodules))
+
+ do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s')
+
+ if (d.getVar('DEBIAN_NAMES', 1)):
+ d.setVar('PKG_${PN}', '${MLPREFIX}libgtk-3.0')
+}
+
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Dont-force-csd.patch b/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Dont-force-csd.patch
new file mode 100644
index 000000000..32d8a8479
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Dont-force-csd.patch
@@ -0,0 +1,118 @@
+window: Check if we can use CSD before enabling them
+
+Upstream-Status: Backport
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+
+From c5e5ee67490e7e7af56052d8f8beb75db002c2f1 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@gnome.org>
+Date: Wed, 3 Jun 2015 14:07:29 +0100
+Subject: window: Check if we can use CSD before enabling them
+
+The change in 03213b9509fc1df16c66194ea168aed6c15110e9 changed the rules
+as to when CSD can be enabled, but it also unconditionally enables CSD
+with the implicit assumption that client-side shadows were the real
+issue, and that we could work around that by drawing our own borders.
+This also means that setting a titlebar for a GtkWindow will enable CSD
+unconditionally.
+
+In reality, some window managers (like Matchbox) *only* support
+server-side decorations, and will ignore all hints to the contrary, to
+the point of drawing decorations at random locations on top of the
+window.
+
+Since CSD are enabled unconditionally, the GTK_CSD environment variable
+is also not a suitable escape hatch.
+
+In the grand tradition of asking ourselves if we should do something
+just because we can, we should split the environment checks from the
+checks on what the user requested; by doing that, we can also check
+when enabling client-side decorations, and ideally bail out if needed.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=750343
+
+diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
+index 423c6bd..9fe882f 100644
+--- a/gtk/gtkwindow.c
++++ b/gtk/gtkwindow.c
+@@ -4056,6 +4056,32 @@ gtk_window_supports_client_shadow (GtkWindow *window)
+ return TRUE;
+ }
+
++static gboolean
++gtk_window_can_use_csd (GtkWindow *window)
++{
++ const gchar *csd_env;
++
++#ifdef GDK_WINDOWING_BROADWAY
++ if (GDK_IS_BROADWAY_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
++ return TRUE;
++#endif
++
++#ifdef GDK_WINDOWING_WAYLAND
++ if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
++ return TRUE;
++#endif
++
++#ifdef GDK_WINDOWING_MIR
++ if (GDK_IS_MIR_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
++ return TRUE;
++#endif
++
++ csd_env = g_getenv ("GTK_CSD");
++
++ /* If GTK_CSD is unset we default to CSD support */
++ return csd_env == NULL || (strcmp (csd_env, "1") == 0);
++}
++
+ static void
+ gtk_window_enable_csd (GtkWindow *window)
+ {
+@@ -4063,6 +4089,10 @@ gtk_window_enable_csd (GtkWindow *window)
+ GtkWidget *widget = GTK_WIDGET (window);
+ GdkVisual *visual;
+
++ /* If the environment does not support CSD, then there's no point in enabling them */
++ if (!gtk_window_can_use_csd (window))
++ return;
++
+ /* We need a visual with alpha for client shadows */
+ if (priv->use_client_shadow)
+ {
+@@ -5839,7 +5869,6 @@ static gboolean
+ gtk_window_should_use_csd (GtkWindow *window)
+ {
+ GtkWindowPrivate *priv = window->priv;
+- const gchar *csd_env;
+
+ if (priv->csd_requested)
+ return TRUE;
+@@ -5850,24 +5879,7 @@ gtk_window_should_use_csd (GtkWindow *window)
+ if (priv->type == GTK_WINDOW_POPUP)
+ return FALSE;
+
+-#ifdef GDK_WINDOWING_BROADWAY
+- if (GDK_IS_BROADWAY_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
+- return TRUE;
+-#endif
+-
+-#ifdef GDK_WINDOWING_WAYLAND
+- if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
+- return TRUE;
+-#endif
+-
+-#ifdef GDK_WINDOWING_MIR
+- if (GDK_IS_MIR_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
+- return TRUE;
+-#endif
+-
+- csd_env = g_getenv ("GTK_CSD");
+-
+- return (g_strcmp0 (csd_env, "1") == 0);
++ return gtk_window_can_use_csd (window);
+ }
+
+ static void
+--
+cgit v0.10.2
+
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch b/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch
new file mode 100644
index 000000000..3b4beeb71
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch
@@ -0,0 +1,35 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+
+Index: gtk+-3.8.2/configure.ac
+===================================================================
+--- gtk+-3.8.2.orig/configure.ac
++++ gtk+-3.8.2/configure.ac
+@@ -531,7 +531,7 @@ AC_MSG_CHECKING([Whether to write depend
+ case $enable_explicit_deps in
+ auto)
+ export SED
+- deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
++ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
+ if test "x$deplibs_check_method" != xpass_all || test "x$enable_static" = xyes ; then
+ enable_explicit_deps=yes
+ else
+@@ -793,7 +793,7 @@ else
+ dnl Now we check to see if our libtool supports shared lib deps
+ dnl (in a rather ugly way even)
+ if $dynworks; then
+- module_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
++ module_libtool_config="${CONFIG_SHELL-/bin/sh} ./$host_alias-libtool --config"
+ module_deplibs_check=`$module_libtool_config | \
+ grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
+ sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
+@@ -1528,7 +1528,7 @@ fi
+ # We are using gmodule-no-export now, but I'm leaving the stripping
+ # code in place for now, since pango and atk still require gmodule.
+ export SED
+-export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
++export_dynamic=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+ if test -n "$export_dynamic"; then
+ GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
+ GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.16.6.bb b/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.16.6.bb
new file mode 100644
index 000000000..1d736a432
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.16.6.bb
@@ -0,0 +1,18 @@
+require gtk+3.inc
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
+ file://hardcoded_libtool.patch \
+ file://Dont-force-csd.patch \
+ "
+
+SRC_URI[md5sum] = "fc59e5c8b5a4585b60623dd708df400b"
+SRC_URI[sha256sum] = "4d12726d0856a968b41802ae5c5971d7e9bac532717e309d3f81b9989da5ffbe"
+
+S = "${WORKDIR}/gtk+-${PV}"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
+ file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
+ file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
+ file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.28.bb b/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.28.bb
new file mode 100644
index 000000000..e34377366
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.28.bb
@@ -0,0 +1,34 @@
+require gtk+.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+ file://gtk/gtk.h;endline=27;md5=c59e0b4490dd135a5726ebf851f9b17f \
+ file://gdk/gdk.h;endline=27;md5=07db285ec208fb3e0bf7d861b0614202 \
+ file://tests/testgtk.c;endline=27;md5=262db5db5f776f9863e56df31423e24c"
+SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-${PV}.tar.xz \
+ file://xsettings.patch \
+ file://hardcoded_libtool.patch \
+ file://toggle-font.diff;striplevel=0 \
+ file://doc-fixes.patch \
+ file://strict-prototypes.patch \
+ "
+
+SRC_URI[md5sum] = "bfacf87b2ea67e4e5c7866a9003e6526"
+SRC_URI[sha256sum] = "b2c6441e98bc5232e5f9bba6965075dcf580a8726398f7374d39f90b88ed4656"
+
+EXTRA_OECONF = "--enable-xkb --disable-glibtest --disable-cups --disable-xinerama"
+
+LIBV = "2.10.0"
+
+PACKAGES_DYNAMIC += "^gtk-immodule-.* ^gtk-printbackend-.*"
+
+python populate_packages_prepend () {
+ gtk_libdir = d.expand('${libdir}/gtk-2.0/${LIBV}')
+ immodules_root = os.path.join(gtk_libdir, 'immodules')
+ printmodules_root = os.path.join(gtk_libdir, 'printbackends');
+
+ d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s')))
+ do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk-printbackend-%s', 'GTK printbackend module for %s')
+
+ if (d.getVar('DEBIAN_NAMES', True)):
+ d.setVar('PKG_${PN}', '${MLPREFIX}libgtk-2.0')
+}
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.16.6.bb b/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.16.6.bb
new file mode 100644
index 000000000..cba381574
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.16.6.bb
@@ -0,0 +1,63 @@
+SUMMARY = "Native icon utils for GTK+"
+DESCRIPTION = "gtk-update-icon-cache and gtk-encode-symbolic-svg built from GTK+ natively, for build time and on-host postinst script execution."
+SECTION = "libs"
+
+DEPENDS = "glib-2.0-native gdk-pixbuf-native librsvg-native"
+
+LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
+ file://Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch"
+SRC_URI[md5sum] = "fc59e5c8b5a4585b60623dd708df400b"
+SRC_URI[sha256sum] = "4d12726d0856a968b41802ae5c5971d7e9bac532717e309d3f81b9989da5ffbe"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
+ file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
+ file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
+ file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
+
+S = "${WORKDIR}/gtk+-${PV}"
+
+inherit pkgconfig native
+
+PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
+
+do_configure() {
+ # Quite ugly but defines enough to compile the tools.
+ if ! test -f gtk/config.h; then
+ echo "#define GETTEXT_PACKAGE \"gtk30\"" >> gtk/config.h
+ echo "#define HAVE_UNISTD_H 1" >> gtk/config.h
+ echo "#define HAVE_FTW_H 1" >> gtk/config.h
+ fi
+ if ! test -f gdk/config.h; then
+ touch gdk/config.h
+ fi
+}
+
+do_compile() {
+ ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
+ ${S}/gtk/updateiconcache.c \
+ $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gdk-pixbuf-2.0) \
+ -o gtk-update-icon-cache
+
+ ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
+ ${S}/gtk/encodesymbolic.c \
+ $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gio-2.0 gdk-pixbuf-2.0) \
+ -o gtk-encode-symbolic-svg
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${B}/gtk-update-icon-cache ${D}${bindir}
+ install -m 0755 ${B}/gtk-encode-symbolic-svg ${D}${bindir}
+
+ create_wrapper ${D}/${bindir}/gtk-update-icon-cache \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
+ create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
+}
+
+# Prevent bitbake from optimizing away the native librsvg sysroot population
+do_populate_sysroot_setscene[depends] += "librsvg-native:do_populate_sysroot_setscene"
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils/Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch b/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils/Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch
new file mode 100644
index 000000000..237f80375
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils/Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch
@@ -0,0 +1,102 @@
+From 4d09ff324419fe4e671233044e424378da53969b Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Tue, 9 Jun 2015 14:20:30 +0300
+Subject: [PATCH] Remove Gdk-dependency from gtk-encode-symbolic-svg
+
+Building gtk-encode-symbolic-svg without building Gdk is useful
+as only the icon tools are needed on the native build: this makes
+native build much faster and requires much less dependencies.
+
+Upstream-Status: Pending
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ gtk/encodesymbolic.c | 36 ++++++++++--------------------------
+ 1 file changed, 10 insertions(+), 26 deletions(-)
+
+diff --git a/gtk/encodesymbolic.c b/gtk/encodesymbolic.c
+index 9f7d015..1f07563 100644
+--- a/gtk/encodesymbolic.c
++++ b/gtk/encodesymbolic.c
+@@ -19,7 +19,6 @@
+
+ #include <glib.h>
+ #include <gdk-pixbuf/gdk-pixdata.h>
+-#include <gdk/gdk.h>
+ #include <glib/gi18n.h>
+
+ #ifdef HAVE_UNISTD_H
+@@ -43,30 +42,18 @@ static GdkPixbuf *
+ load_symbolic_svg (char *file_data, gsize file_len,
+ int width,
+ int height,
+- const GdkRGBA *fg,
+- const GdkRGBA *success_color,
+- const GdkRGBA *warning_color,
+- const GdkRGBA *error_color,
++ const char *css_fg,
++ const char *css_success,
++ const char *css_warning,
++ const char *css_error,
+ GError **error)
+ {
+ GInputStream *stream;
+ GdkPixbuf *pixbuf;
+- gchar *css_fg;
+- gchar *css_success;
+- gchar *css_warning;
+- gchar *css_error;
+ gchar *data;
+ gchar *svg_width, *svg_height;
+ gchar *escaped_file_data;
+
+- css_fg = gdk_rgba_to_string (fg);
+-
+- css_success = css_warning = css_error = NULL;
+-
+- css_warning = gdk_rgba_to_string (warning_color);
+- css_error = gdk_rgba_to_string (error_color);
+- css_success = gdk_rgba_to_string (success_color);
+-
+ /* Fetch size from the original icon */
+ stream = g_memory_input_stream_new_from_data (file_data, file_len, NULL);
+ pixbuf = gdk_pixbuf_new_from_stream (stream, NULL, error);
+@@ -105,10 +92,6 @@ load_symbolic_svg (char *file_data, gsize file_len,
+ "</svg>",
+ NULL);
+ g_free (escaped_file_data);
+- g_free (css_fg);
+- g_free (css_warning);
+- g_free (css_error);
+- g_free (css_success);
+ g_free (svg_width);
+ g_free (svg_height);
+
+@@ -167,7 +150,8 @@ make_symbolic_pixbuf (char *file,
+ GError **error)
+
+ {
+- GdkRGBA r = { 1,0,0,1}, g = {0,1,0,1};
++ const char r[] = "rgba(255,0,0,1)";
++ const char g[] = "rgba(0,255,0,1)";
+ GdkPixbuf *loaded;
+ GdkPixbuf *pixbuf;
+ int plane;
+@@ -196,10 +180,10 @@ make_symbolic_pixbuf (char *file,
+ * the "rest", as all color fractions should add up to 1.
+ */
+ loaded = load_symbolic_svg (file_data, file_len, width, height,
+- &g,
+- plane == 0 ? &r : &g,
+- plane == 1 ? &r : &g,
+- plane == 2 ? &r : &g,
++ g,
++ plane == 0 ? r : g,
++ plane == 1 ? r : g,
++ plane == 2 ? r : g,
+ error);
+ if (loaded == NULL)
+ return NULL;
+--
+2.1.4
+