urbanterror: Enabled OpenAL and curl support.

svn path=/nixpkgs/trunk/; revision=21294
This commit is contained in:
Alexander Tsamutali 2010-04-24 12:39:10 +00:00
parent 4fcbad8476
commit 1f3943541b
2 changed files with 24 additions and 20 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, unzip, SDL, mesa, curl, openal }: { stdenv, fetchurl, unzip, SDL, mesa, openal, curl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "urbanterror-${version}"; name = "urbanterror-${version}";
version = "4.1"; version = "4.1";
@ -16,16 +16,15 @@ stdenv.mkDerivation rec {
unzip $src1 unzip $src1
unzip $src2 unzip $src2
''; '';
# FIXME configurePhase = ''
#patchPhase = '' cd ioUrbanTerrorClientSource
# cd ioUrbanTerrorClientSource echo "USE_OPENAL = 1" > Makefile.local
# substituteInPlace code/client/snd_openal.c \ echo "USE_OPENAL_DLOPEN = 0" >> Makefile.local
# --replace libopenal.so.0 ${openal}/lib/libopenal.so echo "USE_CURL = 1" >> Makefile.local
# substituteInPlace code/client/cl_curl.h \ echo "USE_CURL_DLOPEN = 0" >> Makefile.local
# --replace libcurl.so.3 ${curl}/lib/libcurl.so cd ..
# cd .. '';
#''; buildInputs = [ unzip SDL mesa openal curl ];
buildInputs = [ unzip SDL mesa ];
buildPhase = '' buildPhase = ''
for d in ioUrbanTerrorClientSource ioUrbanTerrorServerSource for d in ioUrbanTerrorClientSource ioUrbanTerrorServerSource
do do
@ -44,18 +43,23 @@ stdenv.mkDerivation rec {
"$destDir/ioUrTded" "$destDir/ioUrTded"
cp -rv UrbanTerror/q3ut4 "$destDir" cp -rv UrbanTerror/q3ut4 "$destDir"
cat << EOF > "$out/bin/urbanterror" cat << EOF > "$out/bin/urbanterror"
#!/bin/sh #!/bin/sh
cd "$destDir" cd "$destDir"
exec ./ioUrbanTerror "\$@" exec ./ioUrbanTerror "\$@"
EOF EOF
chmod +x "$out/bin/urbanterror" chmod +x "$out/bin/urbanterror"
cat << EOF > "$out/bin/urbanterror-ded" cat << EOF > "$out/bin/urbanterror-ded"
#!/bin/sh #!/bin/sh
cd "$destDir" cd "$destDir"
exec ./ioUrTded "\$@" exec ./ioUrTded "\$@"
EOF EOF
chmod +x "$out/bin/urbanterror-ded" chmod +x "$out/bin/urbanterror-ded"
''; '';
postFixup = ''
p=$out/opt/urbanterror/ioUrbanTerror
cur_rpath=$(patchelf --print-rpath $p)
patchelf --set-rpath $cur_rpath:${mesa}/lib $p
'';
meta = { meta = {
description = "A multiplayer tactical FPS on top of Quake 3 engine"; description = "A multiplayer tactical FPS on top of Quake 3 engine";
longDescription = '' longDescription = ''

View file

@ -8678,7 +8678,7 @@ let
}; };
urbanterror = import ../games/urbanterror { urbanterror = import ../games/urbanterror {
inherit fetchurl stdenv unzip SDL mesa curl openal; inherit fetchurl stdenv unzip SDL mesa openal curl;
}; };
ut2004demo = import ../games/ut2004demo { ut2004demo = import ../games/ut2004demo {