# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games STRATAGUS_VERSION="040305" DESCRIPTION="Real time stratagy gaming engine (formerly known as freecr*ft)" HOMEPAGE="http://stratagus.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86" IUSE="flac oggvorbis mad" RDEPEND="sys-devel/autoconf" DEPEND="${RDEPEND} virtual/x11 >=media-libs/libpng-1.2.3 >=media-libs/libsdl-1.2.4 sys-libs/zlib >=dev-lang/lua-5 flac? ( media-libs/flac ) oggvorbis? ( media-libs/libvorbis ) mad? ( media-libs/libmad )" S=${WORKDIR}/${PN}-${STRATAGUS_VERSION} src_compile(){ autoconf egamesconf \ `use_with flac` \ `use_with oggvorbis ogg` \ `use_with mad` || die "configure failed" make depend || die "depend generation failed" make || die "build failed" } src_install(){ local STRATAGUS_DIR=${GAMES_DATADIR}/${PN} einfo "Installing game" dodir ${STRATAGUS_DIR} echo "cd ${STRATAGUS_DIR}" > playStratagus echo "./stratagus" >> playStratagus dogamesbin playStratagus exeinto ${STRATAGUS_DIR} doexe stratagus cp -R data ${D}/${STRATAGUS_DIR} cp -R contrib ${D}/${STRATAGUS_DIR} einfo "Installing doc" dodoc README COPYING dodoc doc/README-SDL.txt doc/SIOD.txt doc/trigger.txt doc/vp32_opensource_license_9-6-01.txt dohtml -r doc einfo "Installing tools" dodir ${STRATAGUS_DIR}/tools exeinto ${STRATAGUS_DIR}/tools doexe tools/{aledoc,startool,wartool,war1tool,build.sh,mpqlist.txt} prepgamesdirs } pkg_postinst() { einfo einfo "Stratagus is now installed but in order to actually play" einfo "you will need to either use a Warcraft CD or install the" einfo "aleona ebuild. To use a Warcraft CD:" einfo " 1 mount the cd as /mnt/cdrom" einfo " 2 cd /usr/games/stratagus" einfo " 3 run tools/build.sh" einfo "This will extract the data files to the correct place." einfo "Note that the CD is still needed for the music. To" einfo "to start a game just run \`playStratagus\`." einfo games_pkg_postinst }