# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/games-action/transcend/transcend-0.3.ebuild,v 1.7 2011/04/26 07:11:54 mr_bones_ Exp $ EAPI=3 inherit games DESCRIPTION="retro-style, abstract, 2D shooter" HOMEPAGE="http://transcend.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/Transcend_${PV}_UnixSource.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc x86" IUSE="" DEPEND="x11-libs/libXmu x11-libs/libXi virtual/opengl virtual/glu media-libs/freeglut" S=${WORKDIR}/Transcend_${PV}_UnixSource/Transcend src_prepare() { chmod u+x portaudio/configure mkdir portaudio/lib # apply patch from debian bug #433381 by Peter De Wachter # in order to get sound working again. Works on amd64 patch -dportaudio -p1 < "${FILESDIR}"/40_wordsize.dpatch || die "patching failed" rm -f game/Makefile sed -i "s:-O9:${CFLAGS} -O9:" Makefile.common cat \ Makefile.GnuLinuxX86 \ Makefile.common \ Makefile.minorGems \ game/Makefile.all \ Makefile.minorGems_targets \ > game/Makefile sed -i \ -e "s:\"levels\":\"${GAMES_DATADIR}/${PN}/levels\":" \ game/LevelDirectoryManager.cpp \ game/game.cpp \ || die "sed failed" } src_configure() { cd portaudio egamesconf || die } src_compile() { cd portaudio make lib/libportaudio.a || die "making of portaudio failed" cd ../game emake || die cd .. cp game/Transcend ${PN} || die "cp failed" } src_install() { dogamesbin ${PN} || die "dogamesbin failed" insinto "${GAMES_DATADIR}/${PN}" doins -r levels/ || die "doins failed" dodoc doc/how_to_*.txt make_desktop_entry ${PN} "Transcend" prepgamesdirs }