pinkbyte-overlay/games-puzzle/braid/braid-1.0.2-r9999.ebuild

73 lines
1.5 KiB
Bash
Raw Normal View History

# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
2012-06-14 14:22:27 +04:00
EAPI=4
inherit games versionator
MY_PV="$(get_version_component_range 3)"
DESCRIPTION="Platform game where you manipulate flow of time"
HOMEPAGE="http://braid-game.com"
SRC_URI="${PN}-linux-build${MY_PV}.run.bin
linguas_ru? ( ${PN}-rus.tar.bz2 )"
LICENSE="Arphic MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="linguas_ru"
RESTRICT="fetch mirror strip"
DEPEND="app-arch/unzip"
RDEPEND="media-libs/libsdl[joystick,sound,video]
x11-libs/libX11
x11-libs/libXau
x11-libs/libxcb
x11-libs/libXdmcp
x11-libs/libXext
virtual/opengl
media-gfx/nvidia-cg-toolkit"
2012-11-27 16:49:25 +04:00
S="${WORKDIR}/data"
pkg_nofetch() {
2012-11-27 16:49:25 +04:00
elog
elog "Download ${SRC_URI} from ${HOMEPAGE} and place it in ${DISTDIR}"
2012-11-27 16:49:25 +04:00
elog
}
src_unpack() {
# self unpacking zip archive; unzip warns about the exe stuff
local a="${DISTDIR}/${PN}-linux-build${MY_PV}.run.bin"
echo ">>> Unpacking ${a} to ${PWD}"
unzip -q "${a}"
[ $? -gt 1 ] && die "unpacking failed"
if use linguas_ru; then
unpack "${PN}-rus.tar.bz2"
2012-11-27 16:49:25 +04:00
mv "${S}/package0.zip" "${S}/gamedata/data" || die
mv "${S}/strings/english.mo" "${S}/gamedata/data/strings" || die
fi
}
src_install() {
local dir="${GAMES_PREFIX_OPT}/${PN}"
insinto "${dir}"
exeinto "${dir}"
2012-06-14 14:22:27 +04:00
doins -r gamedata/data
use x86 && doexe x86/"${PN}"
use amd64 && doexe amd64/"${PN}"
2012-06-14 14:22:27 +04:00
doicon gamedata/"${PN}.png"
dodoc gamedata/README-linux.txt
games_make_wrapper "${PN}" "./${PN}" "${dir}"
make_desktop_entry "${PN}" "Braid" "${PN}"
prepgamesdirs
}