# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games # DV is the Descent version. Used because the d1x-rebirth ebuild is similar. DV="2" DATE="20080629" DVX=d${DV}x FILE_START="${PN}_v${PV}-src-${DATE}" SRC_STEM="http://www.dxx-rebirth.de/download/dxx" DESCRIPTION="Descent Rebirth - enhanced Descent 2 engine" HOMEPAGE="http://www.dxx-rebirth.de/" SRC_URI="mirror://sourceforge/dxx-rebirth/${FILE_START}.tar.gz ${SRC_STEM}/res/dxx-rebirth_icons.zip" # Licence info at bug #117344. All 3 licences apply. LICENSE="D1X GPL-2 as-is" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="debug" QA_EXECSTACK="${GAMES_BINDIR:1}/${PN}" UIRDEPEND="media-libs/alsa-lib media-libs/libpng >=media-libs/libsdl-1.2.9 >=media-libs/sdl-image-1.2.3-r1 >=dev-games/physfs-1.0.1 media-libs/sdl-mixer virtual/glu virtual/opengl x11-libs/libX11 x11-libs/libXext" UIDEPEND="x11-proto/xf86dgaproto x11-proto/xf86vidmodeproto x11-proto/xproto" # Works with the demo data RDEPEND="${UIRDEPEND} demo? ( games-action/descent2-demodata ) !demo? ( games-action/descent2-data )" # scons-0.96.1 violates sandbox: open_wr: /usr/include/SDL/.sconsign DEPEND="${UIRDEPEND} ${UIDEPEND} >=dev-util/scons-0.97 app-arch/unzip" S=${WORKDIR}/${PN} dir=${GAMES_DATADIR}/${DVX} pkg_setup() { games_pkg_setup # Crazy-but-true fix einfo "To fix sandbox violations: emerge -C scons ; emerge scons" einfo "See http://bugs.gentoo.org/show_bug.cgi?id=107013" } src_compile() { local opts="sdlmixer=1" use debug && opts="${opts} debug=1" # From "scons -h" scons \ ${opts} \ sharepath="${dir}" \ || die "scons" } src_install() { local icon="${PN}.xpm" # Reasonable set of default options. Don't bother with ${DVX}.ini file. local params="-gl_trilinear -gl_anisotropy 8.0 -gl_transparency -gl_reticle 2 -fullscreen -menu_gameres -persistentdebris -sdlmixer" local exe=${PN}-gl newgamesbin ${exe} ${PN} || die "newgamesbin ${exe}" games_make_wrapper ${PN}-common "${PN} ${params}" doicon "${WORKDIR}/${icon}" || die "doicon" make_desktop_entry ${PN}-common "Descent ${DV} Rebirth" "${icon}" dodoc *.txt "${WORKDIR}"/*.txt prepgamesdirs } pkg_postinst() { games_pkg_postinst elog "To play the game with common options, run: ${PN}-common" }