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

EAPI=3

inherit eutils cmake-utils flag-o-matic games

DESCRIPTION="An open source reimplementation of TES III: Morrowind"
HOMEPAGE="http://openmw.org/"
SRC_URI="http://${PN}.googlecode.com/files/${P}-source.tar.bz2"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="mp3 ffmpeg"

RDEPEND=">=dev-games/ogre-1.7.0[cg,ois]
	dev-games/ois
	>=dev-libs/boost-1.46.0
	media-gfx/nvidia-cg-toolkit
	media-libs/freetype:2
	media-libs/openal
	sci-physics/bullet
	>=x11-libs/qt-gui-4.7.0:4
	mp3? (
		ffmpeg? ( media-video/ffmpeg[mp3] )
		!ffmpeg? ( media-libs/libsndfile
			media-sound/mpg123 )
	)"
DEPEND="${RDEPEND}
	dev-util/pkgconfig"

S=${WORKDIR}/${P}-source

src_prepare() {
	epatch "${FILESDIR}"/${P}-cmake.patch

	sed \
		-e "s#globalPath(\"/etc/\")#globalPath(\"${GAMES_SYSCONFDIR}\")#" \
		-i components/files/linuxpath.cpp || die
}

src_configure() {
	# QA
	append-flags -fno-strict-aliasing

	local mycmakeargs
	if use mp3 ; then
		use ffmpeg && mycmakeargs="-DUSE_FFMPEG=ON" || \
			mycmakeargs="-DUSE_MPG123=ON"
	fi

	mycmakeargs+=(
		-DBINDIR="${GAMES_BINDIR}"
		-DDATADIR="${GAMES_DATADIR}"/${PN}
		-DSYSCONFDIR="${GAMES_SYSCONFDIR}"/${PN}
		-DUSE_AUDIERE=OFF
	)

	cmake-utils_src_configure
}

src_install() {
	cmake-utils_src_install
	dodoc readme.txt || die
	prepgamesdirs
}