summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorYury G. Kudryashov <urkud.urkud@gmail.com>2012-01-06 01:07:45 +0000
committerYury G. Kudryashov <urkud.urkud@gmail.com>2012-01-06 01:07:45 +0000
commit900c6e18cd2e71fcd3c5aad75f63c949f12d1c39 (patch)
tree3e242107fb40df46df8667c92ea209e91f95cbf4 /pkgs/games
parentc96b647e300d657f081528d01d1debbeb63da74a (diff)
parentdc9bf79b545d97216739e37aa2e02025d2f80019 (diff)
downloadnixlib-900c6e18cd2e71fcd3c5aad75f63c949f12d1c39.tar
nixlib-900c6e18cd2e71fcd3c5aad75f63c949f12d1c39.tar.gz
nixlib-900c6e18cd2e71fcd3c5aad75f63c949f12d1c39.tar.bz2
nixlib-900c6e18cd2e71fcd3c5aad75f63c949f12d1c39.tar.lz
nixlib-900c6e18cd2e71fcd3c5aad75f63c949f12d1c39.tar.xz
nixlib-900c6e18cd2e71fcd3c5aad75f63c949f12d1c39.tar.zst
nixlib-900c6e18cd2e71fcd3c5aad75f63c949f12d1c39.zip
svn merge ^/nixpkgs/trunk
Conflicts: openssl, libplist

svn path=/nixpkgs/branches/stdenv-updates/; revision=31337
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/privateer/0001-fix-VSFile-constructor.patch25
-rw-r--r--pkgs/games/privateer/default.nix37
-rw-r--r--pkgs/games/tremulous/default.nix9
-rw-r--r--pkgs/games/tremulous/parse.patch21
4 files changed, 91 insertions, 1 deletions
diff --git a/pkgs/games/privateer/0001-fix-VSFile-constructor.patch b/pkgs/games/privateer/0001-fix-VSFile-constructor.patch
new file mode 100644
index 000000000000..05b02fe5d73b
--- /dev/null
+++ b/pkgs/games/privateer/0001-fix-VSFile-constructor.patch
@@ -0,0 +1,25 @@
+From e779a2b8d53e7e4721ce5ddb8e8b1caa753b66dd Mon Sep 17 00:00:00 2001
+From: Florian Friesdorf <flo@chaoflow.net>
+Date: Wed, 4 Jan 2012 23:32:19 +0100
+Subject: [PATCH] fix VSFile constructor
+
+---
+ src/vsfilesystem.h |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/vsfilesystem.h b/src/vsfilesystem.h
+index 4bb7a66..71bf9b9 100644
+--- a/src/vsfilesystem.h
++++ b/src/vsfilesystem.h
+@@ -291,7 +291,7 @@ namespace VSFileSystem
+ 			VSFile();
+ 			VSFile( const char * buffer, long size, VSFileType type=ZoneBuffer, VSFileMode=ReadOnly);
+ 			VSFile( const char * filename, VSFileType type=UnknownFile, VSFileMode=ReadOnly);
+-			VSFile( const string &filename, VSFileType type=UnknownFile) { VSFile::VSFile( filename.c_str(), type); }
++			VSFile( const string &filename, VSFileType type=UnknownFile) { VSFile( filename.c_str(), type); }
+   			~VSFile();
+ 
+ 			FILE *	GetFP() { return this->fp; } // This is still needed for special cases (when loading PNG files)
+-- 
+1.7.8
+
diff --git a/pkgs/games/privateer/default.nix b/pkgs/games/privateer/default.nix
new file mode 100644
index 000000000000..1fe925e31b6a
--- /dev/null
+++ b/pkgs/games/privateer/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchsvn, boost, cmake, ffmpeg, freeglut, glib,
+  gtk, libjpeg, libpng, libpthreadstubs, libvorbis, libXau, libXdmcp,
+  libXmu, mesa, openal, pixman, pkgconfig, python27Full, SDL }:
+
+stdenv.mkDerivation {
+  name = "privateer-1.03";
+
+  src = fetchsvn {
+    #url = "mirror://sourceforge/project/privateer/Wing%20Commander%20Privateer/Privateer%20Gemini%20Gold%201.03/PrivateerGold1.03.bz2.bin";
+    url = "https://privateer.svn.sourceforge.net/svnroot/privateer/privgold/trunk/engine";
+    rev = 294;
+    sha256 = "e1759087d4565d3fc95e5c87d0f6ddf36b2cd5befec5695ec56ed5f3cd144c63";
+  };
+
+  buildInputs =
+    [ boost cmake ffmpeg freeglut glib gtk libjpeg libpng
+      libpthreadstubs libvorbis libXau libXdmcp libXmu mesa openal
+      pixman pkgconfig python27Full SDL ];
+
+  patches = [ ./0001-fix-VSFile-constructor.patch ];
+
+  preConfigure = ''
+    NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags gtk+-2.0)"
+  '';
+
+  installPhase = ''
+    ensureDir $out/bin
+    cp vegastrike $out/bin
+    cp vegaserver $out/bin
+  '';
+  
+  meta = {
+    homepage = http://privateer.sourceforge.net/;
+    longDescription = "";
+    maintainers = with stdenv.lib.maintainers; [ chaoflow ];
+  };
+}
diff --git a/pkgs/games/tremulous/default.nix b/pkgs/games/tremulous/default.nix
index 0124e2f448b0..a4a887e2ed3d 100644
--- a/pkgs/games/tremulous/default.nix
+++ b/pkgs/games/tremulous/default.nix
@@ -25,6 +25,12 @@ stdenv.mkDerivation rec {
     tar xvf $src3
     cd ..
   '';
+  patches = [ ./parse.patch ];
+  patchFlags = "-p 0";
+  NIX_LD_FLAGS = ''
+    -rpath ${stdenv.gcc}/lib
+    -rpath ${stdenv.gcc}/lib64
+  '';
   buildPhase = ''
     cd Release_1.011
     make
@@ -45,11 +51,12 @@ stdenv.mkDerivation rec {
         cat << EOF > $out/bin/$b
     #!/bin/sh
     cd $out/opt/tremulous
-    ./$b.$arch "$@"
+    exec ./$b.$arch "\$@"
     EOF
         chmod +x $out/bin/$b
     done
   '';
+  dontPatchELF = true;
   meta = {
     description = "A game that blends a team based FPS with elements of an RTS";
     longDescription = ''
diff --git a/pkgs/games/tremulous/parse.patch b/pkgs/games/tremulous/parse.patch
new file mode 100644
index 000000000000..12a73138c099
--- /dev/null
+++ b/pkgs/games/tremulous/parse.patch
@@ -0,0 +1,21 @@
+diff -ruN Release_1.011-old/src/qcommon/parse.c Release_1.011/src/qcommon/parse.c
+--- Release_1.011-old/src/qcommon/parse.c	2011-12-02 19:11:49.307368651 -0500
++++ Release_1.011/src/qcommon/parse.c	2011-12-02 19:13:27.556836387 -0500
+@@ -981,7 +981,7 @@
+ {
+   if (*string == '\"')
+   {
+-    strcpy(string, string+1);
++    memmove(string, string+1, strlen(string));
+   }
+   if (string[strlen(string)-1] == '\"')
+   {
+@@ -1784,7 +1784,7 @@
+     if ((*ptr == '\\' || *ptr == '/') &&
+         (*(ptr+1) == '\\' || *(ptr+1) == '/'))
+     {
+-      strcpy(ptr, ptr+1);
++      memmove(ptr, ptr+1, strlen(ptr));
+     }
+     else
+     {