Author: astsmtl
Date: Sun Apr 15 22:33:36 2012
New Revision: 33795
URL: https://nixos.org/websvn/nix/?rev=33795&sc=1
Log:
games/urbanterror: Fixed compilation issue, but it still doesn't work.
Added:
nixpkgs/trunk/pkgs/games/urbanterror/l_script.patch
Modified:
nixpkgs/trunk/pkgs/games/urbanterror/default.nix
Modified: nixpkgs/trunk/pkgs/games/urbanterror/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/games/urbanterror/default.nix Sun Apr 15 16:23:08
2012 (r33794)
+++ nixpkgs/trunk/pkgs/games/urbanterror/default.nix Sun Apr 15 22:33:36
2012 (r33795)
@@ -10,21 +10,31 @@
url =
"http://ftp.snt.utwente.nl/pub/games/urbanterror/iourbanterror/source/complete/ioUrbanTerrorSource_2007_12_20.zip";
sha256 = "1s1wq9m7shhvvk7s4400yrmz7dys501i4c9ln1mglc9dhmi8dmcn";
};
+ buildInputs = [ unzip SDL mesa openal curl ];
unpackPhase = ''
mkdir urbanterror
cd urbanterror
unzip $src1
unzip $src2
'';
+ patches = [ ./l_script.patch ];
+ patchPhase = ''
+ for d in ioUrbanTerrorClientSource ioUrbanTerrorServerSource
+ do
+ cd "$d"
+ patch -p 0 < "''${patches[0]}"
+ cd ..
+ done
+ '';
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
+ substituteInPlace code/tools/asm/Makefile --replace -Werror ""
cd ..
'';
- buildInputs = [ unzip SDL mesa openal curl ];
buildPhase = ''
for d in ioUrbanTerrorClientSource ioUrbanTerrorServerSource
do
Added: nixpkgs/trunk/pkgs/games/urbanterror/l_script.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/games/urbanterror/l_script.patch Sun Apr 15 22:33:36
2012 (r33795)
@@ -0,0 +1,21 @@
+diff -ur code/botlib/l_script.c kode/botlib/l_script.c
+--- code/botlib/l_script.c 2007-10-09 02:47:26.000000000 +0400
++++ kode/botlib/l_script.c 2012-04-16 02:02:55.170360236 +0400
+@@ -1118,7 +1118,7 @@
+ {
+ if (*string == '\"')
+ {
+- strcpy(string, string+1);
++ memmove(string, string+1, strlen(string) - 1);
+ } //end if
+ if (string[strlen(string)-1] == '\"')
+ {
+@@ -1135,7 +1135,7 @@
+ {
+ if (*string == '\'')
+ {
+- strcpy(string, string+1);
++ memmove(string, string+1, strlen(string) - 1);
+ } //end if
+ if (string[strlen(string)-1] == '\'')
+ {
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits