2012-05-16 15:12:38 +04:00
|
|
|
# Copyright 1999-2012 Gentoo Foundation
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Header: $
|
|
|
|
|
|
|
|
EAPI=3
|
|
|
|
|
|
|
|
WX_GTK_VER="2.8"
|
|
|
|
|
|
|
|
inherit eutils subversion wxwidgets games
|
|
|
|
|
|
|
|
MY_PV="r${PV%_*}-alpha"
|
|
|
|
MY_P=${PN}-${MY_PV}
|
|
|
|
|
|
|
|
DESCRIPTION="A free, real-time strategy game"
|
|
|
|
HOMEPAGE="http://wildfiregames.com/0ad/"
|
|
|
|
ESVN_REPO_URI="http://svn.wildfiregames.com/public/ps/trunk"
|
|
|
|
|
|
|
|
LICENSE="GPL-2 LGPL-2.1 MIT CCPL-Attribution-ShareAlike-3.0 as-is"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS=""
|
|
|
|
IUSE="+audio +editor fam +pch test"
|
|
|
|
|
|
|
|
RDEPEND="
|
2012-05-18 13:32:03 +04:00
|
|
|
~dev-lang/spidermonkey-1.8.5
|
2012-05-16 15:12:38 +04:00
|
|
|
dev-libs/boost
|
|
|
|
dev-libs/libxml2
|
|
|
|
!games-strategy/0ad-data
|
2012-05-18 13:32:03 +04:00
|
|
|
media-gfx/nvidia-texture-tools
|
2012-05-16 15:12:38 +04:00
|
|
|
media-libs/libpng:0
|
2012-05-18 13:32:03 +04:00
|
|
|
media-libs/libsdl[X,opengl,video]
|
2012-05-16 15:12:38 +04:00
|
|
|
net-libs/enet:1.3
|
|
|
|
net-misc/curl
|
|
|
|
sys-libs/zlib
|
|
|
|
virtual/jpeg
|
|
|
|
virtual/opengl
|
2012-05-18 13:32:03 +04:00
|
|
|
x11-libs/libX11
|
2012-05-16 15:12:38 +04:00
|
|
|
audio? ( media-libs/libogg
|
|
|
|
media-libs/libvorbis
|
|
|
|
media-libs/openal )
|
2012-05-18 13:32:03 +04:00
|
|
|
editor? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
|
2012-05-16 15:12:38 +04:00
|
|
|
fam? ( virtual/fam )
|
|
|
|
"
|
|
|
|
DEPEND="${RDEPEND}
|
2012-05-18 13:32:03 +04:00
|
|
|
virtual/pkgconfig
|
2012-05-16 15:12:38 +04:00
|
|
|
test? ( dev-lang/perl )"
|
|
|
|
|
|
|
|
S=${WORKDIR}/trunk
|
|
|
|
|
|
|
|
pkg_setup() {
|
|
|
|
games_pkg_setup
|
|
|
|
|
|
|
|
if ! use pch ; then
|
|
|
|
eerror "pch useflag is potentially broken"
|
|
|
|
eerror "see http://trac.wildfiregames.com/ticket/1313"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
src_unpack() {
|
|
|
|
subversion_src_unpack
|
|
|
|
}
|
|
|
|
|
|
|
|
src_configure() {
|
|
|
|
cd build/workspaces || die
|
|
|
|
|
|
|
|
./update-workspaces.sh \
|
|
|
|
--with-system-nvtt \
|
|
|
|
--with-system-enet \
|
|
|
|
--with-system-mozjs185 \
|
2012-05-18 13:32:03 +04:00
|
|
|
$(usex fam "" "--without-fam") \
|
|
|
|
$(usex pch "" "--without-pch") \
|
|
|
|
$(usex test "" "--without-tests") \
|
|
|
|
$(usex audio "" "--without-audio") \
|
2012-05-16 15:12:38 +04:00
|
|
|
$(use_enable editor atlas) \
|
|
|
|
--bindir="${GAMES_BINDIR}" \
|
|
|
|
--libdir="$(games_get_libdir)"/${PN} \
|
2012-05-18 13:32:03 +04:00
|
|
|
--datadir="${GAMES_DATADIR}"/${PN}
|
2012-05-16 15:12:38 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
2012-05-18 13:32:03 +04:00
|
|
|
emake -C build/workspaces/gcc verbose=1 || die
|
2012-05-16 15:12:38 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
src_test() {
|
|
|
|
cd binaries/system || die
|
2012-05-18 13:32:03 +04:00
|
|
|
./test || die "test phase failed"
|
2012-05-16 15:12:38 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
# data
|
|
|
|
insinto "${GAMES_DATADIR}"/${PN}
|
|
|
|
doins -r binaries/data/* || die
|
|
|
|
|
|
|
|
# bin
|
|
|
|
dogamesbin binaries/system/pyrogenesis || die
|
|
|
|
|
|
|
|
# libs
|
|
|
|
exeinto "$(games_get_libdir)"/${PN}
|
|
|
|
doexe binaries/system/libCollada.so || die
|
|
|
|
if use editor ; then
|
|
|
|
doexe binaries/system/libAtlasUI.so || die
|
|
|
|
fi
|
|
|
|
|
|
|
|
# other
|
2012-05-18 13:32:03 +04:00
|
|
|
dodoc binaries/system/readme.txt
|
|
|
|
doicon build/resources/${PN}.png
|
2012-05-16 15:12:38 +04:00
|
|
|
games_make_wrapper ${PN} "${GAMES_BINDIR}/pyrogenesis"
|
2012-05-18 13:32:03 +04:00
|
|
|
make_desktop_entry ${PN}
|
2012-05-16 15:12:38 +04:00
|
|
|
|
|
|
|
# permissions
|
|
|
|
prepgamesdirs
|
|
|
|
}
|