# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games DV=1 DESCRIPTION="Descent Rebirth - enhanced Descent ${DV} engine" HOMEPAGE="http://www.dxx-rebirth.de/" SRC_URI="mirror://sourceforge/dxx-rebirth/${PN}_v${PV}-src.tar.gz http://www.dxx-rebirth.com/download/dxx/res/dxx-rebirth_icons.zip linguas_de? ( http://www.dxx-rebirth.com/download/dxx/res/D${DV}XBDE01.zip )" # bug #117344 LICENSE="D1X GPL-2 as-is" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="debug cdinstall ipv6 linguas_de opengl" DEPEND="app-arch/unzip dev-games/physfs dev-util/scons media-libs/libsdl media-libs/sdl-mixer" RDEPEND="virtual/opengl virtual/glu" S=${WORKDIR}/${PN}_v${PV}-src scons_use_enable() { use ${2} && echo "${1}=1" || echo "${1}=0" } src_compile() { scons ${MAKEOPTS} \ sharepath="${GAMES_DATADIR}/d${DV}x" \ sdlmixer=1 \ $(scons_use_enable debug debug) \ $(scons_use_enable sdl_only !opengl) \ $(scons_use_enable ipv6 ipv6) } src_install() { dodoc INSTALL.txt README.txt insinto "${GAMES_DATADIR}/d${DV}x" if use linguas_de ; then doins "${WORKDIR}"/D${DV}XBDE01/D${DV}XbDE01/*.txb fi doicon "${WORKDIR}/${PN}.xpm" if use opengl ; then newgamesbin d${DV}x-rebirth-gl d${DV}x-rebirth else newgamesbin d${DV}x-rebirth-sdl d${DV}x-rebirth fi make_desktop_entry d${DV}x-rebirth "Descent ${DV} Rebirth" ${PN}.xpm prepgamesdirs } pkg_postinst() { games_pkg_postinst if ! use cdinstall ; then echo elog "You need to copy data-files from original Descent ${DV}" elog "installation to ${GAMES_DATADIR}/d${DV}x. Please read " elog "/usr/share/doc/${PF}/INSTALL.txt for more info." echo fi }