blob: 03cdb983cddcfecafc1a3323c23597439a8887ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-action/d1x-rebirth/d1x-rebirth-0.56.ebuild,v 1.1 2010/10/14 04:17:02 mr_bones_ Exp $
EAPI=2
inherit eutils scons-utils games
DESCRIPTION="Descent Rebirth - enhanced Descent 1 engine"
HOMEPAGE="http://www.dxx-rebirth.de/"
SRC_URI="mirror://sourceforge/dxx-rebirth/${PN}_v${PV}-src.tar.gz
applecd? ( http://www.dxx-rebirth.com/download/dxx/res/d1xr-mac-sounds.zip )
hires? ( http://www.dxx-rebirth.com/download/dxx/res/d1xr-hires.zip )
music? ( http://www.dxx-rebirth.com/download/dxx/res/d1xr-sc55-music.zip )
linguas_de? (
http://www.dxx-rebirth.com/download/dxx/res/d1xr-briefings-ger.zip )"
LICENSE="D1X GPL-2 as-is"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="applecd cdinstall +hires +music ipv6 linguas_de opengl"
RDEPEND="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 )
!cdinstall? ( games-action/descent1-demodata )"
S=${WORKDIR}/${PN}_v${PV}-src
src_prepare() {
sed -i -e "/lflags = /s/$/ + env['LINKFLAGS']/" SConstruct || die
# Patch from upstream. Will be included in 0.57
# http://dxx-rebirth.com/frm/showthread.php?tid=782
epatch "${FILESDIR}/d1x-rebirth-demodata.patch"
}
src_compile() {
escons \
verbosebuild=1 \
sharepath="${GAMES_DATADIR}/d1x" \
sdlmixer=1 \
$(use_scons debug) \
$(use_scons !opengl sdl_only) \
$(use_scons ipv6) \
|| die
}
src_install() {
edos2unix INSTALL.txt README.txt
dodoc INSTALL.txt README.txt || die
insinto "${GAMES_DATADIR}/d1x"
# these zip files don't need to be extracted
if use applecd ; then
doins "${DISTDIR}"/d1xr-mac-sounds.zip || die
fi
if use linguas_de ; then
doins "${DISTDIR}"/d1xr-briefings-ger.zip || die
fi
if use hires ; then
doins "${DISTDIR}"/d1xr-hires.zip || die
fi
if use music ; then
doins "${DISTDIR}"/d1xr-sc55-music.zip || die
fi
doicon "${S}/${PN}.xpm" || die
if use opengl ; then
newgamesbin d1x-rebirth-gl d1x-rebirth || die
else
newgamesbin d1x-rebirth-sdl d1x-rebirth || die
fi
make_desktop_entry d1x-rebirth "Descent 1 Rebirth" || die
prepgamesdirs || die
}
pkg_postinst() {
games_pkg_postinst
if ! use cdinstall ; then
elog
elog "To play the full game, you need to copy data files from an "
elog "original Descent installation to: ${GAMES_DATADIR}/d1x. "
elog "Mount the CD and merge: games-action/descent1-data or read "
elog "/usr/share/doc/${PF}/INSTALL.txt for more info."
elog
fi
if use music ; then
einfo "Please note, the music is disabled by default."
einfo "You can switch it on using the in-game menus"
fi
}
|