Re: [gentoo-dev] eclass review for Gnome 2.32 and waf ebuilds

2010-12-07 Thread Gilles Dartiguelongue
Le mardi 07 décembre 2010 à 09:46 +0100, Arfrever Frehtes Taifersar
Arahesis a écrit :
> Why does waf-utils_pkg_setup() call 'python_set_active_version 2'?
> What do you plan to do when there are packages using waf and supporting 
> Python 3?
> 
> http://code.google.com/p/waf/ says:
> "compatibility from Python 2.3 to 3.1 is maintained (and Jython 2.5)"
> 

well, packages I had in my hands (midori, hamster-applet) did not run
(waf did not run) with python 3. Any clever solution to running a python
build system is obviously more than welcome as I said in my earlier mail
this morning.

-- 
Gilles Dartiguelongue 
Gentoo




Re: [gentoo-dev] eclass review for Gnome 2.32 and waf ebuilds

2010-12-07 Thread Arfrever Frehtes Taifersar Arahesis
Why does waf-utils_pkg_setup() call 'python_set_active_version 2'?
What do you plan to do when there are packages using waf and supporting Python 
3?

http://code.google.com/p/waf/ says:
"compatibility from Python 2.3 to 3.1 is maintained (and Jython 2.5)"

-- 
Arfrever Frehtes Taifersar Arahesis


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] eclass review for Gnome 2.32 and waf ebuilds

2010-12-03 Thread Gilles Dartiguelongue
Le vendredi 03 décembre 2010 à 21:54 +0100, Cyprien Nicolas a écrit :
> On Fri, Dec 3, 2010 at 21:25, Gilles Dartiguelongue  wrote:
> > 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.
> 
> I took a look at the src_compile function from the proposed
> waf-utils.eclass, and the sed expression you use is not correct, if
> your objective is to filter everything but the -j/--jobs part of the
> MAKEOPTS variable.
> My current setting is MAKEOPTS="--jobs=3 --load-average=3.5", and it
> is left unchanged by the current sed expression.
> 
> I had a issue with waf, with that MAKEOPTS thing [1]
> Maybe you could take the expression referred in comment #3 [1], as
> Samuli did, or maybe someone else have a better proposition.
> 
> 1  https://bugs.gentoo.org/show_bug.cgi?id=335119
> 

The sed expression in the proposed eclass is indeed too weak, I'll look
after the one in this bug.
-- 
Gilles Dartiguelongue 
Gentoo


signature.asc
Description: This is a digitally signed message part


Re: [gentoo-dev] eclass review for Gnome 2.32 and waf ebuilds

2010-12-03 Thread Cyprien Nicolas
On Fri, Dec 3, 2010 at 21:25, Gilles Dartiguelongue  wrote:
> 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.

I took a look at the src_compile function from the proposed
waf-utils.eclass, and the sed expression you use is not correct, if
your objective is to filter everything but the -j/--jobs part of the
MAKEOPTS variable.
My current setting is MAKEOPTS="--jobs=3 --load-average=3.5", and it
is left unchanged by the current sed expression.

I had a issue with waf, with that MAKEOPTS thing [1]
Maybe you could take the expression referred in comment #3 [1], as
Samuli did, or maybe someone else have a better proposition.

1  https://bugs.gentoo.org/show_bug.cgi?id=335119

-- 
Cyprien Nicolas
Gentoo Lisp Project contributor
Fulax on #gentoo-lisp



[gentoo-dev] eclass review for Gnome 2.32 and waf ebuilds

2010-12-03 Thread Gilles Dartiguelongue
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" ]]