summaryrefslogtreecommitdiff
blob: 2741ca183d3d01f4b7f1230d16fe1ae20de103c0 (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-strategy/megaglest-data/megaglest-data-3.7.0.ebuild,v 1.1 2012/11/14 17:10:49 hasufell Exp $

EAPI=4
inherit cmake-utils games

MY_PN="megaglest"
DESCRIPTION="Data files for the cross-platform 3D realtime strategy game MegaGlest"
HOMEPAGE="http://www.megaglest.org/"
SRC_URI="mirror://sourceforge/${MY_PN}/${P}.tar.xz
	mirror://sourceforge/${MY_PN}/${MY_PN}-source-embedded-${PV}.tar.xz"

LICENSE="CCPL-Attribution-ShareAlike-3.0 BitstreamVera GPL-2+ GPL-2-with-font-exception"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc"

RDEPEND="~games-strategy/megaglest-${PV}"

DOCS=( docs/AUTHORS.data.txt docs/CHANGELOG.txt docs/README.txt )

S=${WORKDIR}/${MY_PN}-${PV}

src_prepare() {
	sed -i \
		-e 's/# MEGAGLEST_FONT/MEGAGLEST_FONT/' \
		data/lang/*.lng || die "setting default font in .lng failed!"
}

src_configure() {
	local mycmakeargs=(
		-DMEGAGLEST_BIN_INSTALL_PATH="${GAMES_BINDIR}"
		-DMEGAGLEST_DATA_INSTALL_PATH="${GAMES_DATADIR}/${MY_PN}"
		-DMEGAGLEST_ICON_INSTALL_PATH="/usr/share/pixmaps"
	)
	cmake-utils_src_configure
}

src_compile() {
	cmake-utils_src_compile
}

src_install() {
	use doc && HTML_DOCS="docs/glest_factions/"

	cmake-utils_src_install

	insinto "${GAMES_DATADIR}/${MY_PN}"/data/core/fonts
	doins "${WORKDIR}"/${MY_PN}-${PV}/data/core/fonts/*.ttf

	prepgamesdirs

}