# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games PATCHED_MD5="8e23b967d58146f0268248731977d13a" DESCRIPTION="Game data for Silent Threat, a FreeSpace add-on. Requires CD or previous installation." HOMEPAGE="http://www.volition-inc.com/fs/" SRC_URI="http://icculus.org/~taylor/freespace/updates/st-${PV}-x86.run" LICENSE="freespace1" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND="games-util/loki_patch" RDEPEND="games-action/freespace1-data" src_unpack() { mkdir "${S}" # Grab the file off the CD. CDROM_NAME_1="Silent Threat" cdrom_get_cds mdisk.vp cp "${CDROM_ROOT}/mdisk.vp" "${S}" # Is it patched already? ebegin "Checking if file is already patched to 1.06" echo "${PATCHED_MD5} *${S}/mdisk.vp" | md5sum -c --status - STATUS=$? eend $STATUS # File needs to be patched. if [[ "${STATUS}" != "0" ]]; then # Unpack the patch. mkdir "${WORKDIR}/patch" cd "${WORKDIR}/patch" tail -n +$(sed -n "s:^skip=::p" "${DISTDIR}/st-${PV}-x86.run") "${DISTDIR}/st-${PV}-x86.run" | tar zx # Try to apply it. ebegin "Attempting to patch file to ${PV}" loki_patch patch.dat "${S}" &> /dev/null STATUS=$? eend $STATUS # Oh no! [[ "${STATUS}" != "0" ]] && ewarn "Patch failed. You may experience problems with the game." fi } src_compile() { einfo "Nothing to compile!" } src_install() { insinto "${GAMES_DATADIR}/freespace1" doins mdisk.vp prepgamesdirs }