added ebuild for maniadrive (doesn't build :-( )

This commit is contained in:
Manuel Friedli 2007-12-18 00:31:14 +00:00
parent c2844742e7
commit a6e9089f0a
6 changed files with 298 additions and 0 deletions

View file

@ -0,0 +1,23 @@
AUX maniadrive-1.1-no-download.patch 3039 RMD160 2387f9ca35a813d24b3cda84c7d0f8523000ccd7 SHA1 81d73b3216aca88de93655876c47a783dd0e26aa SHA256 d98137b4b997cceff7c11434080d865b2d13cf1853c0ec272e30329ea018627b
MD5 0e2b79653494e59ffecccc6dfff1a373 files/maniadrive-1.1-no-download.patch 3039
RMD160 2387f9ca35a813d24b3cda84c7d0f8523000ccd7 files/maniadrive-1.1-no-download.patch 3039
SHA256 d98137b4b997cceff7c11434080d865b2d13cf1853c0ec272e30329ea018627b files/maniadrive-1.1-no-download.patch 3039
AUX maniadrive-1.1-ocomp-fix.patch 754 RMD160 e53afbba98fcecd9b819012eb52000a91527bd5a SHA1 505bd572245ee67872e82248c2285f8dd3d1bedf SHA256 a96595e98ba306a3969ee82a796e7e0283902dff9c9292aef5f2131c34b95e3c
MD5 5683f722acb969107540c1228c51d639 files/maniadrive-1.1-ocomp-fix.patch 754
RMD160 e53afbba98fcecd9b819012eb52000a91527bd5a files/maniadrive-1.1-ocomp-fix.patch 754
SHA256 a96595e98ba306a3969ee82a796e7e0283902dff9c9292aef5f2131c34b95e3c files/maniadrive-1.1-ocomp-fix.patch 754
AUX maniadrive-1.1-remove-openal-test.patch 1506 RMD160 bc61d263241d16a6c4f714549fc19d2987dd5050 SHA1 f2e43fb1c06373963daa38b9162d1712e32b9c82 SHA256 6c0f90612412f5f0662d6f22400ae9dd3992b4c9405b5bd0cc28ee2c02365127
MD5 8866999260ced834ab4203a3523eec96 files/maniadrive-1.1-remove-openal-test.patch 1506
RMD160 bc61d263241d16a6c4f714549fc19d2987dd5050 files/maniadrive-1.1-remove-openal-test.patch 1506
SHA256 6c0f90612412f5f0662d6f22400ae9dd3992b4c9405b5bd0cc28ee2c02365127 files/maniadrive-1.1-remove-openal-test.patch 1506
DIST ManiaDrive-1.1-linux-i386.tar.gz 60260833 RMD160 50d38937d770e4bd5462f1cd045574d6903f5e35 SHA1 f04b5f81f5ced8de21ae9e1846cb6bbd8d029376 SHA256 4e3e2257b0f901e2976d8ea26265a3f8c2a7295d224f64637980f981357186f6
DIST ManiaDrive-1.2-src.tar.gz 263834 RMD160 09f94f7c2936a2ad5c52742fe9456f892988da46 SHA1 7c31120127eb30c46bbe439e703457fd02230376 SHA256 ffa8bafe3b2e796602e2dd462d4d0fdff2cbf43388d1bae029487b7f17e68b84
DIST ode.tar.gz 150748 RMD160 4b76b36debf363c2e5e5461672dd228f066204c7 SHA1 3aa849ab3a465dedac01788c21fea5c63c74a4b4 SHA256 5a0f868969be62c6c6d7575ed2fefa637299055c216b30b85a828a99c24478c3
DIST php5.2-latest.tar.gz 9444643 RMD160 2352d07ef35319bc59b55e1b8da8508242a405ae SHA1 ea63cb882f097a2b2a3d782e76ce351ed635932d SHA256 ec8b9b2350eb1a65911c34c603c30ee8a8eb850a6c42c963a6a6c9d72158ede0
EBUILD maniadrive-1.2.ebuild 2200 RMD160 f20350e98375896588f8e6a0d95ca16e1d9cce98 SHA1 aac5f1e792bb200854a68c913362f89c42c1ac6a SHA256 7ec1d5ed0e76c388319303d78b2fae7559cc54c7b0c088e4503806b3784f5610
MD5 9a825060e953c141665d7feef1004bbe maniadrive-1.2.ebuild 2200
RMD160 f20350e98375896588f8e6a0d95ca16e1d9cce98 maniadrive-1.2.ebuild 2200
SHA256 7ec1d5ed0e76c388319303d78b2fae7559cc54c7b0c088e4503806b3784f5610 maniadrive-1.2.ebuild 2200
MD5 dec12d1adc12ed71e494bc4507af0e01 files/digest-maniadrive-1.2 994
RMD160 51edc692023cb19343b0e505c7d192fdf974329b files/digest-maniadrive-1.2 994
SHA256 afe123734fa76ebcd442ecc3275dfeee34c34ca5eed3ce9e0e879ce7570d8937 files/digest-maniadrive-1.2 994

View file

@ -0,0 +1,12 @@
MD5 d5f8e8b1beb0bd82a8fe610661b04f4c ManiaDrive-1.1-linux-i386.tar.gz 60260833
RMD160 50d38937d770e4bd5462f1cd045574d6903f5e35 ManiaDrive-1.1-linux-i386.tar.gz 60260833
SHA256 4e3e2257b0f901e2976d8ea26265a3f8c2a7295d224f64637980f981357186f6 ManiaDrive-1.1-linux-i386.tar.gz 60260833
MD5 90dec2154802225980f8b4ebd6570069 ManiaDrive-1.2-src.tar.gz 263834
RMD160 09f94f7c2936a2ad5c52742fe9456f892988da46 ManiaDrive-1.2-src.tar.gz 263834
SHA256 ffa8bafe3b2e796602e2dd462d4d0fdff2cbf43388d1bae029487b7f17e68b84 ManiaDrive-1.2-src.tar.gz 263834
MD5 12ad91f56f259553c03b0d3f1952a8e3 ode.tar.gz 150748
RMD160 4b76b36debf363c2e5e5461672dd228f066204c7 ode.tar.gz 150748
SHA256 5a0f868969be62c6c6d7575ed2fefa637299055c216b30b85a828a99c24478c3 ode.tar.gz 150748
MD5 b8db3e7f81020978cef66435c2346c2e php5.2-latest.tar.gz 9444643
RMD160 2352d07ef35319bc59b55e1b8da8508242a405ae php5.2-latest.tar.gz 9444643
SHA256 ec8b9b2350eb1a65911c34c603c30ee8a8eb850a6c42c963a6a6c9d72158ede0 php5.2-latest.tar.gz 9444643

View file

@ -0,0 +1,103 @@
--- configure.old 2006-08-18 23:12:18.000000000 +0200
+++ configure 2006-08-19 00:56:59.000000000 +0200
@@ -60,6 +60,7 @@
echo " --force-php-install Force PHP 5 local reinstall"
echo " --ode-cvs Use ODE CVS version"
echo " --disable-x Disable X/GL/GLU test (server)"
+ echo " --no-download Disable ode and php5 download"
exit 0
}
@@ -88,12 +89,18 @@
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/opende co -r UNSTABLE -P raydium/ode
exit_if_error "$?" "CVS server error ? Try manual install (http://ode.org)"
else
- echo " Downloading 'stable CVS' version from Raydium website ..."
- if [ -f "raydium/ode.tar.gz" ]; then
- rm -f raydium/ode.tar.gz
+ if [ $no_download = "true" ]; then
+ if ! [ -f "raydium/ode.tar.gz" ]; then
+ exit_if_error "1" "ode.tar.gz must be present in the raydium directory when using --no-download"
+ fi
+ else
+ echo " Downloading 'stable CVS' version from Raydium website ..."
+ if [ -f "raydium/ode.tar.gz" ]; then
+ rm -f raydium/ode.tar.gz
+ fi
+ wget -O raydium/ode.tar.gz http://freeway.raydium.org/data/stable_mirrors/ode.tar.gz
+ exit_if_error "$?" "Error downloading."
fi
- wget -O raydium/ode.tar.gz http://freeway.raydium.org/data/stable_mirrors/ode.tar.gz
- exit_if_error "$?" "Error downloading."
# uncompress
echo " Uncompressing ..."
@@ -180,9 +187,15 @@
exit_if_error "$?" "xml2-config not found in path. Please install 'libxml2-devel' to compile PHP"
# download
- echo " Downloading latest PHP5 ..."
- wget -O raydium/php-latest.tar.gz http://snaps.php.net/php5.2-latest.tar.gz
- exit_if_error "$?" "wget not found, or network error"
+ if [ $no_download == "true" ]; then
+ if ! [ -f "raydium/php-latest.tar.gz" ]; then
+ exit_if_error "1" "php-latest.tar.gz must be present in the raydium directory when using --no-download"
+ fi
+ else
+ echo " Downloading latest PHP5 ..."
+ wget -O raydium/php-latest.tar.gz http://snaps.php.net/php5.2-latest.tar.gz
+ exit_if_error "$?" "wget not found, or network error"
+ fi
# uncompress
echo " Uncompressing ..."
@@ -228,37 +241,28 @@
####### Main
+
+ode_cvs="false"
+disable_x="no"
+force_ode="false"
+force_php="false"
+no_download="false"
+
for i in "$@"; do
if [ $i = "--help" ]; then
usage_print
fi
-done
-
-ode_cvs="false"
-for i in "$@"; do
if [ $i = "--ode-cvs" ]; then
- ode_cvs="true"
+ ode_cvs="true"
fi
-done
-
-disable_x="no"
-for i in "$@"; do
if [ $i = "--disable-x" ]; then
- disable_x="yes"
+ disable_x="yes"
fi
-done
-
-force_ode="false"
-for i in "$@"; do
if [ $i = "--force-ode-install" ]; then
- force_ode="true"
+ force_ode="true"
fi
-done
-
-force_php="false"
-for i in "$@"; do
- if [ $i = "--force-php-install" ]; then
- force_php="true"
+ if [ $i = "--no-download" ]; then
+ no_download="true"
fi
done

