summary refs log tree commit diff
path: root/pkgs/games/quake3
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2008-06-14 20:55:48 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2008-06-14 20:55:48 +0000
commit7219a09001291ef236ad8ac02713096bec0d0c08 (patch)
treef14a36e929e646e9977f3f4bbccd64b6d1516860 /pkgs/games/quake3
parent80b2254cbb90bfb93dbe1bb5a58866db68e17ae4 (diff)
downloadnixpkgs-7219a09001291ef236ad8ac02713096bec0d0c08.tar
nixpkgs-7219a09001291ef236ad8ac02713096bec0d0c08.tar.gz
nixpkgs-7219a09001291ef236ad8ac02713096bec0d0c08.tar.bz2
nixpkgs-7219a09001291ef236ad8ac02713096bec0d0c08.tar.lz
nixpkgs-7219a09001291ef236ad8ac02713096bec0d0c08.tar.xz
nixpkgs-7219a09001291ef236ad8ac02713096bec0d0c08.tar.zst
nixpkgs-7219a09001291ef236ad8ac02713096bec0d0c08.zip
* ioquake: updated to 1.34rc3.
* rss-glx: fixed the build.
* Removed the OpenGL wrapper stuff, it's no longer needed (thanks to
  the RUNPATH you just need to put the appropriate libGL.so in the
  LD_LIBRARY_PATH). 

svn path=/nixpkgs/trunk/; revision=12093
Diffstat (limited to 'pkgs/games/quake3')
-rw-r--r--pkgs/games/quake3/game/builder.sh7
-rw-r--r--pkgs/games/quake3/game/default.nix26
-rw-r--r--pkgs/games/quake3/wrapper/builder.sh24
-rw-r--r--pkgs/games/quake3/wrapper/default.nix9
4 files changed, 34 insertions, 32 deletions
diff --git a/pkgs/games/quake3/game/builder.sh b/pkgs/games/quake3/game/builder.sh
deleted file mode 100644
index 9082b8f21ad..00000000000
--- a/pkgs/games/quake3/game/builder.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-source $stdenv/setup
-
-ensureDir $out/baseq3
-installTargets=copyfiles
-installFlags="COPYDIR=$out"
-
-genericBuild
diff --git a/pkgs/games/quake3/game/default.nix b/pkgs/games/quake3/game/default.nix
index c7fe303b5ef..292748c4546 100644
--- a/pkgs/games/quake3/game/default.nix
+++ b/pkgs/games/quake3/game/default.nix
@@ -1,11 +1,29 @@
 {stdenv, fetchurl, x11, SDL, mesa, openal}:
 
 stdenv.mkDerivation {
-  name = "quake3-icculus-1.33pre526";
+  name = "ioquake3-1.34-pre-rc3";
+  
   src = fetchurl {
-    url = http://nix.cs.uu.nl/dist/tarballs/quake3-icculus-r526.tar.bz2;
-    md5 = "63429347b918052c27cdb5c1d15939ad";
+    url = http://ioquake3.org/files/ioquake3_1.34-rc3.tar.bz2;
+    sha256 = "008vah60z0n9h1qp373xbqvhwfbyywbbhd1np0h0yw66g0qzchzv";
   };
-  builder = ./builder.sh;
+
+  patchFlags = "-p0";
+  
+  patches = [
+    # Fix for compiling on gcc 4.2.
+    (fetchurl {
+      url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/games-fps/quake3/files/quake3-1.34_rc3-gcc42.patch?rev=1.1";
+      sha256 = "06c9lxfczcby5q29pim231mr2wdkvbv36xp9zbxp9vk0dfs8rv9x";
+    })
+  ];
+  
   buildInputs = [x11 SDL mesa openal];
+
+  preInstall = ''
+    ensureDir $out/baseq3
+    installTargets=copyfiles
+    installFlags="COPYDIR=$out"
+  '';
+  
 }
diff --git a/pkgs/games/quake3/wrapper/builder.sh b/pkgs/games/quake3/wrapper/builder.sh
index 4a477bac561..e4c91a39b8f 100644
--- a/pkgs/games/quake3/wrapper/builder.sh
+++ b/pkgs/games/quake3/wrapper/builder.sh
@@ -1,6 +1,5 @@
 source $stdenv/setup
 
-
 ensureDir $out/baseq3
 for i in $paks; do
     if test -d "$paks/baseq3"; then
@@ -8,20 +7,9 @@ for i in $paks; do
     fi
 done
 
-
-ensureDir $out/bin
-
-cat >$out/bin/quake3 <<EOF
-#! $SHELL -e
-
-mesa=$mesa
-
-$(cat $mesaSwitch)
-
-exec $game/ioquake3.i386 \
-    +set fs_basepath $out \
-    +set r_allowSoftwareGL 1 \
-    "\$@"
-EOF
-
-chmod +x $out/bin/quake3
+# We add Mesa to the end of $LD_LIBRARY_PATH to provide fallback
+# software rendering.  GCC is needed so that libgcc_s.so can be found
+# when Mesa is used.
+makeWrapper $game/ioquake3.i386 $out/bin/quake3 \
+    --suffix-each LD_LIBRARY_PATH ':' "$mesa/lib $gcc/lib" \
+    --add-flags "+set fs_basepath $out +set r_allowSoftwareGL 1"
diff --git a/pkgs/games/quake3/wrapper/default.nix b/pkgs/games/quake3/wrapper/default.nix
index a15efc77c2c..84d93cefa21 100644
--- a/pkgs/games/quake3/wrapper/default.nix
+++ b/pkgs/games/quake3/wrapper/default.nix
@@ -1,11 +1,14 @@
-{stdenv, fetchurl, game, paks, mesa, name, description}:
+{stdenv, fetchurl, game, paks, mesa, name, description, makeWrapper}:
 
 stdenv.mkDerivation {
   builder = ./builder.sh;
-  inherit game paks mesa name;
+
+  buildInputs = [makeWrapper];
   
-  mesaSwitch = ../../../build-support/opengl/mesa-switch.sh;
+  inherit game paks mesa name;
 
+  gcc = stdenv.gcc.gcc;
+  
   meta = {
     inherit description;
   };