| 1 | # Copyright 1999-2012 Gentoo Foundation |
1 | # Copyright 1999-2012 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.27 2012/05/02 21:05:38 eva Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.28 2012/06/21 15:10:59 naota Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: gnome2-utils.eclass |
5 | # @ECLASS: gnome2-utils.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # gnome@gentoo.org |
7 | # gnome@gentoo.org |
| 8 | # @BLURB: Auxiliary functions commonly used by Gnome packages. |
8 | # @BLURB: Auxiliary functions commonly used by Gnome packages. |
| … | |
… | |
| 384 | |
384 | |
| 385 | ebegin "Updating GSettings schemas" |
385 | ebegin "Updating GSettings schemas" |
| 386 | ${updater} --allow-any-name "$@" "${EROOT%/}/usr/share/glib-2.0/schemas" &>/dev/null |
386 | ${updater} --allow-any-name "$@" "${EROOT%/}/usr/share/glib-2.0/schemas" &>/dev/null |
| 387 | eend $? |
387 | eend $? |
| 388 | } |
388 | } |
|
|
389 | |
|
|
390 | # @FUNCTION: gnome2_query_immodules_gtk2 |
|
|
391 | # @USAGE: gnome2_query_immodules_gtk2 |
|
|
392 | # @DESCRIPTION: |
|
|
393 | # Updates gtk2 immodules/gdk-pixbuf loaders listing. |
|
|
394 | gnome2_query_immodules_gtk2() { |
|
|
395 | local GTK2_CONFDIR="/etc/gtk-2.0/$(get_abi_CHOST)" |
|
|
396 | |
|
|
397 | local query_exec="${EPREFIX}/usr/bin/gtk-query-immodules-2.0" |
|
|
398 | local gtk_conf="${EPREFIX}${GTK2_CONFDIR}/gtk.immodules" |
|
|
399 | local gtk_conf_dir=$(dirname "${gtk_conf}") |
|
|
400 | |
|
|
401 | einfo "Generating Gtk2 immodules/gdk-pixbuf loaders listing:" |
|
|
402 | einfo "-> ${gtk_conf}" |
|
|
403 | |
|
|
404 | mkdir -p "${gtk_conf_dir}" |
|
|
405 | local tmp_file=$(mktemp -t tmp.XXXXXXXXXXgtk_query_immodules) |
|
|
406 | if [ -z "${tmp_file}" ]; then |
|
|
407 | ewarn "gtk_query_immodules: cannot create temporary file" |
|
|
408 | return 1 |
|
|
409 | fi |
|
|
410 | |
|
|
411 | if ${query_exec} > "${tmp_file}"; then |
|
|
412 | cat "${tmp_file}" > "${gtk_conf}" || \ |
|
|
413 | ewarn "Failed to write to ${gtk_conf}" |
|
|
414 | else |
|
|
415 | ewarn "Cannot update gtk.immodules, file generation failed" |
|
|
416 | fi |
|
|
417 | rm "${tmp_file}" |
|
|
418 | } |
|
|
419 | |
|
|
420 | # @FUNCTION: gnome2_query_immodules_gtk3 |
|
|
421 | # @USAGE: gnome2_query_immodules_gtk3 |
|
|
422 | # @DESCRIPTION: |
|
|
423 | # Updates gtk3 immodules/gdk-pixbuf loaders listing. |
|
|
424 | gnome2_query_immodules_gtk3() { |
|
|
425 | "${EPREFIX}/usr/bin/gtk-query-immodules-3.0" --update-cache |
|
|
426 | } |