summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2013-09-15 19:29:11 +0000
committerPacho Ramos <pacho@gentoo.org>2013-09-15 19:29:11 +0000
commit75c9a3bae356993a9a649ecdc76df1edcdf17016 (patch)
treebd55d6f15f182734dd3c53dd95e7436f9800dead /eclass/gnome2-utils.eclass
parentFallback USE flag wasn't used in 3.8 (as fallback no longer exists, it's repl... (diff)
downloadgentoo-2-75c9a3bae356993a9a649ecdc76df1edcdf17016.tar.gz
gentoo-2-75c9a3bae356993a9a649ecdc76df1edcdf17016.tar.bz2
gentoo-2-75c9a3bae356993a9a649ecdc76df1edcdf17016.zip
Support gtk+-2.24.20 query immodules (#476100)
Diffstat (limited to 'eclass/gnome2-utils.eclass')
-rw-r--r--eclass/gnome2-utils.eclass42
1 files changed, 23 insertions, 19 deletions
diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
index 9db9be50eef0..a70e322f7820 100644
--- a/eclass/gnome2-utils.eclass
+++ b/eclass/gnome2-utils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.32 2013/09/03 21:54:38 eva Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.33 2013/09/15 19:29:11 pacho Exp $
# @ECLASS: gnome2-utils.eclass
# @MAINTAINER:
@@ -446,29 +446,33 @@ gnome2_gdk_pixbuf_update() {
# @DESCRIPTION:
# Updates gtk2 immodules/gdk-pixbuf loaders listing.
gnome2_query_immodules_gtk2() {
- local GTK2_CONFDIR="/etc/gtk-2.0/$(get_abi_CHOST)"
+ if has_version ">=x11-libs/gtk+-2.24.20:2"; then
+ "${EPREFIX}/usr/bin/gtk-query-immodules-2.0" --update-cache
+ else
+ local GTK2_CONFDIR="/etc/gtk-2.0/$(get_abi_CHOST)"
- local query_exec="${EPREFIX}/usr/bin/gtk-query-immodules-2.0"
- local gtk_conf="${EPREFIX}${GTK2_CONFDIR}/gtk.immodules"
- local gtk_conf_dir=$(dirname "${gtk_conf}")
+ local query_exec="${EPREFIX}/usr/bin/gtk-query-immodules-2.0"
+ local gtk_conf="${EPREFIX}${GTK2_CONFDIR}/gtk.immodules"
+ local gtk_conf_dir=$(dirname "${gtk_conf}")
- einfo "Generating Gtk2 immodules/gdk-pixbuf loaders listing:"
- einfo "-> ${gtk_conf}"
+ einfo "Generating Gtk2 immodules/gdk-pixbuf loaders listing:"
+ einfo "-> ${gtk_conf}"
- mkdir -p "${gtk_conf_dir}"
- local tmp_file=$(mktemp -t tmp.XXXXXXXXXXgtk_query_immodules)
- if [ -z "${tmp_file}" ]; then
- ewarn "gtk_query_immodules: cannot create temporary file"
- return 1
- fi
+ mkdir -p "${gtk_conf_dir}"
+ local tmp_file=$(mktemp -t tmp.XXXXXXXXXXgtk_query_immodules)
+ if [ -z "${tmp_file}" ]; then
+ ewarn "gtk_query_immodules: cannot create temporary file"
+ return 1
+ fi
- if ${query_exec} > "${tmp_file}"; then
- cat "${tmp_file}" > "${gtk_conf}" || \
- ewarn "Failed to write to ${gtk_conf}"
- else
- ewarn "Cannot update gtk.immodules, file generation failed"
+ if ${query_exec} > "${tmp_file}"; then
+ cat "${tmp_file}" > "${gtk_conf}" || \
+ ewarn "Failed to write to ${gtk_conf}"
+ else
+ ewarn "Cannot update gtk.immodules, file generation failed"
+ fi
+ rm "${tmp_file}"
fi
- rm "${tmp_file}"
}
# @FUNCTION: gnome2_query_immodules_gtk3