Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 137522
Collapse All | Expand All

(-)/usr/portage/games-fps/quake2-icculus/quake2-icculus-0.16.1.ebuild (-17 / +46 lines)
Lines 5-34 Link Here
5
inherit eutils toolchain-funcs games
5
inherit eutils toolchain-funcs games
6
6
7
MY_P="quake2-r${PV}"
7
MY_P="quake2-r${PV}"
8
DESCRIPTION="The icculus.org linux port of iD's quake2 engine"
8
DESCRIPTION="The icculus.org Linux port of iD's Quake 2 engine"
9
HOMEPAGE="http://icculus.org/quake2/"
9
HOMEPAGE="http://icculus.org/quake2/"
10
SRC_URI="http://icculus.org/quake2/files/${MY_P}.tar.gz
10
SRC_URI="http://icculus.org/quake2/files/${MY_P}.tar.gz
11
	!noqmax? ( http://icculus.org/quake2/files/maxpak.pak )
11
	qmax? ( http://icculus.org/quake2/files/maxpak.pak )
12
	rogue? ( mirror://idsoftware/quake2/source/roguesrc320.shar.Z )
12
	rogue? ( mirror://idsoftware/quake2/source/roguesrc320.shar.Z )
13
	xatrix? ( mirror://idsoftware/quake2/source/xatrixsrc320.shar.Z )"
13
	xatrix? ( mirror://idsoftware/quake2/source/xatrixsrc320.shar.Z )"
14
14
15
LICENSE="GPL-2"
15
LICENSE="GPL-2"
16
SLOT="0"
16
SLOT="0"
17
KEYWORDS="alpha amd64 ppc sparc x86 ~x86-fbsd"
17
KEYWORDS="alpha amd64 ppc sparc x86 ~x86-fbsd"
18
IUSE="aalib alsa arts dedicated ipv6 joystick noqmax opengl rogue sdl svga X xatrix"
18
IUSE="aalib alsa arts cdinstall dedicated demo ipv6 joystick opengl qmax rogue sdl svga X xatrix"
19
19
20
RDEPEND="opengl? ( virtual/opengl )
20
UIDEPEND="aalib? ( media-libs/aalib )
21
	svga? ( media-libs/svgalib )
22
	sdl? ( media-libs/libsdl )
23
	aalib? ( media-libs/aalib )
24
	X? ( || (
25
		( x11-libs/libX11 x11-libs/libXext x11-libs/libXxf86dga x11-libs/libXxf86vm )
26
		virtual/x11
27
	) )
28
	alsa? ( media-libs/alsa-lib )
21
	alsa? ( media-libs/alsa-lib )
29
	arts? ( kde-base/arts )
22
	arts? ( kde-base/arts )
30
	media-libs/jpeg"
23
	opengl? ( virtual/opengl )
31
DEPEND="${RDEPEND}
24
	svga? ( media-libs/svgalib )
25
	sdl? ( media-libs/libsdl )"
26
RDEPEND="${UIDEPEND}
27
	cdinstall? ( games-fps/quake2-data )
28
	demo? ( games-fps/quake2-demodata )"
29
DEPEND="${UIDEPEND}
32
	X? ( || (
30
	X? ( || (
33
		( x11-proto/xproto x11-proto/xextproto x11-proto/xf86dgaproto x11-proto/xf86vidmodeproto )
31
		( x11-proto/xproto x11-proto/xextproto x11-proto/xf86dgaproto x11-proto/xf86vidmodeproto )
34
		virtual/x11
32
		virtual/x11
Lines 38-43 Link Here
38
36
39
S=${WORKDIR}/${MY_P}
37
S=${WORKDIR}/${MY_P}
40
38
39
pkg_setup() {
40
	games_pkg_setup
41
42
	local alert_user
43
44
	if ! use qmax && $( use opengl || use sdl ) ; then
45
		einfo "The 'qmax' graphical improvements are recommended."
46
		echo
47
		alert_user=y
48
	fi
49
50
	if ! use sdl ; then
51
		ewarn "The ALSA sound driver for this game is broken."
52
		ewarn "The 'sdl' USE flag is recommended instead."
53
		echo
54
		alert_user=y
55
	fi
56
57
	if [[ -n "${alert_user}" ]] ; then
58
		ebeep
59
		epause
60
	fi
61
}
62
41
src_unpack() {
63
src_unpack() {
42
	unpack ${MY_P}.tar.gz
64
	unpack ${MY_P}.tar.gz
43
	cd "${S}"
65
	cd "${S}"
Lines 85-91 Link Here
85
	# rogue fails to build
107
	# rogue fails to build
86
	local libsuffix
108
	local libsuffix
87
	for BUILD_QMAX in YES NO ; do
109
	for BUILD_QMAX in YES NO ; do
88
		use noqmax && [[ ${BUILD_QMAX} == "YES" ]] && continue
110
		use qmax && [[ ${BUILD_QMAX} == "NO" ]] && continue
89
		[[ ${BUILD_QMAX} == "YES" ]] \
111
		[[ ${BUILD_QMAX} == "YES" ]] \
90
			&& libsuffix=-qmax \
112
			&& libsuffix=-qmax \
91
			|| libsuffix=
113
			|| libsuffix=
Lines 140-149 Link Here
140
		&& rm "${D}/${q2dir}"/sdlquake2
162
		&& rm "${D}/${q2dir}"/sdlquake2
141
163
142
	doicon "${FILESDIR}"/quake2.xpm
164
	doicon "${FILESDIR}"/quake2.xpm
143
	make_desktop_entry quake2 Quake2 quake2.xpm
165
	make_desktop_entry quake2 "Quake 2" quake2.xpm
144
166
145
	# q2max files
167
	# q2max files
146
	if ! use noqmax ; then
168
	if use qmax ; then
147
		dodir "${q2maxdir}"
169
		dodir "${q2maxdir}"
148
		cp -rf my-rel-YES/* "${D}/${q2maxdir}"/
170
		cp -rf my-rel-YES/* "${D}/${q2maxdir}"/
149
		newgamesbin "${D}/${q2maxdir}"/quake2 quake2-qmax
171
		newgamesbin "${D}/${q2maxdir}"/quake2 quake2-qmax
Lines 164-170 Link Here
164
186
165
pkg_postinst() {
187
pkg_postinst() {
166
	games_pkg_postinst
188
	games_pkg_postinst
189
167
	einfo "Go read /usr/share/doc/${PF}/README-postinstall.gz right now!"
190
	einfo "Go read /usr/share/doc/${PF}/README-postinstall.gz right now!"
168
	einfo "It's important- This install is just the engine, you still need"
191
	einfo "It's important - This install is just the engine, you still need"
169
	einfo "the data paks. Go read."
192
	einfo "the data paks. Go read."
193
194
	if use demo && ! built_with_use "games-fps/quake2-demodata" symlink ; then
195
		ewarn "To play the Quake 2 demo,"
196
		ewarn "emerge games-fps/quake2-demodata with the 'symlink' USE flag."
197
		echo
198
	fi
170
}
199
}

Return to bug 137522