View file

@ -0,0 +1,17 @@
--- ocomp.sh.old 2006-08-19 01:46:14.000000000 +0200
+++ ocomp.sh 2006-08-19 01:48:12.000000000 +0200
@@ -3,12 +3,10 @@
# Small and ugly "static compiler" for Raydium apps, with ODE
# Use "./ocomp.sh test6.c" for example.
+OUTPUT_FILE=`echo $1 | cut -f1 -d.`
ulimit -c 0
-rm test
-gcc -g $1 -Wall -o test -L/usr/X11R6/lib/ -lXinerama -lGL -lGLU -lm -lopenal -lalut -ljpeg \
+gcc -g $1 -Wall -o $OUTPUT_FILE -L/usr/X11R6/lib/ -lXinerama -lGL -lGLU -lm -lopenal -lalut -ljpeg \
-Iraydium/ode/include/ raydium/ode/lib/libode.a -lvorbis -lvorbisfile -logg \
-Iraydium/php/ -Iraydium/php/include -Iraydium/php/main/ -Iraydium/php/Zend -Iraydium/php/TSRM raydium/php/libs/libphp5.a \
-lresolv -lcrypt -lz -lcurl -lxml2 -lGLEW
sync
-shift
-./test "$@"

View file

@ -0,0 +1,54 @@
--- configure.old2 2006-08-19 02:54:26.000000000 +0200
+++ configure 2006-08-19 02:56:59.000000000 +0200
@@ -339,51 +339,6 @@
exit_if_error "$?" "You must install libglew devel package"
-# OpenAL
-file="
-#include <AL/al.h>
-#include <AL/alc.h>
-#include <AL/alut.h>
-#include <time.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-int main(int argc, char **argv) {
-ALCdevice *dev;
-const ALubyte *initstr=(const ALubyte *) \"'( ( devices '( native null ) ) )\";
-dev=alcOpenDevice(initstr);
-sleep(1);
-alcCloseDevice(dev);
-return 0; }"
-test_build "OpenAL" "$file" "-lopenal"
-exit_if_error "$?" "openal-devel is required. Official CVS may be a good idea"
-
-# OpenAL 1.1
-file="
-#include <AL/al.h>
-#include <AL/alc.h>
-#include <AL/alut.h>
-#include <time.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-int main(int argc, char **argv) {
-ALCdevice *dev;
-const ALubyte *initstr=(const ALubyte *) \"'( ( devices '( native null ) ) )\";
-dev=alcOpenDevice(initstr);
-sleep(1);
-#ifndef ALUT_API_MAJOR_VERSION
-#error ALUT for OpenAL 1.1 is required
-#endif
-alcCloseDevice(dev);
-return 0; }"
-test_build "OpenAL 1.1 and ALUT" "$file" "-lopenal -lalut"
-exit_if_error "$?" "Cannot find OpenAL 1.1 and ALUT. You can try to remove -lalut from Makefile and/or *comp*sh scripts, but Raydium with OpenAL 1.0 is not supported."
-
# OGG/Vorbis
file='
#include <stdio.h>

