# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games DESCRIPTION="NEXUIZ FPS" HOMEPAGE="http://www.nexuiz.com" SRC_URI="http://ovh.dl.sourceforge.net/sourceforge/nexuiz/nexuiz11.zip" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="sdl dedicated" RDEPEND="sdl? ( media-libs/libsdl )" DEPEND="virtual/opengl app-arch/unzip media-libs/jpeg media-libs/libogg media-libs/libsdl media-libs/libvorbis sys-libs/zlib ${RDEPEND}" S="${WORKDIR}/Nexuiz" src_unpack() { unpack ${A} } src_compile() { cd "${S}/sources/darkplaces" make cl-release \ CFLAGS_RELEASE="" OPTIM_RELEASE="" \ CFLAGS_COMMON="${CFLAGS} -ffast-math" \ && cp nexuiz-glx ../.. if use sdl then make sdl-release \ CFLAGS_RELEASE="" OPTIM_RELEASE="" \ CFLAGS_COMMON="${CFLAGS} -ffast-math" \ && cp nexuiz-sdl ../.. fi if use dedicated then make sv-release \ CFLAGS_RELEASE="" OPTIM_RELEASE="" \ CFLAGS_COMMON="${CFLAGS} -ffast-math" \ && cp nexuiz-dedicated ../.. fi } src_install() { cd "${S}" dodir /opt/nexuiz exeinto /opt/nexuiz exeopts -m0755 -o ${GAMES_USER} -g ${GAMES_GROUP} doexe nexuiz-glx use sdl && doexe nexuiz-sdl use dedicated && doexe nexuiz-dedicated dodir /opt/nexuiz/data insinto /opt/nexuiz/data insopts -m0644 -o ${GAMES_USER} -g ${GAMES_GROUP} doins data/* games_make_wrapper nexuiz-glx ./nexuiz-glx /opt/nexuiz use sdl && games_make_wrapper nexuiz-sdl ./nexuiz-sdl /opt/nexuiz use dedicated && games_make_wrapper nexuiz-ded ./nexuiz-dedicated /opt/nexuiz }