# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # Made by LlulluTuqo # $Header: /var/cvsroot/gentoo-x86/games-strategy/glest/glest-3.2.2.ebuild,v 1.9 2010/08/15 21:03:02 ssuominen Exp $ EAPI=2 inherit eutils wxwidgets games DESCRIPTION="Cross-platform 3D realtime strategy game" HOMEPAGE="http://www.glest.org/" SRC_URI="http://sourceforge.net/projects/${PN}/files/${PN}-source-3.3.7.2.tar.bz2 http://sourceforge.net/projects/${PN}/files/${PN}-data-3.3.7.2.7z" LICENSE="GPL-2 glest-data" SLOT="0" #only tested in 64 bits plataform KEYWORDS="~amd64" RDEPEND="media-libs/libsdl[joystick,video] media-libs/libogg media-libs/libvorbis media-libs/openal || ( >=dev-libs/xerces-c-3[icu] >=dev-libs/xerces-c-3[-icu,-iconv] ) virtual/opengl virtual/glu dev-lang/lua x11-libs/libX11 x11-libs/wxGTK:2.8[X]" DEPEND="${RDEPEND} app-arch/p7zip dev-util/ftjam" S=${WORKDIR}/${PN}-source-${PV}.2 src_prepare() { epatch \ "${FILESDIR}"/${P}-r2-gentoo.patch # "${FILESDIR}"/${P}-xerces-c.patch \ # "${FILESDIR}"/${P}-glibc210.patch \ # "${FILESDIR}"/${P}-glibc212.patch sed -i \ -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}:" \ glest_game/main/main.cpp \ || die "sed failed" sed -i \ -e '/Lang/s:\.lng::' \ glest.ini \ || die "sed failed" sed -i \ -e 's:-O3 -DNDEBUG:-DNDEBUG:' \ Jamrules \ || die "sed failed" find "${WORKDIR}"/glest_game -name Thumbs.db -exec rm -f '{}' + } src_configure() { WX_GTK_VER=2.8 need-wxwidgets unicode egamesconf \ --with-vorbis=/usr \ --with-ogg=/usr } src_compile() { local jamopts=$(echo "${MAKEOPTS}" | sed -ne "/-j/ { s/.*\(-j[[:space:]]*[0-9]\+\).*/\1/; p }") jam -dx -q ${jamopts} || die "jam failed" } src_install() { dogamesbin glest.bin || die "dogamesbin glest.bin failed" dogamesbin glest_editor || die "dogamesbin glest_editor failed" dogamesbin glest_g3dviewer || die "dogamesbin glest_g3dviewer failed" dogamesbin glest_configurator || die "dogamesbin glest_configurator failed" insinto "${GAMES_DATADIR}"/${PN} doins glest.ini || die "doins glest.ini failed" doins glestkeys.ini || die "doins glestkeys.ini failed" cd "${WORKDIR}" doins -r servers.ini \ data maps scenarios techs tilesets tutorials || die "doins data failed" dodoc docs/readme.txt || die "dodoc docs/readme.txt failed" newicon techs/megapack/factions/magic/units/archmage/images/archmage.bmp \ ${PN}.bmp || die "newicon failed" make_desktop_entry glest.bin MegaGlest /usr/share/pixmaps/${PN}.bmp prepgamesdirs }