1 # Copyright 1999-2013 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"
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-${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
51 epatch "${FILESDIR}"/11339_alpha9-fcollada-makefile.patch \
52 "${FILESDIR}"/11339_alpha9-test.patch
56 cd build/workspaces || die
58 # custom configure script
60 use fam || myconf="--without-fam"
61 use pch || myconf="${myconf} --without-pch"
62 use test || myconf="${myconf} --without-tests"
63 use audio || myconf="${myconf} --without-audio"
65 # don't use bundled sources
66 ./update-workspaces.sh \
69 --with-system-mozjs185 \
70 $(use_enable editor atlas) \
71 --bindir="${GAMES_BINDIR}" \
72 --libdir="$(games_get_libdir)"/${PN} \
73 --datadir="${GAMES_DATADIR}"/${PN} \
78 emake -C build/workspaces/gcc verbose=1 || die
82 cd binaries/system || die
83 ./test || die "test phase failed"
88 dogamesbin binaries/system/pyrogenesis || die
91 exeinto "$(games_get_libdir)"/${PN}
92 doexe binaries/system/libCollada.so || die
94 doexe binaries/system/libAtlasUI.so || die
98 dodoc binaries/system/readme.txt || die
99 doicon build/resources/${PN}.png || die
100 games_make_wrapper ${PN} "${GAMES_BINDIR}/pyrogenesis"
101 make_desktop_entry ${PN} ${PN} ${PN}