svn commit: r552406 - in head/games/gtkradiant: . files
Alexey Dokuchaev
danfe at FreeBSD.org
Thu Oct 15 11:22:59 UTC 2020
Author: danfe
Date: Thu Oct 15 11:22:57 2020
New Revision: 552406
URL: https://svnweb.freebsd.org/changeset/ports/552406
Log:
Ensure that there is only one variable definition per each object, as
the C (and C++) standards mandated for years and compilers started to
enforce as of recently (Clang 11, GCC 10).
Reported by: pkg-fallout
Added:
head/games/gtkradiant/files/patch-tools__quake2__q2map__qrad.c (contents, props changed)
head/games/gtkradiant/files/patch-tools__quake2__qdata_heretic2__sprites.c (contents, props changed)
head/games/gtkradiant/files/patch-tools__quake3__q3data__q3data.c (contents, props changed)
head/games/gtkradiant/files/patch-tools__quake3__q3map2__q3map2.h (contents, props changed)
Modified:
head/games/gtkradiant/Makefile
Modified: head/games/gtkradiant/Makefile
==============================================================================
--- head/games/gtkradiant/Makefile Thu Oct 15 10:58:30 2020 (r552405)
+++ head/games/gtkradiant/Makefile Thu Oct 15 11:22:57 2020 (r552406)
@@ -59,8 +59,21 @@ post-patch:
# Do not #include <sys/dir.h> header which is deprecated
@${REINPLACE_CMD} -e '/#include/s,<sys/dir,&ent,' \
${WRKSRC}/tools/quake2/qdata/qdata.c
- @${REINPLACE_CMD} -e 's,#ifndef WIN32,#ifdef NeXT,' \
- ${WRKSRC}/tools/quake3/q3data/q3data.c
+# Cope with -fno-common being the default in some new compilers
+ @${REINPLACE_CMD} -e '/\*CalcTextureReflectivity/s,^void,extern &,' \
+ ${WRKSRC}/tools/quake2/q2map/qrad.h
+ @${REINPLACE_CMD} -E 's,^char[[:blank:]]+outbase,extern &,' \
+ ${WRKSRC}/tools/quake2/q2map/qvis.c
+ @${REINPLACE_CMD} -e '/materialtypes/s,^materialtype_t,extern &,' \
+ ${WRKSRC}/tools/quake2/qdata_heretic2/common/qfiles.h
+ @${REINPLACE_CMD} -e '/\*byteimage, \*lbmpalette/,+5d' \
+ ${WRKSRC}/tools/quake2/qdata_heretic2/book.c
+ @${REINPLACE_CMD} -e '/g_frames/s,^frame_t,extern &,' \
+ ${WRKSRC}/tools/quake2/qdata_heretic2/models.c
+ @${REINPLACE_CMD} -e '/verbose;/d' \
+ ${WRKSRC}/tools/quake3/q3map2/q3map2.h
+ @${REINPLACE_CMD} -e '/c_portalskip, c_leafskip/,+1d' \
+ ${WRKSRC}/tools/quake3/q3map2/visflow.c
pre-install:
cd ${WRKSRC} && ${PYTHON_CMD} install.py
Added: head/games/gtkradiant/files/patch-tools__quake2__q2map__qrad.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/gtkradiant/files/patch-tools__quake2__q2map__qrad.c Thu Oct 15 11:22:57 2020 (r552406)
@@ -0,0 +1,27 @@
+--- tools/quake2/q2map/qrad.c.orig 2006-02-10 22:01:20 UTC
++++ tools/quake2/q2map/qrad.c
+@@ -44,7 +44,7 @@
+ vec3_t face_offset[MAX_MAP_FACES]; // for rotating bmodels
+ dplane_t backplanes[MAX_MAP_PLANES];
+
+-char inbase[32], outbase[32];
++extern char inbase[32], outbase[32];
+
+ int fakeplanes; // created planes for origin offset
+
+@@ -64,11 +64,13 @@
+
+ float lightscale = 1.0;
+
+-qboolean glview;
++extern qboolean glview;
+
+ qboolean nopvs;
+
+-char source[1024];
++extern char source[1024];
++
++void (*CalcTextureReflectivity) (void);
+
+ float direct_scale = 0.4;
+ float entity_scale = 1.0;
Added: head/games/gtkradiant/files/patch-tools__quake2__qdata_heretic2__sprites.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/gtkradiant/files/patch-tools__quake2__qdata_heretic2__sprites.c Thu Oct 15 11:22:57 2020 (r552406)
@@ -0,0 +1,27 @@
+--- tools/quake2/qdata_heretic2/sprites.c.orig 2006-02-10 22:01:20 UTC
++++ tools/quake2/qdata_heretic2/sprites.c
+@@ -25,15 +25,8 @@
+ #define MAX_SPRFRAMES MAX_MD2SKINS
+
+ dsprite_t sprite;
+-dsprframe_t frames[MAX_SPRFRAMES];
++extern dsprframe_t frames[MAX_SPRFRAMES];
+
+-byte *byteimage, *lbmpalette;
+-int byteimagewidth, byteimageheight;
+-
+-qboolean TrueColorImage;
+-unsigned *longimage;
+-int longimagewidth, longimageheight;
+-
+ char spritename[1024];
+
+
+@@ -41,7 +34,6 @@
+ void Cmd_Spritename (void);
+
+ char spr_prefix[1024];
+-char pic_prefix[1024];
+
+ extern char *g_outputDir;
+
Added: head/games/gtkradiant/files/patch-tools__quake3__q3data__q3data.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/gtkradiant/files/patch-tools__quake3__q3data__q3data.c Thu Oct 15 11:22:57 2020 (r552406)
@@ -0,0 +1,20 @@
+--- tools/quake3/q3data/q3data.c.orig 2006-02-10 22:01:20 UTC
++++ tools/quake3/q3data/q3data.c
+@@ -37,8 +37,6 @@
+
+ // bogus externs for some TA hacks (common/ using them against q3map)
+ char *moddir = NULL;
+-// some old defined that was in cmdlib lost during merge
+-char writedir[1024];
+
+ #if defined (__linux__) || defined (__APPLE__)
+ #define strlwr strlower
+@@ -341,7 +339,7 @@
+ #else
+
+ #include <sys/types.h>
+-#ifndef WIN32
++#ifdef NeXT
+ #include <sys/dir.h>
+ #else
+ #include <sys/dirent.h>
Added: head/games/gtkradiant/files/patch-tools__quake3__q3map2__q3map2.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/gtkradiant/files/patch-tools__quake3__q3map2__q3map2.h Thu Oct 15 11:22:57 2020 (r552406)
@@ -0,0 +1,13 @@
+--- tools/quake3/q3map2/q3map2.h.orig 2006-02-10 22:01:20 UTC
++++ tools/quake3/q3map2/q3map2.h
+@@ -939,6 +939,10 @@
+ }
+ surfaceType_t;
+
++// Q_EXTERN is defined only later :(
++#ifndef MAIN_C
++extern
++#endif
+ char *surfaceTypes[ NUM_SURFACE_TYPES ]
+ #ifndef MAIN_C
+ ;
More information about the svn-ports-all
mailing list