summaryrefslogtreecommitdiff
blob: 99e273fba91e8f469c6012380f2e8a8b205f1d02 (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-fps/anaglyph-stereo-quake/anaglyph-stereo-quake-130100-r1.ebuild,v 1.12 2006/03/22 18:03:01 mr_bones_ Exp $

inherit eutils games

DESCRIPTION="play Quake in 3D with red - blue glasses"
HOMEPAGE="http://home.iprimus.com.au/crbean/"
SRC_URI="http://home.iprimus.com.au/crbean/zip/3dGLQuake_SRC_${PV}.zip
	mirror://gentoo/${P}-SDL.patch.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE=""

RDEPEND="virtual/opengl
	|| ( (
			x11-libs/libXxf86dga
			x11-libs/libXext
			x11-libs/libX11
			x11-libs/libXxf86vm )
		virtual/x11 )
	media-libs/libsdl"
DEPEND="${RDEPEND}
	|| ( (
			x11-proto/xf86dgaproto
			x11-proto/xextproto
			x11-proto/xf86vidmodeproto
			x11-proto/xproto )
		virtual/x11 )
	app-arch/unzip"

S=${WORKDIR}/WinQuake

src_unpack() {
	unpack ${A}

	cd "${S}"
	mv GLQUAKE.H glquake.h
	mv GL_DRAW.C gl_draw.c
	mv GL_RMAIN.C gl_rmain.c
	epatch "${FILESDIR}"/stupid-dosformat.patch
	mv Makefile{.linuxi386,}
	epatch "${FILESDIR}"/makefile-path-fixes.patch
	epatch "${FILESDIR}"/fix-sys_printf.patch
	epatch "${FILESDIR}"/makefile-cflags.patch
	epatch "${FILESDIR}"/gentoo-paths.patch
	edos2unix console.c "${WORKDIR}"/${P}-SDL.patch
	epatch "${WORKDIR}"/${P}-SDL.patch
	epatch "${FILESDIR}"/${P}-amd64.patch
}

src_compile() {
	make \
		OPTFLAGS="${CFLAGS}" \
		GENTOO_DATADIR=${GAMES_DATADIR}/quake1 \
		build_release \
		|| die "failed to build WinQuake"
}

src_install() {
	newgamesbin release*/bin/glquake.sdl anaglyph-stereo-quake || die
	dodoc "${WORKDIR}"/readme.id.txt
	dohtml "${WORKDIR}"/3dquake.html
	prepgamesdirs
}