# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games DESCRIPTION="Cross-platform 3D realtime strategy game" HOMEPAGE="http://www.stud.uni-karlsruhe.de/~uxsm/glest/" DATAVERSION="${PV/_p?/}" SOURCEVERSION="${PV/_p/-r}" # source directory uses version numbering without the patch level S="${WORKDIR}/${PN}-${DATAVERSION}" SRC_URI="http://www.stud.uni-karlsruhe.de/~uxsm/glest-${SOURCEVERSION}-source.tar.bz2 http://www.stud.uni-karlsruhe.de/~unatc/glest/glest-${DATAVERSION}-data.tar.bz2 http://www.stud.uni-karlsruhe.de/~uxsm/german.lng http://www.stud.uni-karlsruhe.de/~uxsm/russian.lng http://www.stud.uni-karlsruhe.de/~uxsm/dansk.lng" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="" RDEPEND=">=media-libs/libsdl-1.2.5 media-libs/libogg media-libs/libvorbis media-libs/openal dev-libs/xerces-c virtual/opengl virtual/x11" DEPEND="${RDEPEND} virtual/libc >=sys-devel/gcc-3.2 >=dev-util/jam-2.5" src_compile() { egamesconf || die jam || die "jam failed" } src_install() { # This install uses a custom script to launch the game # Running /usr/games/bin/glest will create a local install of glest # in the user's home directory under ~/.glest # Below uses sed to make sure the script has the proper games dir path cp ${FILESDIR}/glestscript ./ sed "s%GAMESDIR=\"[^\"]*\"%GAMESDIR=\"${GAMES_DATADIR}\"%" -i glestscript newgamesbin glestscript glest || die "couldn't install launcher" dodir "${GAMES_DATADIR}/${PN}" cp -r Tech data map tileset "${D}${GAMES_DATADIR}/${PN}/" || die "data copy failed" dodir "${GAMES_DATADIR}/${PN}/config" cp glest.ini "${D}${GAMES_DATADIR}/${PN}/config/" || die "config copy failed" dodir "${GAMES_DATADIR}/${PN}/lib" cp out/*-linux-gnu/opt/lib/sources/libglestlib.a "${D}${GAMES_DATADIR}/${PN}/lib/" || die "library copy failed" cp glest "${D}${GAMES_DATADIR}/${PN}" || "executable copy failed" cp ${DISTDIR}/russian.lng ${D}/${GAMES_DATADIR}/${PN}/data/lang/ cp ${DISTDIR}/dansk.lng ${D}/${GAMES_DATADIR}/${PN}/data/lang/ cp ${DISTDIR}/german.lng ${D}/${GAMES_DATADIR}/${PN}/data/lang/ make_desktop_entry glest Glest prepgamesdirs }