git.iko.soy/typeable/nixpkgs
on master help sign in
ioquake3: 1.36 -> 20151228

Renamed from `quake3game`

commit7fc7502db516a54d8104656401f0c2abf90cf781 authorNikolay Amiantov <ab@fmap.me> dateMon 4 Jan 2016, 15:23 (11 years ago) parenta81b396
5 files changed+42−109
pkgs/games/quake3/game/botlib.patch−51 pkgs/games/quake3/game/default.nix−43 pkgs/games/quake3/game/exit.patch−12 pkgs/games/quake3/ioquake/default.nix+38 pkgs/top-level/all-packages.nix+4−3
pkgs/games/quake3/game/botlib.patchdeleted−51
@@ -1,51 +0,0 @@
1−Retrieved from https://bugzilla.icculus.org/show_bug.cgi?id=4331,
2−removed path prefix.
3−
4− -- nckx <tobias.geerinckx.rice@gmail.com>
5−
6−PATCH: Bots don't work on 64 bit Intel CPU's
7−
8−botlib abuses strcpy (source and dest overlap), and the strcpy function for 64
9−bit intel CPU's in the latest glibc, does not like this causing the bots to not
10−load.
11−
12−The attached patch fixes this.
13−
14−Note this patch should be credited to: Andreas Bierfert (andreas.bierfert at
15−lowlatency.de)
16−
17−See: http://bugzilla.redhat.com/show_bug.cgi?id=526338
18−
19−diff -up quake3-1.36/code/botlib/l_precomp.c~ quake3-1.36/code/botlib/l_precomp.c
20−--- code/botlib/l_precomp.c~ 2009-04-27 08:42:37.000000000 +0200
21−+++ code/botlib/l_precomp.c 2009-11-03 21:03:08.000000000 +0100
22−@@ -948,7 +948,7 @@ void PC_ConvertPath(char *path)
23− if ((*ptr == '\\' || *ptr == '/') &&
24− (*(ptr+1) == '\\' || *(ptr+1) == '/'))
25− {
26−- strcpy(ptr, ptr+1);
27−+ memmove(ptr, ptr+1, strlen(ptr));
28− } //end if
29− else
30− {
31−diff -up quake3-1.36/code/botlib/l_script.c~ quake3-1.36/code/botlib/l_script.c
32−--- code/botlib/l_script.c~ 2009-04-27 08:42:37.000000000 +0200
33−+++ code/botlib/l_script.c 2009-11-03 21:06:11.000000000 +0100
34−@@ -1118,7 +1118,7 @@ void StripDoubleQuotes(char *string)
35− {
36− if (*string == '\"')
37− {
38−- strcpy(string, string+1);
39−+ memmove(string, string+1, strlen(string));
40− } //end if
41− if (string[strlen(string)-1] == '\"')
42− {
43−@@ -1135,7 +1135,7 @@ void StripSingleQuotes(char *string)
44− {
45− if (*string == '\'')
46− {
47−- strcpy(string, string+1);
48−+ memmove(string, string+1, strlen(string));
49− } //end if
50− if (string[strlen(string)-1] == '\'')
51− {
pkgs/games/quake3/game/default.nixdeleted−43
@@ -1,43 +0,0 @@
1−{ lib, stdenv, fetchurl, xlibsWrapper, SDL, mesa, openal, gcc46 }:
2−
3−stdenv.mkDerivation {
4− name = "ioquake3-1.36";
5−
6− src = fetchurl {
7− url = http://ioquake3.org/files/1.36/ioquake3-1.36.tar.bz2; # calls itself "1.34-rc3"
8− sha256 = "008vah60z0n9h1qp373xbqvhwfbyywbbhd1np0h0yw66g0qzchzv";
9− };
10−
11− patchFlags = "-p0";
12−
13− patches = [
14− # Fix for compiling on gcc 4.2.
15− (fetchurl {
16− url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/games-fps/quake3/files/quake3-1.34_rc3-gcc42.patch?rev=1.1";
17− sha256 = "06c9lxfczcby5q29pim231mr2wdkvbv36xp9zbxp9vk0dfs8rv9x";
18− })
19−
20− # Do an exit() instead of _exit(). This is nice for gcov.
21− # Upstream also seems to do this.
22− ./exit.patch
23−
24− # No bots on amd64 without this patch.
25− ./botlib.patch
26− ];
27−
28− buildInputs = [ xlibsWrapper SDL mesa openal gcc46 ];
29−
30− # Fix building on GCC 4.6.
31− NIX_CFLAGS_COMPILE = "-Wno-error";
32−
33− preInstall = ''
34− mkdir -p $out/baseq3
35− installTargets=copyfiles
36− installFlags="COPYDIR=$out"
37− '';
38−
39− meta = {
40− platforms = lib.platforms.linux;
41− maintainers = [ lib.maintainers.eelco ];
42− };
43−}
pkgs/games/quake3/game/exit.patchdeleted−12
@@ -1,12 +0,0 @@
1−diff -ru -x '*~' ioquake3_1.34-rc3-orig//code/unix/unix_main.c ioquake3_1.34-rc3//code/unix/unix_main.c
2−--- code/unix/unix_main.c 2006-11-28 23:05:25.000000000 +0100
3−+++ code/unix/unix_main.c 2011-01-10 12:43:51.000000000 +0100
4−@@ -341,7 +341,7 @@
5− void Sys_Exit( int ex ) {
6− Sys_ConsoleInputShutdown();
7−
8−-#ifdef NDEBUG // regular behavior
9−+#if 0
10−
11− // We can't do this
12− // as long as GL DLL's keep installing with atexit...
pkgs/games/quake3/ioquake/default.nixnew file+38
@@ -0,0 +1,38 @@
1+{ lib, stdenv, fetchgit, xlibsWrapper, SDL2, mesa, openalSoft
2+, curl, speex, opusfile, libogg, libopus, libjpeg, mumble, freetype
3+}:
4+
5+stdenv.mkDerivation {
6+ name = "ioquake3-git-20151228";
7+
8+ src = fetchgit {
9+ url = "https://github.com/ioquake/ioq3";
10+ rev = "fe619680f8fa9794906fc82a9c8c6113770696e6";
11+ sha256 = "5462441df63eebee6f8ed19a8326de5f874dad31e124d37f73d3bab1cd656a87";
12+ };
13+
14+ buildInputs = [ xlibsWrapper SDL2 mesa openalSoft curl speex opusfile libogg libopus libjpeg freetype mumble ];
15+
16+ NIX_CFLAGS_COMPILE = [ "-I${SDL2}/include/SDL2" "-I${opusfile}/include/opus" "-I${libopus}/include/opus" ];
17+ NIX_CFLAGS_LINK = [ "-lSDL2" ];
18+
19+ enableParallelBuilding = true;
20+
21+ makeFlags = [ "USE_INTERNAL_LIBS=0" "USE_FREETYPE=1" "USE_OPENAL_DLOPEN=0" "USE_CURL_DLOPEN=0" ];
22+
23+ installTargets = [ "copyfiles" ];
24+
25+ installFlags = [ "COPYDIR=$(out)" ];
26+
27+ preInstall = ''
28+ mkdir -p $out/baseq3
29+ '';
30+
31+ meta = {
32+ homepage = http://ioquake3.org/;
33+ description = "First person shooter engine based on the Quake 3: Arena and Quake 3: Team Arena";
34+ license = lib.licenses.gpl2;
35+ platforms = lib.platforms.linux;
36+ maintainers = [ lib.maintainers.eelco lib.maintainers.abbradar ];
37+ };
38+}
pkgs/top-level/all-packages.nix+4−3
@@ -14257,15 +14257,15 @@ let
1425714257 qqwing = callPackage ../games/qqwing { };
1425814258
1425914259 quake3demo = callPackage ../games/quake3/wrapper {
14260− name = "quake3-demo-${quake3game.name}";
14260+ name = "quake3-demo-${ioquake3.name}";
1426114261 description = "Demo of Quake 3 Arena, a classic first-person shooter";
14262− game = quake3game;
14262+ game = ioquake3;
1426314263 paks = [quake3demodata];
1426414264 };
1426514265
1426614266 quake3demodata = callPackage ../games/quake3/demo { };
1426714267
14268− quake3game = callPackage ../games/quake3/game { };
14268+ ioquake3 = callPackage ../games/quake3/ioquake { };
1426914269
1427014270 quantumminigolf = callPackage ../games/quantumminigolf {};
1427114271
@@ -15906,6 +15906,7 @@ aliases = with self; rec {
1590615906 saneFrontends = sane-frontends; # added 2016-01-02
1590715907 btrfsProgs = btrfs-progs; # added 2016-01-03
1590815908 aircrackng = aircrack-ng; # added 2016-01-14
15909+ quake3game = ioquake3; # added 2016-01-14
1590915910};
1591015911
1591115912tweakAlias = _n: alias: with lib;