summaryrefslogtreecommitdiff
blob: 4f37aac67cb31f2ba1cf5920f9d8330a6800bc9b (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit autotools eutils games

DESCRIPTION="Blobby Volley 2 - 1-on-1 volleyball"
HOMEPAGE="http://blobby.redio.de"
SRC_URI="mirror://sourceforge/blobby/${PN}-linux-${PV}.tar.gz"

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

RDEPEND="dev-games/physfs
	virtual/opengl
	media-libs/libsdl"
DEPEND="${RDEPEND}"

dir=${GAMES_DATADIR}/${PN}

src_unpack() {
	unpack ${A}

	# Standardize the directory name
	mv blobby* ${P} || die
	cd "${S}"

	# Look in shared directory for server.xml
	sed -i \
		-e "s:PHYSFS_addToSearchPath(\"data\":PHYSFS_addToSearchPath(\"${dir}\":" \
		src/DedicatedServer.cpp || die "sed DedicatedServer.cpp failed"
}

src_compile() {
	eautoreconf || die

	# Fix broken opengl recognition.
	# There's probably a better way of doing this.
	sed -i \
		-e "s:HAVE_LIBGL = @HAVE_LIBGL@:HAVE_LIBGL = 1:" \
		Makefile.in || die "sed Makefile.in failed"

	sed -i \
		-e "s:-lSDL:-lSDL -lGL:" \
		configure || die "sed configure failed"

	egamesconf \
		HAVE_LIBGL=1 \
		|| die "egamesconf failed"

	emake \
		GAMEDATADIR="${dir}" \
		CFLAGS="${CFLAGS}" \
		CXXFLAGS="${CXXFLAGS}" \
		|| die "emake failed"
}

src_install() {
	dogamesbin src/blobby{,-server} || die
	make_desktop_entry blobby "Blobby Volley"

	insinto "${dir}"
	doins -r data/* || die
	rm -f "${D}/${dir}"/Makefile*

	dodoc AUTHORS ChangeLog NEWS README TODO
}