# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 inherit eutils scons-utils games DV=2 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 opl3? ( http://www.dxx-rebirth.com/download/dxx/res/d${DV}xr-opl3-music.zip ) sc55? ( http://www.dxx-rebirth.com/download/dxx/res/d${DV}xr-sc55-music.zip ) linguas_de? ( http://www.dxx-rebirth.com/download/dxx/res/d${DV}xr-briefings-ger.zip )" LICENSE="D1X GPL-2 as-is" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="cdinstall ipv6 linguas_de opengl opl3 sc55" DEPEND="opengl? ( virtual/opengl virtual/glu ) dev-games/physfs[hog,zip] media-libs/libsdl[audio,opengl?,video] media-libs/sdl-mixer cdinstall? ( games-action/descent1-data )" RDEPEND="${DEPEND}" S=${WORKDIR}/${PN}_v${PV}-src src_unpack() { unpack ${PN}_v${PV}-src.tar.gz } src_compile() { escons \ verbosebuild=1 \ sharepath="${GAMES_DATADIR}/d${DV}x" \ sdlmixer=1 \ $(use_scons ipv6) \ || die } src_install() { dodoc INSTALL.txt README.txt insinto "${GAMES_DATADIR}/d${DV}x" if use linguas_de ; then doins "${DISTDIR}"/d${DV}xr-briefings-ger.zip || die fi if use opl3 ; then doins "${DISTDIR}"/d${DV}xr-opl3-music.zip || die fi if use sc55 ; then doins "${DISTDIR}"/d${DV}xr-sc55-music.zip || die fi doicon "${S}/${PN}.xpm" local exe=d${DV}x-rebirth newgamesbin ${exe} ${exe} || die "newgamesbin ${exe} failed" make_desktop_entry d${DV}x-rebirth "Descent ${DV} Rebirth" 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 }