Hello list,
please find attached a couple of patches that have been worked on in the
gnome overlay for both gnome 2.32 release (gsettings integration),
better EAPI=3 support - although I believe work is not complete, prefix
feedback would be most welcome - and various cleanups that are long
overdue - although there is more to be done on that front.
Please also find in these patches a proposal of a waf-utils eclass in
order to put waf related build management into an eclass. There is a
couple of ebuilds already in tree all doing things on their own and I
had a prototype laying around that I had to complete in order to have
hamster-applet-2.32.
Unless there is anything big I'd like to commmit everything big sunday
and in the worst case by next sunday.
Thanks for your attention.
--
Gilles Dartiguelongue
Gentoo
From e6f29a03cab65d2f1d9a491f4b2882e3899bd06f Mon Sep 17 00:00:00 2001
From: Gilles Dartiguelongue
Date: Thu, 21 Oct 2010 12:15:04 +0200
Subject: [PATCH 8/8] eclass/gnome2-utils.eclass: add support for EAPI 3
Integrate changes from the prefix overlay and keep backward
compatibility.
diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
index be9f983..c488dd9 100644
--- a/eclass/gnome2-utils.eclass
+++ b/eclass/gnome2-utils.eclass
@@ -11,7 +11,10 @@
# Maintained by Gentoo's GNOME herd
#
-
+case "${EAPI:-0}" in
+ 0|1|2|3) ;;
+ *) die "EAPI=${EAPI} is not supported" ;;
+esac
# Path to gconftool-2
: ${GCONFTOOL_BIN:="/usr/bin/gconftool-2"}
@@ -37,7 +40,8 @@ DEPEND=">=sys-apps/sed-4"
# Find the GConf schemas that are about to be installed and save their location
# in the GNOME2_ECLASS_SCHEMAS environment variable
gnome2_gconf_savelist() {
- pushd "${D}" &> /dev/null
+ has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
+ pushd "${ED}" &> /dev/null
export GNOME2_ECLASS_SCHEMAS=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null)
popd &> /dev/null
}
@@ -46,7 +50,8 @@ gnome2_gconf_savelist() {
# Applies any schema files installed by the current ebuild to Gconf's database
# using gconftool-2
gnome2_gconf_install() {
- local updater="${ROOT}${GCONFTOOL_BIN}"
+ has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
+ local updater="${EROOT}${GCONFTOOL_BIN}"
if [[ ! -x "${updater}" ]]; then
debug-print "${updater} is not executable"
@@ -60,15 +65,15 @@ gnome2_gconf_install() {
# We are ready to install the GCONF Scheme now
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
- export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT};")"
+ export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${EROOT};")"
einfo "Installing GNOME 2 GConf schemas"
local F
for F in ${GNOME2_ECLASS_SCHEMAS}; do
- if [[ -e "${ROOT}${F}" ]]; then
+ if [[ -e "${EROOT}${F}" ]]; then
debug-print "Installing schema: ${F}"
- "${updater}" --makefile-install-rule "${ROOT}${F}" 1>/dev/null
+ "${updater}" --makefile-install-rule "${EROOT}${F}" 1>/dev/null
fi
done
@@ -85,7 +90,8 @@ gnome2_gconf_install() {
# Removes schema files previously installed by the current ebuild from Gconf's
# database.
gnome2_gconf_uninstall() {
- local updater="${ROOT}${GCONFTOOL_BIN}"
+ has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
+ local updater="${EROOT}${GCONFTOOL_BIN}"
if [[ ! -x "${updater}" ]]; then
debug-print "${updater} is not executable"
@@ -98,15 +104,15 @@ gnome2_gconf_uninstall() {
fi
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
- export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT};")"
+ export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${EROOT};")"
einfo "Uninstalling GNOME 2 GConf schemas"
local F
for F in ${GNOME2_ECLASS_SCHEMAS}; do
- if [[ -e "${ROOT}${F}" ]]; then
+ if [[ -e "${EROOT}${F}" ]]; then
debug-print "Uninstalling gconf schema: ${F}"
- "${updater}" --makefile-uninstall-rule "${ROOT}${F}" 1>/dev/null
+ "${updater}" --makefile-uninstall-rule "${EROOT}${F}" 1>/dev/null
fi
done
@@ -124,7 +130,8 @@ gnome2_gconf_uninstall() {
# in the GNOME2_ECLASS_ICONS environment variable
# That function should be called from pkg_preinst
gnome2_icon_savelist() {
- pushd "${D}" &> /dev/null
+ has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
+ pushd "${ED}" &> /dev/null
export GNOME2_ECLASS_ICONS=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null)
popd &> /dev/null
}
@@ -133,7 +140,8 @@ gnome2_icon_savelist() {
# Updates Gtk+ icon cache files under /usr/share/icons if the current ebuild
# have installed anything under that location.
gnome2_icon_cache_update() {
- local updater="${ROOT}${GTK_UPDATE_ICON_CACHE}"
+ has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
+ local updater="${EROOT}${GTK_UPDATE_ICON_CACHE}"
if [[ ! -x "${updater}" ]] ; then
debug-print "${updater} is not executable"
@@ -155,14 +163,14 @@ gnome2_icon_cache_update() {
if [[ -f "${ROOT}${dir}/index.theme" ]]