commit: f1f7e5b963209fefcc2acc77261dd7eb69700165
Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
AuthorDate: Mon May 25 16:07:47 2015 +0000
Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Mon May 25 16:07:47 2015 +0000
URL: https://gitweb.gentoo.org/proj/gnome.git/commit/?id=f1f7e5b9
eclass/gnome2.eclass: switch to xdg eclass
eclass/gnome2-utils.eclass | 12 ------------
eclass/gnome2.eclass | 11 ++++++-----
2 files changed, 6 insertions(+), 17 deletions(-)
diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
index 4c7d0c8..650c57d 100644
--- a/eclass/gnome2-utils.eclass
+++ b/eclass/gnome2-utils.eclass
@@ -95,18 +95,6 @@ gnome2_environment_reset() {
# GST_REGISTRY is to work around gst utilities trying to read/write
/root
export GST_REGISTRY="${T}/registry.xml"
-
- # XXX: code for resetting XDG_* directories should probably be moved
into
- # a separate function in a non-gnome eclass
- export XDG_DATA_HOME="${T}/.local/share"
- export XDG_CONFIG_HOME="${T}/.config"
- export XDG_CACHE_HOME="${T}/.cache"
- export XDG_RUNTIME_DIR="${T}/run"
- mkdir -p "${XDG_DATA_HOME}" "${XDG_CONFIG_HOME}" "${XDG_CACHE_HOME}" \
- "${XDG_RUNTIME_DIR}"
- # This directory needs to be owned by the user, and chmod 0700
- # http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
- chmod 0700 "${XDG_RUNTIME_DIR}"
}
# @FUNCTION: gnome2_gconf_savelist
diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index 9d1730d..7fc3423 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -10,7 +10,7 @@
# Exports portage base functions used by ebuilds written for packages using the
# GNOME framework. For additional functions, see gnome2-utils.eclass.
-inherit eutils fdo-mime libtool gnome.org gnome2-utils
+inherit eutils libtool gnome.org gnome2-utils xdg
case "${EAPI:-0}" in
4|5)
@@ -75,6 +75,8 @@ gnome2_src_unpack() {
# Prepare environment for build, fix build of scrollkeeper documentation,
# run elibtoolize.
gnome2_src_prepare() {
+ xdg_src_prepare
+
# Prevent assorted access violations and test failures
gnome2_environment_reset
@@ -239,6 +241,7 @@ gnome2_src_install() {
# @DESCRIPTION:
# Finds Icons, GConf and GSettings schemas for later handling in pkg_postinst
gnome2_pkg_preinst() {
+ xdg_pkg_preinst
gnome2_gconf_savelist
gnome2_icon_savelist
gnome2_schemas_savelist
@@ -251,9 +254,8 @@ gnome2_pkg_preinst() {
# Handle scrollkeeper, GConf, GSettings, Icons, desktop and mime
# database updates.
gnome2_pkg_postinst() {
+ xdg_pkg_postinst
gnome2_gconf_install
- fdo-mime_desktop_database_update
- fdo-mime_mime_database_update
gnome2_icon_cache_update
gnome2_schemas_update
gnome2_scrollkeeper_update
@@ -276,8 +278,7 @@ gnome2_pkg_postinst() {
# @DESCRIPTION:
# Handle scrollkeeper, GSettings, Icons, desktop and mime database updates.
gnome2_pkg_postrm() {
- fdo-mime_desktop_database_update
- fdo-mime_mime_database_update
+ xdg_pkg_postrm
gnome2_icon_cache_update
gnome2_schemas_update
gnome2_scrollkeeper_update