|
|
# Copyright 1999-2006 Gentoo Foundation | # Copyright 1999-2006 Gentoo Foundation |
# Distributed under the terms of the GNU General Public License v2 | # Distributed under the terms of the GNU General Public License v2 |
# $Header: /var/cvsroot/gentoo-x86/games-fps/alephone/alephone-20060506.ebuild,v 1.1 2006/06/02 23:19:08 tupone Exp $ |
# $Header: $ |
| |
inherit eutils games | inherit eutils games |
| |
DESCRIPTION="An enhanced version of the game engine from the classic Mac game, Marathon" | DESCRIPTION="An enhanced version of the game engine from the classic Mac game, Marathon" |
HOMEPAGE="http://source.bungie.org/" |
HOMEPAGE="http://marathon.sourceforge.net/" |
SRC_URI="mirror://sourceforge/marathon/AlephOne-${PV}.tar.gz" | SRC_URI="mirror://sourceforge/marathon/AlephOne-${PV}.tar.gz" |
| |
LICENSE="GPL-2" | LICENSE="GPL-2" |
SLOT="0" | SLOT="0" |
KEYWORDS="~amd64 ~x86" |
KEYWORDS="~x86" |
IUSE="lua opengl speex" | IUSE="lua opengl speex" |
| |
DEPEND="lua? ( dev-lang/lua ) | DEPEND="lua? ( dev-lang/lua ) |
|
|
S=${WORKDIR}/AlephOne-${PV} | S=${WORKDIR}/AlephOne-${PV} |
| |
src_unpack() { | src_unpack() { |
unpack ${A} |
unpack "${A}" |
cd "${S}" |
cp "${FILESDIR}"/alephone.png "${FILESDIR}"/alephone.sh "${S}" |
cp ${FILESDIR}/alephone.png ./ |
sed -i -e "s:GAMES_DATADIR:${GAMES_DATADIR}:g" "${S}"/alephone.sh || die |
cat > alephone.sh << EOF |
|
#!/bin/sh |
|
|
|
DATADIRS=" |
|
/usr/local/share/AlephOne |
|
/usr/local/share/games/AlephOne |
|
/opt/AlephOne/share/AlephOne |
|
/opt/AlephOne/share/games/AlephOne |
|
/opt/alephone/share/AlephOne |
|
/opt/alephone/share/games/AlephOne |
|
/usr/share/AlephOne |
|
/usr/share/games/AlephOne" |
|
|
|
DIR=\$(dirname \${0}) |
|
CMD=\$(basename \${0}) |
|
ALEPHONE=\${CMD%%-*} |
|
GAME=\${CMD#*-} |
|
GAME=\${GAME%.*} |
|
|
|
if [ -n "\${ALEPHONE_DATA}" ] |
|
then |
|
export ALEPHONE_DATA=\${ALEPHONE_DATA}:${GAMES_DATADIR}/alephone-\${GAME} |
|
elif [ "\${ALEPHONE}" == "alephone" ] |
|
then |
|
export ALEPHONE_DATA=${GAMES_DATADIR}/AlephOne:${GAMES_DATADIR}/alephone-\${GAME} |
|
else |
|
for d in \${DATADIRS} |
|
do |
|
if [ -d \${d} ] |
|
then |
|
export ALEPHONE_DATA=\${d}:${GAMES_DATADIR}/alephone-\${GAME} |
|
break |
|
fi |
|
done |
|
if [ -z "\${ALEPHONE_DATA}" ] |
|
then |
|
echo "Could not find the \${ALEPHONE} data directory in \${DATADIRS}" |
|
echo "Please set your ALEPHONE_DATA variable to point to the correct location of the data directory for \${ALEPHONE}" |
|
export ALEPHONE_DATA=${GAMES_DATADIR}/alephone-\${GAME} |
|
fi |
|
fi |
|
|
|
# kill ARTS, because we're just that nice |
|
if artsshell terminate 2> /dev/null |
|
then |
|
sleep 2 |
|
fi |
|
|
|
\${DIR}/\${ALEPHONE} -m $* |
|
EOF |
|
} | } |
| |
src_compile() { | src_compile() { |
|
|
echo | echo |
einfo "Read the docs and install the data files accordingly to play." | einfo "Read the docs and install the data files accordingly to play." |
echo | echo |
|
einfo "If you only want to install one scenario, read" |
|
einfo "http://traxus.jjaro.net/traxus/AlephOne:Install_Guide#Single_scenario_3" |
|
einfo "If you want to install multiple scenarios, read" |
|
einfo "http://traxus.jjaro.net/traxus/AlephOne:Install_Guide#Multiple_scenarios_3" |
|
echo |
} | } |