# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-arcade/ultrastar-deluxe/ultrastar-deluxe-1.1.0.ebuild,v 1.1 2008/07/04 08:41:32 frostwork Exp $
EAPI="5"
inherit eutils games flag-o-matic subversion
DESCRIPTION="A free and open source karaoke game"
HOMEPAGE="http://ultrastardx.sourceforge.net/"
SRC_URI="mirror://sourceforge/ultrastardx/UltraStar%20Deluxe/Version%201.1%20final/Sources/${P}-src.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="libprojectM"
RDEPEND="dev-lang/fpc
media-libs/sdl-image
media-libs/libsdl
media-libs/sdl-mixer
media-libs/sdl-ttf
libprojectM? ( media-libs/libprojectm )
>=media-libs/portaudio-19_pre20071207
media-video/ffmpeg
virtual/opengl
virtual/glu"
src_compile() {
egamesconf \
$(use_with libprojectM) \
|| die "Configure failed!"
emake \
LDFLAGS="" \
|| die "emake failed"
}
src_install() {
dogamesbin game/ultrastardx
local datadir="${GAMES_DATADIR}"/${PN}
insinto "${GAMES_DATADIR}"/${PN}
doins -r plugins artwork game/fonts game/languages game/resources game/sounds game/themes game/visuals || die
keepdir "${GAMES_DATADIR}"/${PN}/covers
keepdir "${GAMES_DATADIR}"/${PN}/songs
doicon game/artwork/usdx_icon_512.png
make_desktop_entry ${PN} ${PN}
dodoc README*
prepgamesdirs
}