# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games DESCRIPTION="a 3D game that probably involves a lot of physics and frustrating gameplay" HOMEPAGE="http://code.google.com/p/irrlamb/" SRC_URI="http://irrlamb.googlecode.com/files/${P}-src.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="debug" RDEPEND=">=dev-games/irrlicht-1.3.1 >=sci-physics/bullet-2.54 >=media-libs/audiere-1.9.4 media-libs/libpng media-libs/jpeg >=dev-lang/lua-5.1 x11-libs/libXext x11-libs/libXxf86vm virtual/glu dev-libs/boost" DEPEND="${RDEPEND} x11-proto/xextproto dev-util/scons" S=${WORKDIR}/${PN} pkg_setup() { if built_with_use dev-games/irrlicht debug && ! use debug ; then eerror "dev-games/irrlicht is built with debug support." eerror "You'll need to enable USE=\"debug\" for ${PN} or" eerror "reinstall dev-games/irrlicht with USE=\"-debug\"" die "irrlicht/irrlamb debug use doesn't match" fi if ! built_with_use dev-games/irrlicht debug && use debug ; then eerror "dev-games/irrlicht is built without debug support." eerror "You'll need to reinstall it with USE=\"debug\" if" eerror "you want to build ${PN} with debug support." die "irrlicht/irrlamb debug use doesn't match" fi } src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}/${P}-scons.patch" } src_compile() { scons USE_INTERNAL_LIBS=no DEBUG=$(use debug && echo "yes" || echo "no") \ || die "scons failed" } src_install() { dodir ${GAMES_DATADIR}/${PN} || die insinto ${GAMES_DATADIR}/${PN} doins -r art campaigns fonts levels meshes scenes scripts terrain textures || die exeinto ${GAMES_DATADIR}/${PN} doexe ${PN} || die dodoc {changelog,readme}.txt || die games_make_wrapper ${PN} ./${PN} ${GAMES_DATADIR}/${PN} prepgamesdirs make_desktop_entry ${PN} ${PN} ${PN} }