# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /home/cvsroot/gentoo-x86/games-fps/soldieroffortune/soldieroffortune-1.06a.ebuild,v 1.1 2003/09/09 18:10:14 vapier Exp $ # Game is available for ppc too! # This ebuild may need additional use flags for all these: # [x] Base Install Required (+4 MB) # [x] Scenarios (+7 MB) # [x] Sounds and Graphics (+118 MB) # [x] Music (+65 MB) # [x] Videos (+147 MB) # -------------------- # Total 341 MB inherit games IUSE="nocd" DESCRIPTION="Heroes of Might and Magic III : The Restoration of Erathia" HOMEPAGE="http://www.lokigames.com/products/heroes3/" KEYWORDS="x86 ppc" # ARCH is needed, but i don't know how to get it SRC_URI="x86? ( ftp://ftp.planetmirror.com/pub/lokigames/updates/heroes3/heroes3-${PV}a-cdrom-x86.run ftp://snuffleupagus.animearchive.org/loki/updates/heroes3/heroes3-${PV}a-cdrom-x86.run ) ppc? ( ftp://ftp.planetmirror.com/pub/lokigames/updates/heroes3/heroes3-${PV}a-ppc.run ftp://snuffleupagus.animearchive.org/loki/updates/heroes3/heroes3-${PV}a-ppc.run )" LICENSE="LOKI-EULA" SLOT="0" RESTRICT="nostrip" DEPEND="virtual/glibc" RDEPEND="${DEPEND} virtual/opengl" S=${WORKDIR} dir=${GAMES_PREFIX_OPT}/${PN} Ddir=${D}/${dir} pkg_setup() { is [ "`use nocd`" ]; then ewarn "The full installation takes about 341 MB of space!" fi games_pkg_setup } src_unpack() { unpack_makeself } src_install() { dodir ${dir} games_get_cd hiscore.tar.gz games_verify_cd "Heroes of Might and Magic III" einfo "Copying files... this may take a while..." exeinto /opt/heroes3 doexe ${GAMES_CD}/bin/x86/heroes3 insinto /opt/heroes3 doins ${GAMES_CD}/{Heroes_III_Tutorial.pdf,README,icon.{bmp,xpm}} if [ "`use nocd`" ]; then # should separate this # videos, maps, music, graphics-sounds cp -r ${GAMES_CD}/{data,maps,mp3} ${Ddir} || die "copying data" fi cd ${Ddir} tar xf ${GAMES_CD}/hiscore.tar.gz cd ${S} bin/Linux/x86/loki_patch --verify patch.dat bin/Linux/x86/loki_patch patch.dat ${Ddir} >& /dev/null || die "patching" # now, since these files are coming off a cd, the times/sizes/md5sums wont # be different ... that means portage will try to unmerge some files (!) # we run touch on ${D} so as to make sure portage doesnt do any such thing find ${Ddir} -exec touch '{}' \; dodir ${GAMES_BINDIR} dogamesbin ${FILESDIR}/heroes3 dosed "s:GENTOO_DIR:${dir}:" ${GAMES_BINDIR}/heroes3 insinto /usr/share/pixmaps doins ${S}/heroes3.xpm prepgamesdirs make_desktop_entry heroes3 "Heroes of Might and Magic III" "heroes3.xpm" } pkg_postinst() { einfo "To play the game run:" einfo " heroes3" games_pkg_postinst }