# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 LANGS="de en es fr it" inherit eutils games MY_PN="Osmos" MY_P="${MY_PN}_${PV}" DESCRIPTION="Play as a single-celled organism absorbing others" HOMEPAGE="http://www.hemispheregames.com/osmos/" SRC_URI="${MY_P}.tar.gz" IUSE="" for lang in $LANGS ; do IUSE="${IUSE} linguas_${lang}" done LICENSE="OSMOS" SLOT="0" KEYWORDS="-* ~amd64 ~x86" RESTRICT="fetch strip" PROPERTIES="interactive" RDEPEND="virtual/opengl virtual/glu x11-libs/libX11 media-libs/freetype:2 sys-libs/glibc media-libs/openal media-libs/libvorbis" DEPEND="${RDEPEND}" S=${WORKDIR}/${MY_PN} GAMES_CHECK_LICENSE="yes" pkg_setup() { strip-linguas ${LANGS} if [[ ${#LINGUAS} > 2 ]] ; then echo ewarn "Osmos only supports one localization at once!" ewarn "The game will be installed unlocalized (i. e. in English)." echo fi } pkg_nofetch() { einfo "Please download ${MY_P}.tar.gz and place it into ${DISTDIR}" } src_install() { local dir="${GAMES_PREFIX_OPT}/${PN}" exeinto "${dir}" if use amd64 ; then mv ${MY_PN}.bin64 ${MY_PN} elif use x86 ; then mv ${MY_PN}.bin32 ${MY_PN} fi doexe ${MY_PN} || die "doexe" dohtml readme.html insinto "${dir}" if [[ ${#LINGUAS} = 2 ]] && [ ${LINGUAS} != "en" ] ; then mv Osmos-${LINGUAS}.loc Osmos-en.loc fi doins -r Fonts/ Sounds/ Textures/ Osmos-en.loc *.cfg || die "doins failed" newicon Icons/256x256.png ${PN}.png games_make_wrapper ${PN} ./${MY_PN} "${dir}" make_desktop_entry ${PN} "Osmos" prepgamesdirs }