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

Return to bug 348758