# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games eutils flag-o-matic multilib 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="sdl opengl openal external-glbsp vorbis mad mikmod flac" DEPEND="media-libs/libpng sys-libs/zlib media-sound/timidity++ sdl? ( media-libs/libsdl media-libs/sdl-mixer ) amd64? ( sdl? ( app-emulation/emul-linux-x86-sdl ) ) opengl? ( virtual/opengl ) openal? ( media-libs/openal ) vorbis? ( media-libs/libvorbis ) mad? ( media-libs/libmad ) mikmod? ( media-libs/libmikmod ) flac? ( media-libs/flac ) external-glbsp? ( games-util/glbsp )" pkg_setup() { if use amd64 ; then if ! has_m32 ; then eerror "Your compiler seems to be unable to compile 32bit code." eerror "Make sure you compile gcc with:" echo eerror " USE=multilib FEATURES=-sandbox" die "Cannot produce 32bit code" fi if has_multilib_profile ; then export ABI=x86 else append-flags -m32 append-ldflags -m32 fi fi games_pkg_setup } dir="${GAMES_DATADIR}/${PN}" src_unpack() { unpack ${A} || die "unpack failed" cd "${S}" epatch "${FILESDIR}/vavoom-glvis-linux.diff" } src_compile() { egamesconf \ $(use_with sdl) \ $(use_with opengl) \ $(use_with openal) \ $(use_with external-glbsp) \ $(use_with vorbis) \ $(use_with mad libmad) \ $(use_with mikmod) \ $(use_with flac) || die "configure failed" emake -j1 || die "emake failed" } src_install() { #dogamesbin Vavoom || die "installing the binary failed" #dosym Vavoom ${GAMES_BINDIR}/vavoom exeinto "${dir}" doexe Vavoom || die "doexe failed" games_make_wrapper vavoom ./Vavoom "${dir}" "${dir}" insinto "${GAMES_DATADIR}/${PN}/basev" doins -r basev/* || die "doins failed" dodoc docs/*.txt prepgamesdirs } pkg_postinst() { games_pkg_postinst einfo "Copy WAD files in ${GAMES_DATADIR}/${PN} with correct permissions:" einfo "(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" }