| 1 | # Copyright 1999-2006 Gentoo Foundation |
1 | # Copyright 1999-2006 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.14 2010/12/07 06:18:55 eva Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.15 2010/12/07 06:21:59 eva Exp $ |
| 4 | |
4 | |
| 5 | # |
5 | # |
| 6 | # gnome2-utils.eclass |
6 | # gnome2-utils.eclass |
| 7 | # |
7 | # |
| 8 | # Set of auxiliary functions used to perform actions commonly needed by packages |
8 | # Set of auxiliary functions used to perform actions commonly needed by packages |
| … | |
… | |
| 19 | # Directory where scrollkeeper-update should do its work |
19 | # Directory where scrollkeeper-update should do its work |
| 20 | : ${SCROLLKEEPER_DIR:="${ROOT}var/lib/scrollkeeper"} |
20 | : ${SCROLLKEEPER_DIR:="${ROOT}var/lib/scrollkeeper"} |
| 21 | |
21 | |
| 22 | # Path to scrollkeeper-update |
22 | # Path to scrollkeeper-update |
| 23 | : ${SCROLLKEEPER_UPDATE_BIN:="${ROOT}usr/bin/scrollkeeper-update"} |
23 | : ${SCROLLKEEPER_UPDATE_BIN:="${ROOT}usr/bin/scrollkeeper-update"} |
|
|
24 | |
|
|
25 | # Path to gtk-update-icon-cache |
|
|
26 | : ${GTK_UPDATE_ICON_CACHE:="/usr/bin/gtk-update-icon-cache"} |
|
|
27 | |
|
|
28 | # Path to glib-compile-schemas |
|
|
29 | : ${GLIB_COMPILE_SCHEMAS:="/usr/bin/glib-compile-schemas"} |
| 24 | |
30 | |
| 25 | |
31 | |
| 26 | |
32 | |
| 27 | DEPEND=">=sys-apps/sed-4" |
33 | DEPEND=">=sys-apps/sed-4" |
| 28 | |
34 | |
| … | |
… | |
| 121 | |
127 | |
| 122 | |
128 | |
| 123 | # Updates Gtk+ icon cache files under /usr/share/icons if the current ebuild |
129 | # Updates Gtk+ icon cache files under /usr/share/icons if the current ebuild |
| 124 | # have installed anything under that location. |
130 | # have installed anything under that location. |
| 125 | gnome2_icon_cache_update() { |
131 | gnome2_icon_cache_update() { |
| 126 | local updater="$(type -p gtk-update-icon-cache 2> /dev/null)" |
132 | local updater="${ROOT}${GTK_UPDATE_ICON_CACHE}" |
| 127 | |
133 | |
| 128 | if [[ ! -x "${updater}" ]] ; then |
134 | if [[ ! -x "${updater}" ]] ; then |
| 129 | debug-print "${updater} is not executable" |
135 | debug-print "${updater} is not executable" |
| 130 | return |
136 | return |
| 131 | fi |
137 | fi |
| … | |
… | |
| 227 | export GNOME2_ECLASS_GLIB_SCHEMAS=$(find 'usr/share/glib-2.0/schemas' -name '*.gschema.xml' 2>/dev/null) |
233 | export GNOME2_ECLASS_GLIB_SCHEMAS=$(find 'usr/share/glib-2.0/schemas' -name '*.gschema.xml' 2>/dev/null) |
| 228 | popd &>/dev/null |
234 | popd &>/dev/null |
| 229 | } |
235 | } |
| 230 | |
236 | |
| 231 | gnome2_schemas_update() { |
237 | gnome2_schemas_update() { |
| 232 | local updater="$(type -P glib-compile-schemas 2>/dev/null)" |
238 | local updater="${ROOT}${GLIB_COMPILE_SCHEMAS}" |
| 233 | |
239 | |
| 234 | if [[ ! -x ${updater} ]]; then |
240 | if [[ ! -x ${updater} ]]; then |
| 235 | debug-print "${updater} is not executable" |
241 | debug-print "${updater} is not executable" |
| 236 | return |
242 | return |
| 237 | fi |
243 | fi |