# Copyright 2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games DESCRIPTION="A realtime strategy game engine" HOMEPAGE="http://www.stratagus.org/" SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz" LICENSE="GPL-2" KEYWORDS="~x86" IUSE="debug doc flac mad mikmod oggvorbis opengl" SLOT="0" RDEPEND="virtual/glibc virtual/x11 app-arch/bzip2 dev-lang/lua media-libs/libpng media-libs/libsdl sys-devel/gcc sys-libs/zlib flac? ( media-libs/flac ) mad? ( media-libs/libmad ) mikmod? ( media-libs/libmikmod ) oggvorbis? ( media-libs/libogg media-libs/libvorbis )" DEPEND="${RDEPEND} doc? ( app-doc/doxygen )" S="${WORKDIR}/stratagus-040702" src_unpack() { unpack ${A} if use debug; then RESTRICT="nostrip" else sed -i ${S}/configure.in \ -e "s:\(DEBUG_CFLAGS=\).*:\1\"${CFLAGS}\":" fi } src_compile() { autoconf || die "autoconf failed" econf \ $(use_enable debug) \ $(use_with oggvorbis ogg) \ $(use_with mikmod) \ $(use_with flac) \ $(use_with mad) \ $(use_with opengl) \ || die "econf failed" emake -j1 || die "emake failed" use doc && { emake doc || die "making source documentation failed" } } src_install() { exeinto ${GAMES_LIBDIR} doexe stratagus prepgamesdirs dodoc README mv doc/ ${D}/usr/share/doc/${PF}/ use doc && { dohtml srcdoc/html/* } }