# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games eutils flag-o-matic DESCRIPTION="Vavoom is a source port based on sources of Doom, Heretic, Hexen and a little bit from Quake." HOMEPAGE="http://www.vavoom-engine.com/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="debug opengl openal external-glbsp vorbis mad mikmod flac dedicated models" DEPEND="media-libs/libpng sys-libs/zlib media-sound/timidity++ media-libs/libsdl media-libs/sdl-mixer opengl? ( virtual/opengl ) 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 ) models? ( games-fps/vavoom-models )" pkg_setup() { if use opengl ; then if ! built_with_use media-libs/libsdl opengl ; then eerror "'opengl' USE flag enabled, but libsdl without opengl support 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() { unpack ${A} || die "unpack failed" cd "${S}" epatch "${FILESDIR}/linux_amd64-vcc-fix.diff" } 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 dedicated server) || die "configure failed" # Parallel compiling seems to be broekn emake -j1 || die "emake failed" } src_install() { make DESTDIR=${D} install dodoc docs/*.txt prepgamesdirs } pkg_postinst() { games_pkg_postinst einfo "Copy WAD files in ${GAMES_DATADIR}/${PN} with correct permissions:" einfo "Example: (run as root) chmod 640 doom.wad && chgrp games doom.wad" einfo einfo "Example command line:" einfo " vavoom -doom -opengl -window" einfo einfo "See documentation for further details" }