View file

@ -0,0 +1,89 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils games
SRC="ManiaDrive-${PV}-src"
PHP="php5.2-latest.tar.gz"
# we keep the old binary package because there is no change in data
# MAIN="ManiaDrive-${PV}-linux-i386"
MAIN="ManiaDrive-1.1-linux-i386"
ODE="ode.tar.gz"
DESCRIPTION="ManiaDrive is a clone of Trackmania: 3D, stunts and skills!"
HOMEPAGE="http://maniadrive.raydium.org/"
SRC_URI="mirror://sourceforge/${PN}/${MAIN}.tar.gz
mirror://sourceforge/${PN}/${SRC}.tar.gz
http://freeway.raydium.org/data/stable_mirrors/${ODE}
http://snaps.php.net/${PHP}"
LICENSE="CCPL-Attribution-2.0
GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
DEPEND="media-libs/openal
virtual/glu
media-libs/jpeg
media-libs/libvorbis
media-libs/glew"
S=${WORKDIR}/${SRC}
RAY=${S}/raydium
dir=${GAMES_DATADIR}/${PN}
src_unpack() {
unpack "${MAIN}.tar.gz"
unpack "${SRC}.tar.gz"
# Copy ode and php tarballs
cp "${DISTDIR}"/{"${ODE}","${PHP}"} "${RAY}" || die
mv "${RAY}"/{"${PHP}",php-latest.tar.gz} || die
# Delete binary files
rm "${WORKDIR}/${MAIN}"/game/*.static
# Copy game data in build directory
cp -r "${WORKDIR}/${MAIN}"/game/* "${S}" || die
cd "${S}"
epatch "${FILESDIR}/${PN}-1.1-no-download.patch"
epatch "${FILESDIR}/${PN}-1.1-ocomp-fix.patch"
epatch "${FILESDIR}/${PN}-1.1-remove-openal-test.patch"
# Change version to allow to send scores
sed -i "s/ManiaDrive ${PV}custom/ManiaDrive ${PV}/" mania_drive.c \
|| die 'sed failed'
}
src_compile() {
addwrite /dev/nvidiactl
addwrite /dev/nvidia0
econf --no-download || die "econf failed"
emake || die "emake failed"
# The Makefile compiles only the engine (raydium).
# We can compile the game binaries with the ocomp script
# (static using ode).
local f
for f in mania{_drive,_server,2}.c ; do
./ocomp.sh "${f}" || die "ocomp.sh ${f} failed"
done
}
src_install() {
local f
for f in mania{_drive,_server,2} ; do
newgamesbin "${S}/${f}" "${f}.bin" \
|| die "newgamesbin ${f} failed"
games_make_wrapper "${f}" "${f}.bin" "${dir}"
done
insinto "${dir}"
doins -r "${WORKDIR}/${MAIN}"/game/*
dodoc "${WORKDIR}/${MAIN}"/README
}