# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ ESVN_REPO_URI="https://svn.sourceforge.net/svnroot/vavoom/trunk/vavoom" inherit subversion games eutils flag-o-matic DESCRIPTION="Vavoom is a source port based on sources of Doom, Heretic, Hexen" HOMEPAGE="http://www.vavoom-engine.com" LICENSE="GPL-2" SLOT="0" KEYWORDS="-*" IUSE="debug dedicated external-glbsp flac mad mikmod models music openal opengl vorbis" MY_BIN=${PN}.`uname -m` QA_EXECSTACK="${GAMES_BINDIR:1}/${MY_BIN}" DEPEND="media-libs/libpng sys-libs/zlib media-sound/timidity++ media-libs/libsdl media-libs/sdl-mixer openal? ( media-libs/openal ) external-glbsp? ( games-util/glbsp ) vorbis? ( media-libs/libvorbis ) mad? ( media-libs/libmad ) mikmod? ( media-libs/libmikmod ) flac? ( media-libs/flac )" RDEPEND="${DEPEND} models? ( games-fps/vavoom-models ) music? ( games-fps/vavoom-music )" pkg_setup() { if use opengl ; then if ! built_with_use media-libs/libsdl opengl ; then eerror "'opengl' USE flag enabled, but libsdl without opengl detected." eerror "Recompile media-libs/libsdl with opengl USE flag enabled" die "libsdl without opengl detected" fi fi games_pkg_setup } dir="${GAMES_DATADIR}/${PN}" src_unpack() { subversion_src_unpack || die "svn_unpack failed" } src_compile() { if use debug ; then append-flags -g fi ./autogen.sh egamesconf \ --with-sdl \ --with-iwaddir=${GAMES_DATADIR}/${PN} \ $(use_with opengl) \ $(use_with openal) \ $(use_with external-glbsp) \ $(use_with vorbis) \ $(use_with mad libmad) \ $(use_with mikmod) \ $(use_with flac) \ $(use_enable debug) \ $(use_enable debug zone-debug) \ $(use_enable dedicated server) || die "configure failed" # Parallel compiling seems to be broken emake -j1 || die "emake failed" } src_install() { make DESTDIR=${D} install || die "make install failed" # I don't need PNG icon rm ${D}/${GAMES_DATADIR}/${PN}/${PN}.png #doicon source/${PN}.png || die "doicon failed" #make_desktop_entry ${PN} "Vavoom Engine" dodoc docs/${PN}.txt || die "dodoc failed" prepgamesdirs } pkg_postinst() { games_pkg_postinst elog "Copy IWAD files in ${GAMES_DATADIR}/${PN}, adjusting permissions:" elog "(writable by root and readable by 'games' group)" elog elog "Example command line:" elog " vavoom -doom -opengl -window" elog elog "See documentation for further details" }