1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 inherit eutils wxwidgets games
11 MY_PV="r${PV%_*}-alpha"
14 DESCRIPTION="A free, real-time strategy game"
15 HOMEPAGE="http://wildfiregames.com/0ad/"
16 SRC_URI="mirror://sourceforge/zero-ad/${MY_P}-unix-build.tar.xz"
18 LICENSE="GPL-2 LGPL-2.1 MIT CCPL-Attribution-ShareAlike-3.0 as-is"
21 IUSE="+audio +editor fam pch test"
24 ~dev-lang/spidermonkey-1.8.5
27 dev-util/nvidia-texture-tools
28 ~games-strategy/0ad-data-${PV}
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 )"
49 # respect flags for 3rd party fcollada
50 epatch "${FILESDIR}"/11339_alpha9-fcollada-makefile.patch
54 cd build/workspaces || die
56 # custom configure script
58 use fam || myconf="--without-fam"
59 use pch || myconf="${myconf} --without-pch"
60 use test || myconf="${myconf} --without-tests"
61 use audio || myconf="${myconf} --without-audio"
63 # don't use bundled sources
64 ./update-workspaces.sh \
67 --with-system-mozjs185 \
68 $(use_enable editor atlas) \
69 --bindir="${GAMES_BINDIR}" \
70 --libdir="$(games_get_libdir)"/${PN} \
71 --datadir="${GAMES_DATADIR}"/${PN} \
76 emake -C build/workspaces/gcc verbose=1 || die
80 cd binaries/system || die
81 ./test || die "test phase failed"
86 dogamesbin binaries/system/pyrogenesis || die
89 exeinto "$(games_get_libdir)"/${PN}
90 doexe binaries/system/libCollada.so || die
92 doexe binaries/system/libAtlasUI.so || die
96 dodoc binaries/system/readme.txt || die
97 doicon build/resources/${PN}.png || die
98 games_make_wrapper ${PN} "${GAMES_BINDIR}/pyrogenesis"
99 make_desktop_entry ${PN} ${PN} ${PN}