# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games DESCRIPTION="A 3D OpenGL based chess game" HOMEPAGE="http://pouetchess.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${PN}_src_${PV}.tar.gz" S=${WORKDIR}/${PN}_src_${PV} LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64" IUSE="" RDEPEND="virtual/opengl >=media-libs/libsdl-1.2.8 media-lib/sdl-image" DEPEND="${RDEPEND} dev-util/scons" pkg_setup() { einfo "If you experience problems building pouetchess with nvidia drivers," einfo "you can try:" einfo "eselect opengl set xorg-x11" einfo "emerge pouetchess" einfo "eselect opengl set nvidia" } src_unpack() { unpack ${A} cd ${S} # Fix for LibSDL >= 1.2.10 detection sed -i -e "s:sdlver.split('.') >= \['1','2','8'\]:sdlver.split('.') >= [1,2,8]:" pouetChess.py || die "sed failed" } src_compile() { scons configure prefix=${GAMES_PREFIX} datadir=${GAMES_DATADIR}/${PN} scons } src_install() { # scons install does not honor DESTDIR newgamesbin bin/${PN/c/C} ${PN} || die "newgamesbin failed" insinto "${GAMES_DATADIR}/${PN}" doins -r data || die "doins failed" prepgamesdirs }