1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils cdrom scons-utils games
10 DESCRIPTION="Descent Rebirth - enhanced Descent ${DV} engine"
11 HOMEPAGE="https://www.dxx-rebirth.com/"
12 SRC_URI="https://www.dxx-rebirth.com/download/dxx/${MY_P}.tar.gz
13 https://www.dxx-rebirth.com/download/dxx/res/d1xrdata.zip
14 https://www.dxx-rebirth.com/download/dxx/res/dxx-rebirth_icons.zip
15 opl3-musicpack? ( https://www.dxx-rebirth.com/download/dxx/res/d${DV}xr-opl3-music.zip )
16 sc55-musicpack? ( https://www.dxx-rebirth.com/download/dxx/res/d${DV}xr-sc55-music.zip )
17 cdinstall? ( https://www.dxx-rebirth.com/download/dxx/res/d1datapt.zip )
18 l10n_de? ( https://www.dxx-rebirth.com/download/dxx/res/d${DV}xr-briefings-ger.zip )"
20 LICENSE="D1X GPL-2 public-domain"
22 KEYWORDS="~amd64 ~x86"
23 IUSE="cdinstall debug demo ipv6 l10n_de +music opengl opl3-musicpack sc55-musicpack"
24 REQUIRED_USE="?? ( cdinstall demo )
25 ?? ( opl3-musicpack sc55-musicpack )
26 opl3-musicpack? ( music )
27 sc55-musicpack? ( music )"
29 RDEPEND="dev-games/physfs[hog,zip]
30 media-libs/libsdl[X,sound,joystick,opengl?,video]
31 cdinstall? ( !games-action/descent1-demodata )
33 media-libs/sdl-mixer[timidity]
41 PDEPEND="demo? ( games-action/descent1-demodata )"
46 unpack ${MY_P}.tar.gz dxx-rebirth_icons.zip
47 if use cdinstall ; then
49 cdrom_get_cds descent/descent.hog
52 ${CDROM_ROOT}/descent/descent.{hog,pig} \
53 ${CDROM_ROOT}/descent/chaos.{hog,msn} \
59 if use cdinstall ; then
61 patch -p0 < "${WORKDIR}"/d1datapt/descent.hog.diff descent.hog
62 patch -p0 < "${WORKDIR}"/d1datapt/descent.pig.diff descent.pig
64 epatch "${FILESDIR}"/${P}-flags.patch
70 sharepath="${GAMES_DATADIR}/d${DV}x" \
72 $(use_scons music sdlmixer) \
74 $(use_scons opengl) || die
78 dodoc {CHANGELOG,INSTALL,README,RELEASE-NOTES}.txt
80 insinto "${GAMES_DATADIR}/d${DV}x"
81 doins "${DISTDIR}"/d1xrdata.zip
82 # None of the following zip files need to be extracted.
83 use l10n_de && doins "${DISTDIR}"/d${DV}xr-briefings-ger.zip
84 use opl3-musicpack && doins "${DISTDIR}"/d${DV}xr-opl3-music.zip
85 use sc55-musicpack && doins "${DISTDIR}"/d${DV}xr-sc55-music.zip
87 if use cdinstall ; then
88 doins Data/descent.{hog,pig}
89 insinto "${GAMES_DATADIR}"/d${DV}x/missions
90 doins Data/chaos.{hog,msn}
92 doicon "${WORKDIR}/${PN}.xpm"
94 dogamesbin d${DV}x-rebirth
95 make_desktop_entry d${DV}x-rebirth "Descent ${DV} Rebirth"
101 if ! use cdinstall ; then
103 elog "To play the full game enable USE=\"cdinstall\" or manually "
104 elog "copy the files to ${GAMES_DATADIR}/d${DV}x."
105 elog "See /usr/share/doc/${PF}/INSTALL.txt for details."