Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 348758 | Differences between
and this patch

Collapse All | Expand All

(-)attal-0.10.1.ebuild (-30 / +52 lines)
Lines 1-20 Link Here
1
# Copyright 1999-2011 Gentoo Foundation
1
# Copyright 1999-2012 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/games-strategy/attal/attal-0.10.1.ebuild,v 1.9 2011/10/05 22:11:09 mr_bones_ Exp $
3
# $Header: /var/cvsroot/gentoo-x86/games-strategy/attal/attal-0.10.1.ebuild,v 1.9 2011/10/05 22:11:09 mr_bones_ Exp $
4
EAPI="2"
4
5
5
EAPI=2
6
inherit eutils games qt4-r2
6
inherit eutils qt4-r2 games
7
7
8
MY_P="${PN}-src-${PV}"
8
MY_PV="${PV/_rc/-rc}"
9
MY_P="${PN}-src-${MY_PV}"
9
DESCRIPTION="turn-based strategy game project"
10
DESCRIPTION="turn-based strategy game project"
10
HOMEPAGE="http://www.attal-thegame.org/"
11
HOMEPAGE="http://sourceforge.net/projects/attal/"
11
SRC_URI="mirror://sourceforge/attal/${MY_P}.tar.bz2
12
SRC_URI="mirror://sourceforge/attal/${MY_P}.tar.bz2
12
	mirror://sourceforge/attal/themes-${PV}.tar.bz2"
13
	mirror://sourceforge/attal/themes-${MY_PV}.tar.bz2"
13
14
14
LICENSE="GPL-2"
15
LICENSE="GPL-2"
15
SLOT="0"
16
SLOT="0"
16
KEYWORDS="~amd64 ppc x86"
17
KEYWORDS="~amd64 ~ppc ~x86"
17
IUSE=""
18
IUSE="nls"
18
19
19
DEPEND="x11-libs/qt-gui:4
20
DEPEND="x11-libs/qt-gui:4
20
	x11-libs/qt-sql:4
21
	x11-libs/qt-sql:4
Lines 22-62 Link Here
22
	media-libs/libsdl
23
	media-libs/libsdl
23
	media-libs/sdl-mixer[vorbis]"
24
	media-libs/sdl-mixer[vorbis]"
24
25
26
RDEPEND="${DEPEND}"
27
25
S=${WORKDIR}/${MY_P}
28
S=${WORKDIR}/${MY_P}
26
29
30
src_unpack() {
31
	unpack ${MY_P}.tar.bz2
32
	cd "${S}"
33
	unpack themes-${MY_PV}.tar.bz2
34
}
35
27
src_prepare() {
36
src_prepare() {
28
	mv ../themes .
37
	local i
29
	ecvs_clean
38
	ecvs_clean
30
	epatch \
39
	sed -i s/"\(target.path = \).*"/"\1\$\${ATT_TRANSL_PREFIX}"/1 i18n/i18n.pro
31
		"${FILESDIR}"/${P}-gcc41.patch \
40
	for i in ai/ai.pro \
32
		"${FILESDIR}"/${P}-gentoo.patch
41
		campaignEditor/campaignEditor.pro \
33
	sed -i \
42
		client/client.pro \
34
		-e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}:" \
43
		scenarioEditor/scenarioEditor.pro \
35
		libCommon/displayHelp.cpp \
44
		server/server.pro \
36
		libCommon/attalCommon.cpp \
45
		themeEditor/themeEditor.pro; do
37
		server/duel.cpp \
46
		sed -i s/"\(QMAKE_LFLAGS += \)-Wl,-rpath,."/"\1"/1 "${i}"
38
		|| die "sed failed"
47
	done
39
}
48
}
40
49
41
src_configure() {
50
src_configure() {
51
	local MY_ROOT=${ROOT%/}
52
	cat - config.pro >config.pro.new <<EOF
53
	ATT_PREFIX="${GAMES_PREFIX}"
54
	ATT_LIB_PREFIX="$(games_get_libdir)"
55
	ATT_DOCS_PREFIX="${GAMES_DATADIR_BASE}/doc/${P}/html"
56
	ATT_THEMES_PREFIX="${GAMES_DATADIR}/${P}/themes"
57
	ATT_TRANSL_PREFIX="${GAMES_DATADIR}/${P}/translations"
58
EOF
59
60
	mv config.pro.new config.pro
42
	eqmake4 Makefile.pro
61
	eqmake4 Makefile.pro
43
}
62
}
44
63
45
src_compile() {
64
src_compile() {
46
	local d
65
	emake sub-libCommon sub-themes || die "emake failed (first step)"
47
66
	emake sub-libClient sub-libServer|| die "emake failed (second step)"
48
	for d in Common Client Fight Server
67
	emake sub-libAi sub-libFight sub-themeEditor sub-campaignEditor \
49
	do
68
		sub-scenarioEditor || die "emake failed (third step)"
50
		emake sub-lib$d || die "emake failed"
69
	emake sub-server sub-ai sub-client || die "emake failed (fourth step)"
51
	done
70
	if (use nls); then
52
	emake || die "emake failed"
71
		cd i18n
72
		echo "TRANSLATIONS +=" */*.ts > translations.pro
73
		lrelease translations.pro
74
		cd ..
75
		emake sub-i18n || die "emake nls failed"
76
	fi
53
}
77
}
54
78
55
src_install() {
79
src_install() {
56
	dogamesbin attal-* || die "dogamesbin failed"
80
	emake INSTALL_ROOT="${D}" install || die "emake install failed"
57
	dogameslib.so lib*.so* || die "dogameslib.so failed"
81
	dohtml HOWTOPLAY.html
58
	insinto "${GAMES_DATADIR}"/${PN}
82
	dodoc AUTHORS NEWS README TODO docs/*
59
	doins -r themes HOWTOPLAY.html || die "doins failed"
60
	dodoc AUTHORS NEWS README TODO
61
	prepgamesdirs
83
	prepgamesdirs
62
}
84
}

Return to bug 348758