aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2013-09-12 08:18:03 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2013-09-12 08:18:03 +0800
commit80e446078e1791dbe6d4fd639a41e5f5801d6795 (patch)
tree3ca6a6e6f461cf0e9bb681abf5593429039b1976
parent84bb1beb0df725b5c7bb7c120a32754e3412a1a1 (diff)
downloadfreebsd-ports-gnome-80e446078e1791dbe6d4fd639a41e5f5801d6795.tar.gz
freebsd-ports-gnome-80e446078e1791dbe6d4fd639a41e5f5801d6795.tar.zst
freebsd-ports-gnome-80e446078e1791dbe6d4fd639a41e5f5801d6795.zip
- Fix build with clang
-rw-r--r--games/intensityengine/Makefile1
-rw-r--r--games/intensityengine/files/patch-src-engine-cubeloader.cpp28
2 files changed, 28 insertions, 1 deletions
diff --git a/games/intensityengine/Makefile b/games/intensityengine/Makefile
index 0eaafc30e434..f58e763db689 100644
--- a/games/intensityengine/Makefile
+++ b/games/intensityengine/Makefile
@@ -18,7 +18,6 @@ USE_SDL= sdl mixer image
USE_GL= gl glu
USES= cmake
SUB_FILES= intensity_client
-USE_GCC= 4.2+
ONLY_FOR_ARCHS= i386 amd64
diff --git a/games/intensityengine/files/patch-src-engine-cubeloader.cpp b/games/intensityengine/files/patch-src-engine-cubeloader.cpp
new file mode 100644
index 000000000000..8d403bfed00c
--- /dev/null
+++ b/games/intensityengine/files/patch-src-engine-cubeloader.cpp
@@ -0,0 +1,28 @@
+diff --git src/engine/cubeloader.cpp src/engine/cubeloader.cpp
+index b7a1504..939cc2c 100755
+--- src/engine/cubeloader.cpp
++++ src/engine/cubeloader.cpp
+@@ -259,12 +259,12 @@ struct cubeloader
+ else
+ {
+ conoutf(CON_ERROR, "map %s has malformatted header", cgzname);
+- gzclose(f);
++ delete f;
+ return;
+ }
+ }
+ else if(hdr.version>5) mod = true;
+- if(hdr.version>5 && !mod) { conoutf(CON_ERROR, "map %s requires a newer version of the Cube 1 importer", cgzname); gzclose(f); return; }
++ if(hdr.version>5 && !mod) { conoutf(CON_ERROR, "map %s requires a newer version of the Cube 1 importer", cgzname); delete f; return; }
+ if(!haslocalclients()) game::forceedit("");
+ emptymap(12, true, NULL);
+ freeocta(worldroot);
+@@ -280,7 +280,7 @@ struct cubeloader
+ {
+ hdr.waterlevel = -100000;
+ }
+- if(mod) gzseek(f, hdr.numents*sizeof(c_persistent_entity), SEEK_CUR);
++ if(mod) f->seek(hdr.numents*sizeof(c_persistent_entity), SEEK_CUR);
+ else loopi(hdr.numents)
+ {
+ c_persistent_entity e;