# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games DESCRIPTION="Postal 2: Share The Pain" HOMEPAGE="http://www.gopostal.com/" SRC_URI="http://updatefiles.linuxgamepublishing.com/${PN}/${P/%?/1}.run http://updatefiles.linuxgamepublishing.com/${PN}/${P}.run" LICENSE="postal2" SLOT="0" KEYWORDS="~x86" IUSE="" RESTRICT="strip" DEPEND="games-util/loki_patch" RDEPEND="|| ( x11-libs/libXext virtual/x11 ) amd64? ( app-emulation/emul-linux-x86-baselibs app-emulation/emul-linux-x86-xlibs || ( >=app-emulation/emul-linux-x86-xlibs-7.0 >=media-video/nvidia-glx-1.0.6629-r3 x11-drivers/nvidia-drivers x11-drivers/nvidia-legacy-drivers >=x11-drivers/ati-drivers-8.8.25-r1 ) )" S=${WORKDIR} GAMES_CHECK_LICENSE="yes" pkg_setup() { games_pkg_setup cdrom_get_cds postal2_eula.txt } src_unpack() { mkdir ${A} local f for f in * ; do cd "${S}"/${f} unpack_makeself ${f} done } src_install() { dodir "${GAMES_PREFIX_OPT}"/${PN} cd "${D}/${GAMES_PREFIX_OPT}"/${PN} cp -s "${CDROM_ROOT}"/.installation_data/*.bz2 . unpack ./*.bz2 rm ./*.bz2 local d for d in "${S}"/* ; do cd "${d}" loki_patch patch.dat "${OLDPWD}" || die "loki_patch ${d} failed" cd - done games_make_wrapper ${PN} ./${PN}-bin "${GAMES_PREFIX_OPT}"/${PN}/System . doicon "${CDROM_ROOT}"/.installation_data/${PN}.xpm make_desktop_entry ${PN} "Postal 2: Share the Pain" ${PN}.xpm prepgamesdirs }