summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2010-12-07 06:18:55 +0000
committerGilles Dartiguelongue <eva@gentoo.org>2010-12-07 06:18:55 +0000
commitd297e496ec79bb48a8b3b69672b91debce42b3ad (patch)
treeac767aea7305cd538e5f4dcbb5b3ab1cfbe8a91d /eclass/gnome2-utils.eclass
parentClean up old revision, thanks to mattst88, bug #348002. (diff)
downloadgentoo-2-d297e496ec79bb48a8b3b69672b91debce42b3ad.tar.gz
gentoo-2-d297e496ec79bb48a8b3b69672b91debce42b3ad.tar.bz2
gentoo-2-d297e496ec79bb48a8b3b69672b91debce42b3ad.zip
add gsettings support to gnome eclasses, thanks to abcd
Diffstat (limited to 'eclass/gnome2-utils.eclass')
-rw-r--r--eclass/gnome2-utils.eclass26
1 files changed, 25 insertions, 1 deletions
diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
index 7f9ef898ba95..0094968210f6 100644
--- a/eclass/gnome2-utils.eclass
+++ b/eclass/gnome2-utils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.13 2008/10/22 21:04:53 eva Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.14 2010/12/07 06:18:55 eva Exp $
#
# gnome2-utils.eclass
@@ -221,3 +221,27 @@ gnome2_scrollkeeper_update() {
"${SCROLLKEEPER_UPDATE_BIN}" -q -p "${SCROLLKEEPER_DIR}"
fi
}
+
+gnome2_schemas_savelist() {
+ pushd "${D}" &>/dev/null
+ export GNOME2_ECLASS_GLIB_SCHEMAS=$(find 'usr/share/glib-2.0/schemas' -name '*.gschema.xml' 2>/dev/null)
+ popd &>/dev/null
+}
+
+gnome2_schemas_update() {
+ local updater="$(type -P glib-compile-schemas 2>/dev/null)"
+
+ if [[ ! -x ${updater} ]]; then
+ debug-print "${updater} is not executable"
+ return
+ fi
+
+ if [[ -z ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then
+ debug-print "no schemas to update"
+ return
+ fi
+
+ ebegin "Updating GSettings schemas"
+ ${updater} --allow-any-name "$@" "${ROOT%/}/usr/share/glib-2.0/schemas" &>/dev/null
+ eend $?
+}