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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Tue Mar 9 12:33:33 2010 UTC (4 years, 4 months ago) by abcd
Branch: MAIN
Changes since 1.3: +4 -5 lines
QA: When not using an absolute path, you MUST NOT use a file extension (.png, .svg, or .xpm) on the icon name for make_desktop_entry
(Portage version: -svn/cvs/Linux i686)

1 # Copyright 1999-2010 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.50.ebuild,v 1.3 2010/01/31 04:53:57 mr_bones_ Exp $
4
5 inherit eutils games
6
7 # DV is the Descent version. Used because the d2x-rebirth ebuild is similar.
8 DV="1"
9 DATE="20061025"
10 DVX=d${DV}x
11 FILE_START="${PN}_v${PV}-src-${DATE}"
12 SRC_STEM="http://www.dxx-rebirth.de/download/dxx"
13
14 DESCRIPTION="Descent Rebirth - enhanced Descent 1 client"
15 HOMEPAGE="http://www.dxx-rebirth.de/"
16 SRC_URI="${SRC_STEM}/oss/src/${FILE_START}.tar.gz
17 ${SRC_STEM}/res/dxx-rebirth_icons.zip
18 ${SRC_STEM}/res/${PN}_hires-briefings.zip
19 ${SRC_STEM}/res/${PN}_hires-fonts.zip"
20
21 # Licence info at bug #117344.
22 # All 3 licences apply.
23 LICENSE="D1X
24 GPL-2
25 as-is"
26 SLOT="0"
27 # Should work on amd64 also
28 KEYWORDS="~amd64 x86"
29 IUSE="awe32 debug demo mpu401 opengl mixer"
30
31 QA_EXECSTACK="${GAMES_BINDIR:1}/${PN}"
32
33 UIRDEPEND="media-libs/alsa-lib
34 >=media-libs/libsdl-1.2.9
35 >=media-libs/sdl-image-1.2.3-r1
36 mixer? ( media-libs/sdl-mixer )
37 >=dev-games/physfs-1.0.1
38 opengl? (
39 virtual/glu
40 virtual/opengl )
41 x11-libs/libX11"
42 UIDEPEND="x11-proto/xf86dgaproto
43 x11-proto/xf86vidmodeproto
44 x11-proto/xproto"
45 # There is no ebuild for descent1-data
46 RDEPEND="${UIRDEPEND}
47 demo? ( games-action/descent1-demodata )"
48 DEPEND="${UIRDEPEND}
49 ${UIDEPEND}
50 dev-util/scons
51 app-arch/unzip"
52
53 S=${WORKDIR}/${PN}
54 dir=${GAMES_DATADIR}/${DVX}
55
56 src_unpack() {
57 unpack ${A}
58 cd "${S}"
59
60 # "sdl_only=1" does not compile otherwise:
61 # arch/sdl/clipboard.o: In function `getClipboardText':
62 # clipboard.c:(.text+0x89): undefined reference to `XGetSelectionOwner'
63 sed -i \
64 -e "s:'SDL':'SDL', 'X11':" \
65 -e "s:-O2:${CXXFLAGS}:" \
66 SConstruct || die "sed SConstruct failed"
67
68 # Midi music - awe32 for most SoundBlaster cards
69 if use awe32 ; then
70 sed -i \
71 -e "s://#define WANT_AWE32 1:#define WANT_AWE32 1:" \
72 arch/linux/hmiplay.c || die "sed awe32 failed"
73 elif use mpu401 ; then
74 sed -i \
75 -e "s://#define WANT_MPU401 1:#define WANT_MPU401 1:" \
76 arch/linux/hmiplay.c || die "sed mpu401 failed"
77 fi
78 }
79
80 src_compile() {
81 local opts
82 use debug && opts="${opts} debug=1"
83 use mixer && opts="${opts} sdlmixer=1"
84 use x86 || opts="${opts} no_asm=1"
85 use opengl || opts="${opts} sdl_only=1"
86 use demo && opts="${opts} shareware=1"
87
88 # From "scons -h"
89 # sharepath must end with a slash.
90 scons \
91 ${opts} \
92 sharepath="${dir}/" \
93 || die "scons failed"
94 }
95
96 src_install() {
97 # Reasonable set of default options.
98 # Don't bother with ${DVX}.ini file.
99 local params="-gl_trilinear -gl_anisotropy 8.0 -gl_16bpp -gl_16bittextures -gl_reticle 2 -fullscreen -menu_gameres -nomovies -nocdrom"
100
101 local exe=${PN}-sdl
102 use opengl && exe=${PN}-gl
103 newgamesbin ${exe} ${PN} || die "newgamesbin ${exe} failed"
104 games_make_wrapper ${PN}-common "${PN} ${params}"
105 doicon "${WORKDIR}/${PN}.xpm"
106 make_desktop_entry ${PN}-common "Descent ${DV} Rebirth" "${PN}"
107
108 insinto "${dir}"
109 doins "${WORKDIR}"/*.{pcx,fnt} || die
110
111 dodoc *.txt
112
113 prepgamesdirs
114 }
115
116 pkg_postinst() {
117 games_pkg_postinst
118
119 if use demo ; then
120 elog "${PN} has been compiled specifically for the demo data."
121 else
122 elog "Place the DOS data files in ${dir}"
123 ewarn "Re-emerge with the 'demo' USE flag if this error is shown:"
124 ewarn " Error: Not enough strings in text file"
125 fi
126 elog "To play the game with common options, run: ${PN}-common"
127 echo
128 }

  ViewVC Help
Powered by ViewVC 1.1.20