summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorAlexander Tsamutali <astsmtl@yandex.ru>2010-04-24 12:39:10 +0000
committerAlexander Tsamutali <astsmtl@yandex.ru>2010-04-24 12:39:10 +0000
commit1f3943541b9708e5c4673427c7a4433771a37042 (patch)
treef4e463f221cf8de366a58d72e5b1cb8252402788 /pkgs/games
parent4fcbad84761211d1da4ca1ed9695cefe0d302e4b (diff)
downloadnixlib-1f3943541b9708e5c4673427c7a4433771a37042.tar
nixlib-1f3943541b9708e5c4673427c7a4433771a37042.tar.gz
nixlib-1f3943541b9708e5c4673427c7a4433771a37042.tar.bz2
nixlib-1f3943541b9708e5c4673427c7a4433771a37042.tar.lz
nixlib-1f3943541b9708e5c4673427c7a4433771a37042.tar.xz
nixlib-1f3943541b9708e5c4673427c7a4433771a37042.tar.zst
nixlib-1f3943541b9708e5c4673427c7a4433771a37042.zip
urbanterror: Enabled OpenAL and curl support.
svn path=/nixpkgs/trunk/; revision=21294
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/urbanterror/default.nix42
1 files changed, 23 insertions, 19 deletions
diff --git a/pkgs/games/urbanterror/default.nix b/pkgs/games/urbanterror/default.nix
index c5e562ced534..dc870c79aba1 100644
--- a/pkgs/games/urbanterror/default.nix
+++ b/pkgs/games/urbanterror/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, unzip, SDL, mesa, curl, openal }:
+{ stdenv, fetchurl, unzip, SDL, mesa, openal, curl }:
 stdenv.mkDerivation rec {
   name = "urbanterror-${version}";
   version = "4.1";
@@ -16,16 +16,15 @@ stdenv.mkDerivation rec {
     unzip $src1
     unzip $src2
   '';
-  # FIXME
-  #patchPhase = ''
-  #  cd ioUrbanTerrorClientSource
-  #  substituteInPlace code/client/snd_openal.c \
-  #                    --replace libopenal.so.0 ${openal}/lib/libopenal.so
-  #  substituteInPlace code/client/cl_curl.h \
-  #                    --replace libcurl.so.3 ${curl}/lib/libcurl.so
-  #  cd ..
-  #'';
-  buildInputs = [ unzip SDL mesa ];
+  configurePhase = ''
+    cd ioUrbanTerrorClientSource
+    echo "USE_OPENAL = 1" > Makefile.local
+    echo "USE_OPENAL_DLOPEN = 0" >> Makefile.local
+    echo "USE_CURL = 1" >> Makefile.local
+    echo "USE_CURL_DLOPEN = 0" >> Makefile.local
+    cd ..
+  '';
+  buildInputs = [ unzip SDL mesa openal curl ];
   buildPhase = ''
     for d in ioUrbanTerrorClientSource ioUrbanTerrorServerSource
     do
@@ -44,18 +43,23 @@ stdenv.mkDerivation rec {
           "$destDir/ioUrTded"
     cp -rv UrbanTerror/q3ut4 "$destDir"
     cat << EOF > "$out/bin/urbanterror"
-#!/bin/sh
-cd "$destDir"
-exec ./ioUrbanTerror "\$@"
-EOF
+    #!/bin/sh
+    cd "$destDir"
+    exec ./ioUrbanTerror "\$@"
+    EOF
     chmod +x "$out/bin/urbanterror"
     cat << EOF > "$out/bin/urbanterror-ded"
-#!/bin/sh
-cd "$destDir"
-exec ./ioUrTded "\$@"
-EOF
+    #!/bin/sh
+    cd "$destDir"
+    exec ./ioUrTded "\$@"
+    EOF
     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 = {
     description = "A multiplayer tactical FPS on top of Quake 3 engine";
     longDescription = ''