diff options
author | Pacho Ramos <pacho@gentoo.org> | 2013-09-15 19:29:11 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2013-09-15 19:29:11 +0000 |
commit | 75c9a3bae356993a9a649ecdc76df1edcdf17016 (patch) | |
tree | bd55d6f15f182734dd3c53dd95e7436f9800dead /eclass | |
parent | Fallback USE flag wasn't used in 3.8 (as fallback no longer exists, it's repl... (diff) | |
download | gentoo-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')
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/gnome2-utils.eclass | 42 |
2 files changed, 27 insertions, 20 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 9890b5b5b0d4..958b52e6b7af 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.964 2013/09/14 19:00:10 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.965 2013/09/15 19:29:11 pacho Exp $ + + 15 Sep 2013; Pacho Ramos <pacho@gentoo.org> gnome2-utils.eclass: + Support gtk+-2.24.20 query immodules (#476100) 14 Sep 2013; Michał Górny <mgorny@gentoo.org> eutils.eclass: Support EAPIs < 4 in einstalldocs properly. 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 |