/[gentoo-x86]/eclass/gnome2-utils.eclass
Gentoo

Diff of /eclass/gnome2-utils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.35 Revision 1.36
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2014 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.35 2014/02/22 08:05:45 pacho Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.36 2014/03/01 10:18:35 mgorny 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.
49# @ECLASS-VARIABLE: GLIB_COMPILE_SCHEMAS 49# @ECLASS-VARIABLE: GLIB_COMPILE_SCHEMAS
50# @INTERNAL 50# @INTERNAL
51# @DESCRIPTION: 51# @DESCRIPTION:
52# Path to glib-compile-schemas 52# Path to glib-compile-schemas
53: ${GLIB_COMPILE_SCHEMAS:="/usr/bin/glib-compile-schemas"} 53: ${GLIB_COMPILE_SCHEMAS:="/usr/bin/glib-compile-schemas"}
54
55# @ECLASS-VARIABLE: GDK_PIXBUF_UPDATE_BIN
56# @INTERNAL
57# @DESCRIPTION:
58# Path to gdk-pixbuf-query-loaders
59: ${GDK_PIXBUF_UPDATE_BIN:="/usr/bin/gdk-pixbuf-query-loaders"}
60 54
61# @ECLASS-VARIABLE: GNOME2_ECLASS_SCHEMAS 55# @ECLASS-VARIABLE: GNOME2_ECLASS_SCHEMAS
62# @INTERNAL 56# @INTERNAL
63# @DEFAULT_UNSET 57# @DEFAULT_UNSET
64# @DESCRIPTION: 58# @DESCRIPTION:
407# GNOME2_ECLASS_GDK_PIXBUF_LOADERS variable. 401# GNOME2_ECLASS_GDK_PIXBUF_LOADERS variable.
408# This function should be called from pkg_preinst. 402# This function should be called from pkg_preinst.
409gnome2_gdk_pixbuf_savelist() { 403gnome2_gdk_pixbuf_savelist() {
410 has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}" 404 has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
411 pushd "${ED}" 1>/dev/null 405 pushd "${ED}" 1>/dev/null
412 export GNOME2_ECLASS_GDK_PIXBUF_LOADERS=$(find "usr/$(get_libdir)/gdk-pixbuf-2.0" -type f 2>/dev/null) 406 export GNOME2_ECLASS_GDK_PIXBUF_LOADERS=$(find usr/lib*/gdk-pixbuf-2.0 -type f 2>/dev/null)
413 popd 1>/dev/null 407 popd 1>/dev/null
414} 408}
415 409
416# @FUNCTION: gnome2_gdk_pixbuf_update 410# @FUNCTION: gnome2_gdk_pixbuf_update
417# @USAGE: gnome2_gdk_pixbuf_update 411# @USAGE: gnome2_gdk_pixbuf_update
418# @DESCRIPTION: 412# @DESCRIPTION:
419# Updates gdk-pixbuf loader cache if GNOME2_ECLASS_GDK_PIXBUF_LOADERS has some. 413# Updates gdk-pixbuf loader cache if GNOME2_ECLASS_GDK_PIXBUF_LOADERS has some.
420# This function should be called from pkg_postinst and pkg_postrm. 414# This function should be called from pkg_postinst and pkg_postrm.
421gnome2_gdk_pixbuf_update() { 415gnome2_gdk_pixbuf_update() {
422 has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}" 416 has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
423 local updater="${EROOT}${GDK_PIXBUF_UPDATE_BIN}" 417 local updater="${EROOT}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders"
418
419 if [[ ! -x ${updater} ]]; then
420 updater="${EROOT}/usr/bin/gdk-pixbuf-query-loaders"
421 fi
424 422
425 if [[ ! -x ${updater} ]]; then 423 if [[ ! -x ${updater} ]]; then
426 debug-print "${updater} is not executable" 424 debug-print "${updater} is not executable"
427 return 425 return
428 fi 426 fi

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36

  ViewVC Help
Powered by ViewVC 1.1.20