blob: 4e34492c65199c702cb50a86c0e14594092dae3a (
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
|
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils cmake-utils games
MY_P="CorsixTH-${PV}-Source"
DESCRIPTION="Open source clone of Theme Hospital"
HOMEPAGE="https://code.google.com/p/corsix-th/"
SRC_URI="http://corsix-th.googlecode.com/files/${MY_P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+ffmpeg truetype opengl +sdl +sound +midi"
REQUIRED_USE="|| ( sdl opengl )"
RDEPEND=">=dev-lang/lua-5.1
media-libs/libsdl[X]
ffmpeg? ( virtual/ffmpeg )
truetype? ( media-libs/freetype:2 )
opengl? ( virtual/opengl )
sound? ( media-libs/sdl-mixer )
midi? ( media-libs/sdl-mixer[timidity] )"
DEPEND="${RDEPEND}
virtual/pkgconfig"
S="${WORKDIR}/${MY_P}"
src_prepare() {
epatch "${FILESDIR}/${PN}-nodoc.patch"
# Use a coherent naming for installation dir
epatch "${FILESDIR}/${P}-naming.patch"
}
src_configure() {
local mycmakeargs="$(cmake-utils_use_with opengl OPENGL) \
$(cmake-utils_use_with sdl SDL) \
$(cmake-utils_use_with sound AUDIO) \
$(cmake-utils_use_with truetype FREETYPE2) \
$(cmake-utils_use_with ffmpeg MOVIES) \
-DCMAKE_INSTALL_PREFIX=${GAMES_DATADIR}"
cmake-utils_src_configure
}
src_compile() {
cmake-utils_src_compile
}
src_install() {
cmake-utils_src_install
DOCS="CorsixTH/README.txt CorsixTH/changelog.txt" cmake-utils_src_install
games_make_wrapper ${PN} "${GAMES_DATADIR}/${PN}/CorsixTH" || die
make_desktop_entry ${PN} ${PN} \
"${GAMES_DATADIR}/${PN}/CorsixTH.ico"
prepgamesdirs
}
|