# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils flag-o-matic games DESCRIPTION="A DX-Ball/MegaBall/Breakout clone" HOMEPAGE="http://sdl-ball.sourceforge.net" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64" IUSE="sound wiimote" DEPEND="media-libs/libsdl media-libs/sdl-image media-libs/sdl-ttf sound? ( media-libs/sdl-mixer ) virtual/opengl virtual/glu wiimote? ( dev-libs/libwiimote )" S=${WORKDIR}/${PN} src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}/Makefile.patch" } src_compile() { export LIBS if use sound; then LIBS+=" -lSDL_mixer" else append-flags "-DNOSOUND" fi if use wiimote; then append-flags "-DWITH_WIIUSE" LIBS+=" -lwiiuse" fi emake DATADIR="${GAMES_DATADIR}/${PN}/themes/" || die "emake failed" } src_install() { dogamesbin ${PN} || die "dogamesbin failed" insinto "${GAMES_DATADIR}/${PN}" doins -r themes/ || die "doins failed" dodoc README || die "dodoc failed" prepgamesdirs }