/[gentoo-x86]/games-action/d1x-rebirth/d1x-rebirth-0.55.1.ebuild
Gentoo

Contents of /games-action/d1x-rebirth/d1x-rebirth-0.55.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Wed Jan 18 12:42:50 2012 UTC (3 years, 1 month ago) by vapier
Branch: MAIN
Changes since 1.4: +4 -4 lines
Move to new CDROM_OPTIONAL variable.

(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/games-action/d1x-rebirth/d1x-rebirth-0.55.1.ebuild,v 1.4 2012/01/16 18:58:56 ulm Exp $
4
5 EAPI=2
6
7 CDROM_OPTIONAL="yes"
8 inherit eutils cdrom games
9
10 DV=1
11 DESCRIPTION="Descent Rebirth - enhanced Descent ${DV} engine"
12 HOMEPAGE="http://www.dxx-rebirth.de/"
13 SRC_URI="mirror://sourceforge/dxx-rebirth/${PN}_v${PV}-src.tar.gz
14 http://www.dxx-rebirth.com/download/dxx/res/d1xrdata.zip
15 http://www.dxx-rebirth.com/download/dxx/res/dxx-rebirth_icons.zip
16 timidity? ( http://www.dxx-rebirth.com/download/dxx/res/descent${DV/1}_midi.zip )
17 cdinstall? ( http://www.dxx-rebirth.com/download/dxx/res/d1datapt.zip )
18 linguas_de? ( http://www.dxx-rebirth.com/download/dxx/res/D${DV}XBDE01.zip )"
19
20 LICENSE="D1X GPL-2 as-is"
21 SLOT="0"
22 KEYWORDS="~amd64 ~x86"
23 IUSE="ipv6 linguas_de opengl timidity"
24
25 RDEPEND="virtual/opengl
26 virtual/glu
27 dev-games/physfs[hog,zip]
28 media-libs/libsdl
29 media-libs/sdl-mixer[timidity?]
30 cdinstall? ( !games-action/descent1-demodata )"
31 DEPEND="${RDEPEND}
32 app-arch/unzip
33 dev-util/scons"
34
35 S=${WORKDIR}/${PN}_v${PV}-src
36
37 src_unpack() {
38 unpack ${PN}_v${PV}-src.tar.gz dxx-rebirth_icons.zip
39 use linguas_de && unpack D${DV}XBDE01.zip
40 if use cdinstall ; then
41 unpack d1datapt.zip
42 cdrom_get_cds descent/descent.hog
43 mkdir "${S}"/Data
44 cp \
45 ${CDROM_ROOT}/descent/descent.{hog,pig} \
46 ${CDROM_ROOT}/descent/chaos.{hog,msn} \
47 "${S}"/Data \
48 || die "cp failed"
49 fi
50 }
51
52 src_prepare() {
53 if use cdinstall ; then
54 cd Data
55 patch -p0 < "${WORKDIR}"/d1datapt/descent.hog.diff descent.hog
56 patch -p0 < "${WORKDIR}"/d1datapt/descent.pig.diff descent.pig
57 fi
58 }
59
60 src_compile() {
61 local sconsopts=$(echo "${MAKEOPTS}" | sed -ne "/-j/ { s/.*\(-j[[:space:]]*[0-9]\+\).*/\1/; p }")
62
63 scons ${sconsopts} \
64 sharepath="${GAMES_DATADIR}/d${DV}x" \
65 sdlmixer=1 \
66 sdl_only=$(use opengl && echo 0 || echo 1)
67 ipv6=$(use ipv6 && echo 1 || echo 0)
68 }
69
70 src_install() {
71 dodoc INSTALL.txt README.txt
72 insinto "${GAMES_DATADIR}/d${DV}x"
73 doins "${DISTDIR}"/d1xrdata.zip || die
74 if use linguas_de ; then
75 doins "${WORKDIR}"/D${DV}XBDE01/D${DV}XbDE01/*.txb
76 fi
77 if use timidity ; then
78 doins "${DISTDIR}"/descent_midi.zip || die
79 fi
80 if use cdinstall ; then
81 doins Data/descent.{hog,pig} || die
82 insinto "${GAMES_DATADIR}"/d${DV}x/missions
83 doins Data/chaos.{hog,msn} || die
84 fi
85 doicon "${WORKDIR}/${PN}.xpm"
86
87 if use opengl ; then
88 newgamesbin d${DV}x-rebirth-gl d${DV}x-rebirth
89 else
90 newgamesbin d${DV}x-rebirth-sdl d${DV}x-rebirth
91 fi
92 make_desktop_entry d${DV}x-rebirth "Descent ${DV} Rebirth" ${PN}
93 prepgamesdirs
94 }
95
96 pkg_postinst() {
97 games_pkg_postinst
98 if ! use cdinstall ; then
99 echo
100 elog "You need to copy data-files from original Descent ${DV}"
101 elog "installation to ${GAMES_DATADIR}/d${DV}x. Please read "
102 elog "/usr/share/doc/${PF}/INSTALL.txt for more info."
103 echo
104 fi
105 }

  ViewVC Help
Powered by ViewVC 1.1.20