summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-01-09 16:48:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-10 23:48:56 +0000
commita9e71b41463c6c8e2be50d40403a0017d3cdf146 (patch)
treec6da0737d6985b9870c8f8b94592f6341986b4aa /meta
parent9b9cfc1dfe5e3b8f89b7a8508537166d0f23935e (diff)
downloadopenembedded-core-contrib-a9e71b41463c6c8e2be50d40403a0017d3cdf146.tar.gz
gtk+: version installed gtk-update-icon-cache and use alternatives
With GTK+ 3 being added soon we'll have potentially two providers of gtk-update-icon-cache. Append a version to the binary and use update-alternatives to ensure that the unversioned name works. For gtk+-native the alternatives won't take effect, so install a symlink explicitly. This will break if we have a gtk+3-native but we can fix that if and when that happens. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-gnome/gtk+/gtk+.inc15
-rw-r--r--meta/recipes-gnome/gtk+/gtk+_2.24.14.bb2
2 files changed, 14 insertions, 3 deletions
diff --git a/meta/recipes-gnome/gtk+/gtk+.inc b/meta/recipes-gnome/gtk+/gtk+.inc
index c6d235f66a..97d3650b06 100644
--- a/meta/recipes-gnome/gtk+/gtk+.inc
+++ b/meta/recipes-gnome/gtk+/gtk+.inc
@@ -23,11 +23,11 @@ PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
PACKAGECONFIG[x11] = "--with-x=yes --with-gdktarget=x11,--with-x=no,${X11DEPENDS}"
PACKAGECONFIG[gtk-directfb] = "--with-gdktarget=directfb,,directfb"
-inherit autotools gtk-doc pkgconfig
+inherit autotools gtk-doc pkgconfig update-alternatives
PACKAGES += "libgail gtk-demo"
-FILES_${PN} = "${bindir}/gtk-update-icon-cache \
+FILES_${PN} = "${bindir}/gtk-update-icon-cache-2.0 \
${bindir}/gtk-query-immodules-2.0 \
${libdir}/lib*${SOLIBS} \
${datadir}/themes ${sysconfdir} \
@@ -66,6 +66,9 @@ 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
@@ -77,6 +80,14 @@ do_install () {
install -m 0644 gtk/gtkfilechooserprivate.h ${D}${includedir}/gtk-2.0/gtk/
install -m 0644 gtk/gtkfilechooserutils.h ${D}${includedir}/gtk-2.0/gtk/
install -m 0644 gtk/gtkfilesystemmodel.h ${D}${includedir}/gtk-2.0/gtk/
+
+ mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-2.0
+}
+
+do_install_append_class-native () {
+ # Ideally we'd use alternatives in the sysroot, but they don't work.
+ # As we know we don't have a native GTK+ 3 (yet), make a symlink instead.
+ ln -s gtk-update-icon-cache-2.0 ${D}${bindir}/gtk-update-icon-cache
}
SYSROOT_PREPROCESS_FUNCS += "gtk_sysroot_preprocess"
diff --git a/meta/recipes-gnome/gtk+/gtk+_2.24.14.bb b/meta/recipes-gnome/gtk+/gtk+_2.24.14.bb
index 553196a150..028b2384c1 100644
--- a/meta/recipes-gnome/gtk+/gtk+_2.24.14.bb
+++ b/meta/recipes-gnome/gtk+/gtk+_2.24.14.bb
@@ -43,7 +43,7 @@ RRECOMMENDS_${PN}_class-native = ""
DEPENDS_class-native = "glib-2.0-native atk-native pango-native cairo-native gdk-pixbuf-native"
do_install_append_class-native () {
- create_wrapper ${D}/${bindir}/gtk-update-icon-cache \
+ create_wrapper ${D}/${bindir}/gtk-update-icon-cache-2.0 \
GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
}