1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 inherit eutils subversion wxwidgets games
11 MY_PV="r${PV%_*}-alpha"
14 DESCRIPTION="A free, real-time strategy game"
15 HOMEPAGE="http://wildfiregames.com/0ad/"
16 ESVN_REPO_URI="http://svn.wildfiregames.com/public/ps/trunk"
21 IUSE="+audio +editor fam +pch test"
24 ~dev-lang/spidermonkey-1.8.5
27 media-gfx/nvidia-texture-tools
28 !games-strategy/0ad-data
30 media-libs/libsdl[X,opengl,video]
36 audio? ( media-libs/libogg
39 editor? ( x11-libs/wxGTK:$WX_GTK_VER[X,opengl] )
44 test? ( dev-lang/perl )"
52 eerror "pch useflag is potentially broken"
53 eerror "see http://trac.wildfiregames.com/ticket/1313"
62 cd build/workspaces || die
64 # custom configure script
66 use fam || myconf="--without-fam"
67 use pch || myconf="${myconf} --without-pch"
68 use test || myconf="${myconf} --without-tests"
69 use audio || myconf="${myconf} --without-audio"
71 # don't use bundled sources
72 ./update-workspaces.sh \
75 --with-system-mozjs185 \
76 $(use_enable editor atlas) \
77 --bindir="${GAMES_BINDIR}" \
78 --libdir="$(games_get_libdir)"/${PN} \
79 --datadir="${GAMES_DATADIR}"/${PN} \
84 emake -C build/workspaces/gcc verbose=1 || die
88 cd binaries/system || die
89 ./test || die "test phase failed"
94 insinto "${GAMES_DATADIR}"/${PN}
95 doins -r binaries/data/* || die
98 dogamesbin binaries/system/pyrogenesis || die
101 exeinto "$(games_get_libdir)"/${PN}
102 doexe binaries/system/libCollada.so || die
104 doexe binaries/system/libAtlasUI.so || die
108 dodoc binaries/system/readme.txt || die
109 doicon build/resources/${PN}.png || die
110 games_make_wrapper ${PN} "${GAMES_BINDIR}/pyrogenesis"
111 make_desktop_entry ${PN} ${PN} ${PN}