# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games eutils flag-o-matic DESCRIPTION="Advanced source port for Doom/Heretic/Hexen/Strife" HOMEPAGE="http://www.vavoom-engine.com" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" 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 } src_unpack() { unpack ${A} || die "unpack failed" } src_compile() { if use debug ; then append-flags "-g" fi 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 WAD files in ${GAMES_DATADIR}/${PN} with correct 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" }