about summary refs log tree commit diff
path: root/pkgs/games/quake3
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-01-04 15:23:47 +0300
committerNikolay Amiantov <ab@fmap.me>2016-01-14 14:41:33 +0300
commit7fc7502db516a54d8104656401f0c2abf90cf781 (patch)
tree1bcd4185fa93bad78d8bbf86e7284c3b767b8013 /pkgs/games/quake3
parenta81b396a2ef082f51eb7fb63ca24353c289682d8 (diff)
ioquake3: 1.36 -> 20151228
Renamed from `quake3game`
Diffstat (limited to 'pkgs/games/quake3')
-rw-r--r--pkgs/games/quake3/game/botlib.patch51
-rw-r--r--pkgs/games/quake3/game/default.nix43
-rw-r--r--pkgs/games/quake3/game/exit.patch12
-rw-r--r--pkgs/games/quake3/ioquake/default.nix38
4 files changed, 38 insertions, 106 deletions
diff --git a/pkgs/games/quake3/game/botlib.patch b/pkgs/games/quake3/game/botlib.patch
deleted file mode 100644
index 82e2c78110129..0000000000000
--- a/pkgs/games/quake3/game/botlib.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-Retrieved from https://bugzilla.icculus.org/show_bug.cgi?id=4331,
-removed path prefix.
-
-  -- nckx <tobias.geerinckx.rice@gmail.com>
-
-PATCH: Bots don't work on 64 bit Intel CPU's
-
-botlib abuses strcpy (source and dest overlap), and the strcpy function for 64
-bit intel CPU's in the latest glibc, does not like this causing the bots to not
-load.
-
-The attached patch fixes this.
-
-Note this patch should be credited to: Andreas Bierfert (andreas.bierfert at
-lowlatency.de)
-
-See: http://bugzilla.redhat.com/show_bug.cgi?id=526338
-
-diff -up quake3-1.36/code/botlib/l_precomp.c~ quake3-1.36/code/botlib/l_precomp.c
---- code/botlib/l_precomp.c~	2009-04-27 08:42:37.000000000 +0200
-+++ code/botlib/l_precomp.c	2009-11-03 21:03:08.000000000 +0100
-@@ -948,7 +948,7 @@ void PC_ConvertPath(char *path)
- 		if ((*ptr == '\\' || *ptr == '/') &&
- 				(*(ptr+1) == '\\' || *(ptr+1) == '/'))
- 		{
--			strcpy(ptr, ptr+1);
-+			memmove(ptr, ptr+1, strlen(ptr));
- 		} //end if
- 		else
- 		{
-diff -up quake3-1.36/code/botlib/l_script.c~ quake3-1.36/code/botlib/l_script.c
---- code/botlib/l_script.c~	2009-04-27 08:42:37.000000000 +0200
-+++ code/botlib/l_script.c	2009-11-03 21:06:11.000000000 +0100
-@@ -1118,7 +1118,7 @@ void StripDoubleQuotes(char *string)
- {
- 	if (*string == '\"')
- 	{
--		strcpy(string, string+1);
-+		memmove(string, string+1, strlen(string));
- 	} //end if
- 	if (string[strlen(string)-1] == '\"')
- 	{
-@@ -1135,7 +1135,7 @@ void StripSingleQuotes(char *string)
- {
- 	if (*string == '\'')
- 	{
--		strcpy(string, string+1);
-+		memmove(string, string+1, strlen(string));
- 	} //end if
- 	if (string[strlen(string)-1] == '\'')
- 	{
diff --git a/pkgs/games/quake3/game/default.nix b/pkgs/games/quake3/game/default.nix
deleted file mode 100644
index 2ad922834d38b..0000000000000
--- a/pkgs/games/quake3/game/default.nix
+++ /dev/null
@@ -1,43 +0,0 @@
-{ lib, stdenv, fetchurl, xlibsWrapper, SDL, mesa, openal, gcc46 }:
-
-stdenv.mkDerivation {
-  name = "ioquake3-1.36";
-
-  src = fetchurl {
-    url = http://ioquake3.org/files/1.36/ioquake3-1.36.tar.bz2; # calls itself "1.34-rc3"
-    sha256 = "008vah60z0n9h1qp373xbqvhwfbyywbbhd1np0h0yw66g0qzchzv";
-  };
-
-  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";
-    })
-
-    # Do an exit() instead of _exit().  This is nice for gcov.
-    # Upstream also seems to do this.
-    ./exit.patch
-
-    # No bots on amd64 without this patch.
-    ./botlib.patch
-  ];
-
-  buildInputs = [ xlibsWrapper SDL mesa openal gcc46 ];
-
-  # Fix building on GCC 4.6.
-  NIX_CFLAGS_COMPILE = "-Wno-error";
-
-  preInstall = ''
-    mkdir -p $out/baseq3
-    installTargets=copyfiles
-    installFlags="COPYDIR=$out"
-  '';
-
-  meta = {
-    platforms = lib.platforms.linux;
-    maintainers = [ lib.maintainers.eelco ];
-  };
-}
diff --git a/pkgs/games/quake3/game/exit.patch b/pkgs/games/quake3/game/exit.patch
deleted file mode 100644
index 82785167a7824..0000000000000
--- a/pkgs/games/quake3/game/exit.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ru -x '*~' ioquake3_1.34-rc3-orig//code/unix/unix_main.c ioquake3_1.34-rc3//code/unix/unix_main.c
---- code/unix/unix_main.c	2006-11-28 23:05:25.000000000 +0100
-+++ code/unix/unix_main.c	2011-01-10 12:43:51.000000000 +0100
-@@ -341,7 +341,7 @@
- void Sys_Exit( int ex ) {
-   Sys_ConsoleInputShutdown();
- 
--#ifdef NDEBUG // regular behavior
-+#if 0
- 
-   // We can't do this 
-   //  as long as GL DLL's keep installing with atexit...
diff --git a/pkgs/games/quake3/ioquake/default.nix b/pkgs/games/quake3/ioquake/default.nix
new file mode 100644
index 0000000000000..f9f4b21546fa4
--- /dev/null
+++ b/pkgs/games/quake3/ioquake/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchgit, xlibsWrapper, SDL2, mesa, openalSoft
+, curl, speex, opusfile, libogg, libopus, libjpeg, mumble, freetype
+}:
+
+stdenv.mkDerivation {
+  name = "ioquake3-git-20151228";
+
+  src = fetchgit {
+    url = "https://github.com/ioquake/ioq3";
+    rev = "fe619680f8fa9794906fc82a9c8c6113770696e6";
+    sha256 = "5462441df63eebee6f8ed19a8326de5f874dad31e124d37f73d3bab1cd656a87";
+  };
+
+  buildInputs = [ xlibsWrapper SDL2 mesa openalSoft curl speex opusfile libogg libopus libjpeg freetype mumble ];
+
+  NIX_CFLAGS_COMPILE = [ "-I${SDL2}/include/SDL2" "-I${opusfile}/include/opus" "-I${libopus}/include/opus" ];
+  NIX_CFLAGS_LINK = [ "-lSDL2" ];
+
+  enableParallelBuilding = true;
+
+  makeFlags = [ "USE_INTERNAL_LIBS=0" "USE_FREETYPE=1" "USE_OPENAL_DLOPEN=0" "USE_CURL_DLOPEN=0" ];
+
+  installTargets = [ "copyfiles" ];
+
+  installFlags = [ "COPYDIR=$(out)" ];
+
+  preInstall = ''
+    mkdir -p $out/baseq3
+  '';
+
+  meta = {
+    homepage = http://ioquake3.org/;
+    description = "First person shooter engine based on the Quake 3: Arena and Quake 3: Team Arena";
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
+    maintainers = [ lib.maintainers.eelco lib.maintainers.abbradar ];
+  };
+}