# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games DESCRIPTION="Reimplementation of the SCUMM game engine used in Lucasarts adventures" HOMEPAGE="http://scummvm.sourceforge.net/" SRC_URI="mirror://sourceforge/scummvm/${P}.tar.bz2" KEYWORDS="x86" LICENSE="GPL-2" SLOT="0" IUSE="alsa oggvorbis mad zlib debug" IUSE_ENGINES="scumm simon sky sword1 sword2 queen" DEPEND=">=media-libs/libsdl-1.2.2 >media-libs/libmpeg2-0.3.1 oggvorbis? ( media-libs/libvorbis ) alsa? ( >=media-libs/alsa-lib-0.9 ) mad? ( media-libs/libmad ) zlib? ( sys-libs/zlib )" src_unpack() { unpack ${A} } src_compile() { confstr="`use_enable alsa` `use_enable zlib` `use_enable debug` `use_enable mad` `use_enable oggvorbis vorbis`" # the user may define engines to be built in an ENGINES env variable enginestr="" num_engines=0 for e in ${IUSE_ENGINES} ; do if [ ! `use engines_${e}` ] ; then enginestr=${enginestr}" --disable-"${e} # einfo "disable engine: "${e} else num_engines=$(($num_engines+1)) enginestr=${enginestr}" --enable-"${e} einfo "enable engine: "${e} fi done if [ ${num_engines} -gt 0 ] ; then confstr=${confstr}" "${enginestr} else einfo "You did not specify any engines, therefor all engines get compiled." einfo "You can specify a list of engines to be installed by defining" einfo "an ENGINES environment variable that contains a list of" einfo "the engines you would like to install." einfo "Possible values are: "${IUSE_ENGINES} fi ./configure ${confstr} || die "configure failed" emake || die "emake failed" } src_install() { dogamesbin scummvm || die "dobin failed" doman scummvm.6 || die "doman failed" dodoc NEWS README || die "dodoc failed" prepgamesdirs }