Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130675 - Gcompris and python-2.4
Summary: Gcompris and python-2.4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-20 17:09 UTC by Graeme Boyd
Modified: 2006-10-18 12:47 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild for gcompris 7.4 (gcompris-7.4.ebuild,1.42 KB, text/plain)
2006-04-20 21:03 UTC, Graeme Boyd
Details
Better ebuild (gcompris-7.4.ebuild,1.61 KB, text/plain)
2006-08-04 17:04 UTC, Graeme Boyd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graeme Boyd 2006-04-20 17:09:34 UTC
All supportted versions of gcompris (6.5.3, 7.2 & 7.4) have python turned off. There was some bugs related to seg faulting if python was enabled and as it does run without python that was the solution. However a very large number of games within gcompris don't work without python (that is they do not even show up as choices to run if python was not found at compile time). 

I created my own ebuild that does work with python enabled for both X86 (linux-2.6.11-gentoo-r6) and AMD64 (linux-2.6.14-gentoo-r2). I tested this for 7.2, 7.3.2 & 7.4. I am new at writing ebuilds so it likely does not follow coding standards - but here it is:

# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: .../games-kids/gcompris/gcompris-7.4.ebuild,v 1.0

inherit eutils games

DESCRIPTION="full featured educational application for children from 2 to 10"
HOMEPAGE="http://gcompris.net"
SRC_URI="http://easynews.dl.sourceforge.net/sourceforge/gcompris/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"

KEYWORDS="amd64 x86"
IUSE="python gnome"

RDEPEND="|| ( x11-libs/libXrandr virtual/x11 )
	>=dev-libs/glib-2.0
	=x11-libs/gtk+-2*
	>=gnome-base/libgnomecanvas-2.0.2
	media-libs/sdl-mixer
	media-libs/libsdl
	dev-libs/libxml2
	dev-libs/popt
	dev-libs/libassetml
	>dev-python/gnome-python-2.0
	>=dev-python/pygtk-2.0
	dev-python/pyxml
	>=dev-python/pysqlite-2.0
	sci-electronics/gnucap
	>=dev-lang/python-2.4
	media-gfx/tuxpaint"
DEPEND="${RDEPEND}
	sys-apps/texinfo
	app-text/texi2html
	|| ( x11-libs/libXt virtual/x11 )"
RDEPEND="${RDEPEND}
	games-board/gnuchess"

src_unpack() {
	unpack ${A}
	cd "${S}"
	sed -i \
		-e '/^install-data-am/s/install-libgcomprisincludeHEADERS//' \
		src/gcompris/Makefile.in \
		|| die "sed failed"
}

src_compile() {
	export GNUCHESS="${GAMES_BINDIR}/gnuchess"


	econf \



		|| die
	emake -j1 || die "emake failed"
}

src_install() {
	make DESTDIR="${D}" install || die "make install failed"
	dodoc AUTHORS ChangeLog NEWS README THANKS TODO
	prepgamesdirs
}
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2006-04-20 18:06:49 UTC
gack... don't put ebuilds in comments.  that's what attachments are for.  please reattach as text/plain.  thanks.
Comment 2 Graeme Boyd 2006-04-20 21:03:50 UTC
Created attachment 85086 [details]
ebuild for gcompris 7.4

Sorry, ebuild attached
Comment 3 Tibor Gemes 2006-04-22 12:06:19 UTC
It doesn't emerge for me, during configure it says:

"
...
checking for python module gtk... yes
checking for python module gnome.canvas... no
configure: error: *** pygtk installed but not visible from python"
Comment 4 Graeme Boyd 2006-04-25 19:36:12 UTC
I did an e-mail reply, but appears that does not work.

Try replacing ">=dev-python/pygtk-2.0" with "dev-python/pygtk" to insure you get the newest version of pygtk.
Comment 5 Mr. Bones. (RETIRED) gentoo-dev 2006-07-24 21:34:26 UTC
I like the idea of enabling the python stuff in gcompris, but your ebuild makes it mandatory.  It needs to use the $(use_enable python) and $(use_enable sqlite) that you removed from the ebuild that's in portage to make it optional for people who don't want to have the additional dependencies.

Care to attach a fixed up ebuild?
Comment 6 Graeme Boyd 2006-08-04 17:04:39 UTC
Created attachment 93457 [details]
Better ebuild

Attached is a version that allows for a "-python" USE (either in the /etc/make.conf or the /etc/portage/package.use files). I could not find any other way to do this....

Also based on a previous post the line "python? ( >=dev-lang/python-2.4 )" may need to be "python? ( dev-lang/python )" instead
Comment 7 Tupone Alfredo gentoo-dev 2006-09-04 15:36:18 UTC
I removed the dependency on gnucap and tuxpaint.
Game is enough skilled to get them runtime, if asked.

Well, new ebuild is in portage. Thanks for your work.
Comment 8 Karl Tomlinson 2006-09-07 19:44:25 UTC
In response to comment #3:

"checking for python module gnome.canvas... no
configure: error: *** pygtk installed but not visible from python"

import gnome.canvas fails silently with gnome-python-2.12.4 and pygtk-2.8.6
if the connection to an X server fails.

Workaround is to emerge with DISPLAY set appropriately,
and with FEATURES=-userpriv.
(Or maybe try pygtk-2.8.2 and/or gnome-python-2.12.1.)
Comment 9 Tibor Gemes 2006-09-23 07:47:14 UTC
(In reply to comment #8)
> In response to comment #3:
> Workaround is to emerge with DISPLAY set appropriately,
> and with FEATURES=-userpriv.

Elaborating your idea I realized that instead of using FEATURES=-userpriv I had to allow remote connections to my xserver with 'xhost +'.