summaryrefslogtreecommitdiff
blob: 8da9a15a96a1f42cea5fd23c44aee4b34d29e116 (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
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-puzzle/kiki/kiki-0.9.0.ebuild,v 1.1 2003/09/10 06:36:00 vapier Exp $

inherit games

DATA="${GAMES_DATADIR}/${PN}"
S="${WORKDIR}"
DESCRIPTION="Fun 3D puzzle game using SDL/OpenGL"
HOMEPAGE="http://kiki.sourceforge.net/"
SRC_URI="mirror://sourceforge/kiki/${PN}-src-${PV}.tgz"

LICENSE="public-domain"
KEYWORDS="x86"
SLOT="0"
IUSE=""

RDEPEND=">=media-libs/libsdl-1.2
		>=media-libs/sdl-image-1.2.2
		>=media-libs/sdl-mixer-1.2.5
		>=dev-lang/python-2.2
		virtual/glut"
DEPEND="${RDEPEND}
	>=sys-devel/gcc-3
	>=sys-apps/sed-4"

src_unpack() {
	unpack ${A}

	cd ${S}
	# There are CVS directories in the tgz file
	rm -rf `find -name CVS -type d`
	rm -rf `find -name .cvsignore`

	# Change the hard-coded data dir for sounds, etc...
	sed -i \
		-e "s:kiki_home += \"/\";:kiki_home = \"${DATA}/\";:g" \
		-e "s:KConsole\:\:printf(\"WARNING \:\: environment variable KIKI_HOME not set ...\");::g" \
		-e "s:KConsole\:\:printf(\"           ... assuming resources in current directory\");::g" \
			kiki_src/kiki/src/main/KikiController.cpp || \
				die "sed KikiController.cpp failed"
}


src_compile() {
	cd ${S}/kiki_src/kodilib/linux
	emake || die "emake in kodilib/linux failed"
	cd ${S}/kiki_src/kiki/linux
	emake || die "emake in kiki/linux failed"
}

src_install() {
	dogamesbin ${S}/kiki_src/kiki/linux/kiki

	dodir ${DATA}/misc ${DATA}/py ${DATA}/sounds
	cp -R ${S}/kiki_src/kiki/{misc,py,sounds} ${D}${DATA}

	cd ${S}/kiki_src/kiki
	dodoc Readme.txt Thanks.txt "uDevGame Readme.txt"
	prepgamesdirs
}