# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/games-simulation/cannonsmash/cannonsmash-0.6.6.ebuild,v 1.12 2006/11/03 03:03:09 nyhm Exp $ inherit eutils games MY_OGG=danslatristesse2-48.ogg DESCRIPTION="3D tabletennis game" HOMEPAGE="http://cannonsmash.sourceforge.net/" SRC_URI="mirror://sourceforge/cannonsmash/csmash-${PV}.tar.gz vorbis? ( http://nan.p.utmc.or.jp/${MY_OGG} )" LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 ppc x86" IUSE="vorbis nls" RDEPEND="x11-libs/libXmu virtual/opengl virtual/glu >=media-libs/libsdl-1.2.4 >=media-libs/sdl-mixer-1.2.3 >=media-libs/sdl-image-1.2.2 =x11-libs/gtk+-2* nls? ( virtual/libintl )" DEPEND="${RDEPEND} nls? ( sys-devel/gettext )" S=${WORKDIR}/csmash-${PV} src_unpack() { unpack csmash-${PV}.tar.gz cd "${S}" epatch \ "${FILESDIR}"/${P}-x-inc.patch \ "${FILESDIR}"/${P}-sizeof-cast.patch \ "${FILESDIR}"/${P}-gcc41.patch if use vorbis ; then cp "${DISTDIR}"/${MY_OGG} "${S}"/ || die "cp failed" sed -i \ -e "s:${MY_OGG}:${GAMES_DATADIR}/csmash/${MY_OGG}:" ttinc.h \ || die "setting ogg loc" fi } src_compile() { egamesconf \ $(use_enable nls) \ --datadir="${GAMES_DATADIR_BASE}" \ || die emake \ localedir="/usr/share" \ || die "emake failed" } src_install() { emake DESTDIR="${D}" install || die "emake install failed" if use vorbis ; then insinto "${GAMES_DATADIR}"/csmash doins ${MY_OGG} || die "doins failed" fi dodoc AUTHORS CREDITS README* prepgamesdirs }