/[gentoo-x86]/games-fps/qudos/qudos-9999.ebuild
Gentoo

Contents of /games-fps/qudos/qudos-9999.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Sat May 30 12:23:19 2009 UTC (9 years ago) by nyhm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED
remove unmaintainable svn ebuild
(Portage version: 2.2_rc33/cvs/Linux i686)

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/games-fps/qudos/qudos-9999.ebuild,v 1.9 2008/02/29 19:14:34 carlo Exp $
4
5 inherit eutils subversion toolchain-funcs games
6
7 MY_PN="quake2"
8
9 DESCRIPTION="Enhanced Quake 2 engine"
10 HOMEPAGE="http://qudos.quakedev.com/"
11
12 # View at http://svn.quakedev.com/viewcvs.cgi/qudos/trunk/
13 ESVN_REPO_URI="svn://svn.quakedev.com/${PN}/trunk"
14
15 SRC_URI=""
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS=""
20 IUSE="alsa cdinstall debug dedicated demo dga ipv6 joystick mods opengl qmax oss sdl textures"
21
22 UIDEPEND="alsa? ( media-libs/alsa-lib )
23 opengl? (
24 virtual/opengl
25 virtual/glu )
26 sdl? ( media-libs/libsdl )
27 media-libs/jpeg
28 media-libs/libogg
29 media-libs/libpng
30 media-libs/libvorbis
31 x11-libs/libX11
32 x11-libs/libXext
33 x11-libs/libXxf86dga
34 x11-libs/libXxf86vm"
35 RDEPEND="${UIDEPEND}
36 cdinstall? ( games-fps/quake2-data )
37 demo? ( games-fps/quake2-demodata )
38 textures? ( games-fps/quake2-textures )"
39 DEPEND="${UIDEPEND}"
40
41 S=${WORKDIR}
42 dir=${GAMES_DATADIR}/${MY_PN}
43
44 default_client() {
45 if use opengl || use sdl || ! use dedicated ; then
46 # Build default client
47 return 0
48 fi
49 return 1
50 }
51
52 pkg_setup() {
53 games_pkg_setup
54
55 local alert_user
56
57 if ! use qmax && $( use opengl || use sdl ) ; then
58 elog "The 'qmax' graphical improvements are recommended."
59 echo
60 alert_user=y
61 fi
62
63 if use debug ; then
64 ewarn "The 'debug' USE flag may cause compilation to fail with:"
65 ewarn
66 ewarn "src/qcommon/cmd.c:364: warning: dereferencing type-punned"
67 ewarn "pointer will break strict-aliasing rules."
68 echo
69 alert_user=y
70 fi
71
72 # Determine the default sound driver, in order of preference
73 # snd_drv is not a local variable
74 snd_drv=""
75 [[ -z "${snd_drv}" ]] && use oss && snd_drv="oss"
76 [[ -z "${snd_drv}" ]] && use sdl && snd_drv="sdl"
77 [[ -z "${snd_drv}" ]] && use alsa && snd_drv="alsa"
78 # Default if nothing else chosen
79 [[ -z "${snd_drv}" ]] && snd_drv="oss"
80
81 if default_client ; then
82 elog "Selected the ${snd_drv} sound driver."
83 echo
84 if [[ "${snd_drv}" = "alsa" ]] ; then
85 ewarn "The ALSA sound driver for this game is incomplete."
86 # OSS is the default sound driver in the Makefile
87 ewarn "The 'oss' USE flag is recommended instead."
88 echo
89 alert_user=y
90 fi
91 fi
92
93 if [[ -n "${alert_user}" ]] ; then
94 ebeep
95 epause
96 fi
97 }
98
99 src_unpack() {
100 subversion_src_unpack
101
102 rm docs/gnu.txt
103
104 # Change default sound driver and its location
105 sed -i src/client/snd_dma.c \
106 -e "s:\"oss\":\"${snd_drv}\":" \
107 -e "s:\"\./snd:\"$(games_get_libdir)/${PN}/snd:" \
108 || die "sed snd_dma.c failed"
109 }
110
111 src_compile() {
112 yesno() { use $1 && echo YES || echo NO ; }
113
114 local client="YES"
115 default_client || client="NO"
116
117 local type="release"
118 use debug && type="debug"
119
120 emake -j1 \
121 BUILD_QUAKE2="${client}" \
122 BUILD_DEDICATED=$(yesno dedicated) \
123 BUILD_GLX=$(yesno opengl) \
124 BUILD_SDLGL=$(yesno sdl) \
125 BUILD_ALSA_SND=$(yesno alsa) \
126 BUILD_SDL_SND=$(yesno sdl) \
127 BUILD_OSS_SND=$(yesno oss) \
128 WITH_XMMS=NO \
129 WITH_DGA_MOUSE=$(yesno dga) \
130 WITH_JOYSTICK=$(yesno joystick) \
131 TYPE="${type}" \
132 DATADIR="${dir}" \
133 LOCALBASE=/usr \
134 LIBDIR="$(games_get_libdir)"/${PN} \
135 WITH_QMAX=$(yesno qmax) \
136 BUILD_3ZB2=$(yesno mods) \
137 BUILD_CTF=$(yesno mods) \
138 BUILD_JABOT=$(yesno mods) \
139 BUILD_ROGUE=$(yesno mods) \
140 BUILD_XATRIX=$(yesno mods) \
141 BUILD_ZAERO=$(yesno mods) \
142 WITH_BOTS=$(yesno mods) \
143 HAVE_IPV6=$(yesno ipv6) \
144 CC="$(tc-getCC)" \
145 WITH_X86_ASM=NO \
146 WITH_DATADIR=YES \
147 WITH_LIBDIR=YES \
148 BUILD_DEBUG_DIR=release \
149 BUILD_RELEASE_DIR=release \
150 || die "emake failed"
151 }
152
153 src_install() {
154 if default_client ; then
155 newgamesbin ${MY_PN}/QuDos ${PN} \
156 || die "newgamesbin QuDos failed"
157 # This icon is not available in the 0.40.1 tarball
158 newicon src/unix/Q2.png ${PN}.png
159 make_desktop_entry ${PN} "QuDos" ${PN}
160 fi
161
162 if use dedicated ; then
163 newgamesbin ${MY_PN}/QuDos-ded ${PN}-ded \
164 || die "newgamesbin QuDos-ded failed"
165 fi
166
167 insinto "$(games_get_libdir)"/${PN}
168 doins -r ${MY_PN}/* || die "doins libs failed"
169 rm "${D}/$(games_get_libdir)"/${PN}/QuDos
170
171 insinto "$(games_get_libdir)"/${PN}/baseq2
172 doins data/qudos.pk3 || die "doins qudos.pk3 failed"
173
174 dodoc $(find docs -name \*.txt) docs/q2_orig/README*
175
176 prepgamesdirs
177 }
178
179 pkg_postinst() {
180 games_pkg_postinst
181
182 if use demo && ! built_with_use "games-fps/quake2-demodata" symlink ; then
183 ewarn "To play the Quake 2 demo,"
184 ewarn "emerge games-fps/quake2-demodata with the 'symlink' USE flag."
185 echo
186 fi
187 }

  ViewVC Help
Powered by ViewVC 1.1.20