# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games DESCRIPTION="Kohan: Immortal Sovereigns" HOMEPAGE="http://www.lokigames.com/products/kohan/" SRC_URI="mirror://lokigames/kohan/kohan-1.2.0-x86.run mirror://lokigames/kohan/kohan-1.3.1-x86.run http://www.icculus.org/lgfaq/files/kohan_libpatch-0.1.run" LICENSE="LOKI-EULA" SLOT="0" KEYWORDS="~x86" RESTRICT="strip" IUSE="" DEPEND="sys-libs/glibc games-util/loki_patch" RDEPEND="virtual/opengl x86? ( || ( ( x11-libs/libX11 x11-libs/libXext x11-libs/libXau x11-libs/libXdmcp ) virtual/x11 ) media-libs/libvorbis media-libs/libogg media-libs/smpeg ) amd64? ( app-emulation/emul-linux-x86-baselibs app-emulation/emul-linux-x86-xlibs app-emulation/emul-linux-x86-sdl app-emulation/emul-linux-x86-soundlibs )" S=${WORKDIR} GAMES_CHECK_LICENSE="yes" dir=${GAMES_PREFIX_OPT}/${PN} Ddir=${D}/${dir} pkg_setup() { games_pkg_setup ewarn "The installed game takes about 611MB of space!" cdrom_get_cds Kohan.TGW } src_unpack() { mkdir 1.2.0 cd 1.2.0 unpack_makeself kohan-1.2.0-x86.run cd .. mkdir 1.3.1 cd 1.3.1 unpack_makeself kohan-1.3.1-x86.run cd .. mkdir patch cd patch unpack_makeself kohan_libpatch-0.1.run cp ${CDROM_ROOT}/icon.xpm ${S}/kohan.xpm } src_install() { dodir ${dir} einfo "Copying files... this may take a while..." exeinto ${dir} doexe ${CDROM_ROOT}/bin/x86/kohan insinto ${dir} doins ${CDROM_ROOT}/Kohan.TGW ${Ddir}/ doins -r ${CDROM_ROOT}/Maps doins -r ${CDROM_ROOT}/SAI doins -r ${CDROM_ROOT}/Cinematics doins ${CDROM_ROOT}/Voice.TGW doins ${CDROM_ROOT}/Music.TGW cd ${S}/1.2.0 loki_patch patch.dat ${Ddir} || die "patching" cd ${S}/1.3.1 loki_patch patch.dat ${Ddir} || die "patching" cd ${S}/patch/kohan_data doins -r lib doins kohan.launch # 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 '{}' \; games_make_wrapper kohan ./kohan.launch "${dir}" "${dir}" doicon ${S}/kohan.xpm make_desktop_entry kohan "Kohan: Immortal Sovereigns" kohan.xpm prepgamesdirs } pkg_postinst() { games_pkg_postinst einfo "To play the game run:" einfo " kohan" }