View | Details | Raw Unified | Return to bug 269505
Collapse All | Expand All

(-)b/games/assaultcube/Makefile (-28 / +15 lines)
Lines 1-12 Link Here
1
PORTNAME=	assaultcube
1
PORTNAME=	assaultcube
2
PORTVERSION=	1.2.0.2
2
PORTVERSION=	1.3.0.2
3
PORTREVISION=	7
4
CATEGORIES=	games
3
CATEGORIES=	games
5
MASTER_SITES=	SF/actiongame/AssaultCube%20Version%20${PORTVERSION}
6
DISTNAME=	AssaultCube_v${PORTVERSION}
7
4
8
MAINTAINER=	ports@FreeBSD.org
5
MAINTAINER=	kevinz5000@gmail.com
9
COMMENT=	Total conversion of the FPS game called Cube
6
COMMENT=	Free, multiplayer, first-person shooter game based on the CUBE engine
10
WWW=		https://assault.cubers.net/
7
WWW=		https://assault.cubers.net/
11
8
12
LICENSE=	ACUBE CUBE MIT OTHER
9
LICENSE=	ACUBE CUBE MIT OTHER
Lines 22-50 LICENSE_PERMS_CUBE= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept Link Here
22
LICENSE_PERMS_OTHER=	dist-mirror pkg-mirror auto-accept
19
LICENSE_PERMS_OTHER=	dist-mirror pkg-mirror auto-accept
23
20
24
USES=		gmake tar:bzip2
21
USES=		gmake tar:bzip2
22
23
USE_GITHUB=	yes
24
GH_ACCOUNT=	assaultcube
25
GH_PROJECT=	AC
26
GH_TAGNAME=	v1.3.0.2
27
25
LDFLAGS_i386=	-Wl,-znotext
28
LDFLAGS_i386=	-Wl,-znotext
26
WRKSRC=		${WRKDIR}/AssaultCube_v${PORTVERSION}
27
BUILD_WRKSRC=	${WRKSRC}/source/src
29
BUILD_WRKSRC=	${WRKSRC}/source/src
28
SUB_FILES=	${PLIST_FILES:Mbin/*:T}
30
SUB_FILES=	${PLIST_FILES:Mbin/*:T}
29
31
30
PORTDATA=	config packages scripts
32
PORTDATA=	config packages
31
PORTDOCS=	*
32
PLIST_DIRS=	${DATADIR}/packages/maps/servermaps/incoming
33
PLIST_DIRS=	${DATADIR}/packages/maps/servermaps/incoming
33
34
34
OPTIONS_DEFINE=	DOCS PORT_ENET
35
OPTIONS_MULTI=	BUILD
35
OPTIONS_MULTI=	BUILD
36
OPTIONS_MULTI_BUILD=	CLIENT DEDICATED MASTER
36
OPTIONS_MULTI_BUILD=	CLIENT DEDICATED #MASTER is currently broken
37
OPTIONS_DEFAULT=	CLIENT DEDICATED
37
OPTIONS_DEFAULT=	CLIENT DEDICATED
38
38
39
CLIENT_DESC=	Build client
39
CLIENT_DESC=	Build client
40
CLIENT_USES=		compiler:c++11-lang gettext-runtime gl openal:al sdl \
40
CLIENT_USES=		compiler:c++11-lang desktop-file-utils gettext-runtime gl openal:al sdl \
41
			xorg
41
			xorg
42
CLIENT_USE=		GL=gl SDL=image,sdl XORG=x11
42
CLIENT_USE=		GL=gl SDL=sdl2,image2 XORG=x11
43
CLIENT_LIB_DEPENDS=	libvorbisfile.so:audio/libvorbis \
43
CLIENT_LIB_DEPENDS=	libvorbisfile.so:audio/libvorbis \
44
			libcurl.so:ftp/curl
44
			libcurl.so:ftp/curl
45
CLIENT_ALL_TARGET=	client
45
CLIENT_ALL_TARGET=	client
46
CLIENT_DESKTOP_ENTRIES=	"AssaultCube" "${COMMENT}" \
46
CLIENT_DESKTOP_ENTRIES=	"AssaultCube" "${COMMENT}" \
47
	"${PREFIX}/share/pixmaps/${PORTNAME}.png" "${PORTNAME}_client" \
47
	"${PORTNAME}" "${PORTNAME}_client" \
48
	"Game;" false
48
	"Game;" false
49
CLIENT_PLIST_FILES=	bin/${PORTNAME}_client libexec/${PORTNAME}_client \
49
CLIENT_PLIST_FILES=	bin/${PORTNAME}_client libexec/${PORTNAME}_client \
50
			share/pixmaps/${PORTNAME}.png
50
			share/pixmaps/${PORTNAME}.png
Lines 54-63 DEDICATED_PLIST_FILES= bin/${PORTNAME}_server libexec/${PORTNAME}_server Link Here
54
MASTER_DESC=	Build master server
54
MASTER_DESC=	Build master server
55
MASTER_ALL_TARGET=	master
55
MASTER_ALL_TARGET=	master
56
MASTER_PLIST_FILES=	bin/${PORTNAME}_master libexec/${PORTNAME}_master
56
MASTER_PLIST_FILES=	bin/${PORTNAME}_master libexec/${PORTNAME}_master
57
PORT_ENET_DESC=	Use libenet from net/enet
58
PORT_ENET_CONFIGURE_OFF=	--enable-shared=no --enable-static=yes
59
PORT_ENET_LIB_DEPENDS=	libenet.so:net/enet
60
PORT_ENET_VARS_OFF=	GNU_CONFIGURE=yes CONFIGURE_WRKSRC="${WRKSRC}/source/enet"
61
57
62
post-patch: .SILENT
58
post-patch: .SILENT
63
	${REINPLACE_CMD} -e '/^CXXFLAGS=/d ; /^CXX=/d ; /^CLIENT_PCH/d ; \
59
	${REINPLACE_CMD} -e '/^CXXFLAGS=/d ; /^CXX=/d ; /^CLIENT_PCH/d ; \
Lines 69-88 post-patch: .SILENT Link Here
69
		/^SERVER_LIBS=/s|$$| $$(LDFLAGS) -L$$(LOCALBASE)/lib|' \
65
		/^SERVER_LIBS=/s|$$| $$(LDFLAGS) -L$$(LOCALBASE)/lib|' \
70
		${BUILD_WRKSRC}/Makefile
66
		${BUILD_WRKSRC}/Makefile
71
67
72
post-patch-PORT_ENET-on:
73
	@${REINPLACE_CMD} -i '.port_enet.bak' -e 's/libenet // ; \
74
		s|-I\.\./enet/include|| ; \
75
		s|-L\.\./enet/\.libs||' \
76
		${BUILD_WRKSRC}/Makefile
77
78
do-install:
68
do-install:
79
	(cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDATA}" ${STAGEDIR}${DATADIR})
69
	(cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDATA}" ${STAGEDIR}${DATADIR})
80
70
81
do-install-DOCS-on:
82
	(cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
83
84
do-install-CLIENT-on:
71
do-install-CLIENT-on:
85
	${INSTALL_DATA} ${WRKSRC}/docs/images/icon.png \
72
	${INSTALL_DATA} ${WRKSRC}/packages/misc/icon.png \
86
		${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png
73
		${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png
87
74
88
.for f in client master server
75
.for f in client master server
(-)b/games/assaultcube/distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (AssaultCube_v1.2.0.2.tar.bz2) = 77ac41bdf07f6d74367e29089c2ee34da5ef53fdf979d7dfad58c3edce5f0717
1
TIMESTAMP = 1676156238
2
SIZE (AssaultCube_v1.2.0.2.tar.bz2) = 52975325
2
SHA256 (assaultcube-AC-1.3.0.2-v1.3.0.2_GH0.tar.gz) = 05f21db1f20ee5cc8f83c2cd4e8746f16224654343959f29a4902859479e2dec
3
SIZE (assaultcube-AC-1.3.0.2-v1.3.0.2_GH0.tar.gz) = 51034819
(-)a/games/assaultcube/files/patch-fixes-for-GCC-and-Clang.diff (-259 lines)
Removed Link Here
1
# Origin: https://github.com/assaultcube/AC/commit/6e4b23734f115888ce73907a85739ec833a333fd
2
# Subject: fix clang warnings
3
# Origin: https://github.com/assaultcube/AC/commit/752950989b4e286459ca9aee3d61a868d7b20fa4
4
# Subject: fix some errors and warnings for GCC 6
5
6
--- source/src/bot/bot_waypoint.cpp.orig	2013-11-10 18:50:03 UTC
7
+++ source/src/bot/bot_waypoint.cpp
8
@@ -848,7 +848,7 @@ void CWaypointClass::DeleteWaypoint(vec 
9
 
10
      if (!pWP)
11
      {
12
-          conoutf("Error: CouldnĀ“t find near waypoint");
13
+          conoutf("Error: Couldn't find near waypoint");
14
           return;
15
      }
16
 
17
@@ -1221,7 +1221,7 @@ void CWaypointClass::CalcCost(node_s *pN
18
                     flCost += (1.0f-flFraction)*0.5f;
19
                }
20
 
21
-               if ((abs(a) > 4) || (abs(b) > 4)) continue;
22
+               if ((iabs(a) > 4) || (iabs(b) > 4)) continue;
23
 
24
                vec from = to;
25
                to.z -= (JUMP_HEIGHT - 1.0f);
26
@@ -1249,7 +1249,7 @@ void CWaypointClass::CalcCost(node_s *pN
27
                     flCost += (1.0f-flFraction)*0.5f;
28
                }
29
 
30
-               if ((abs(a) > 4) || (abs(b) > 4)) continue;
31
+               if ((iabs(a) > 4) || (iabs(b) > 4)) continue;
32
 
33
                vec from = to;
34
                to.z -= (JUMP_HEIGHT - 1.0f);
35
@@ -1671,12 +1671,12 @@ node_s *CWaypointClass::GetNearestTrigge
36
 void CWaypointClass::GetNodeIndexes(const vec &v_origin, short *i, short *j)
37
 {
38
      // Function code by cheesy and PMB
39
-     //*i = abs((int)((int)(v_origin.x + (2*ssize)) / SECTOR_SIZE));
40
-     //*j = abs((int)((int)(v_origin.y + (2*ssize)) / SECTOR_SIZE));
41
+     //*i = iabs((int)((int)(v_origin.x + (2*ssize)) / SECTOR_SIZE));
42
+     //*j = iabs((int)((int)(v_origin.y + (2*ssize)) / SECTOR_SIZE));
43
      //*i = (int)((v_origin.x) / ssize * MAX_MAP_GRIDS);
44
      //*j = (int)((v_origin.y) / ssize * MAX_MAP_GRIDS);
45
-     *i = abs((int)((v_origin.x) / MAX_MAP_GRIDS));
46
-     *j = abs((int)((v_origin.y) / MAX_MAP_GRIDS));
47
+     *i = iabs((int)((v_origin.x) / MAX_MAP_GRIDS));
48
+     *j = iabs((int)((v_origin.y) / MAX_MAP_GRIDS));
49
 
50
      if (*i > MAX_MAP_GRIDS - 1)
51
           *i = MAX_MAP_GRIDS - 1;
52
--- source/src/command.cpp.orig	2013-11-09 18:48:58 UTC
53
+++ source/src/command.cpp
54
@@ -497,7 +497,7 @@ char *executeret(const char *p)         
55
             if(lc<=seer_t1.length())
56
             {
57
                 int dt = seer_t1[seer_index] - seer_t1[lc];
58
-                if(abs(dt)<2)
59
+                if(iabs(dt)<2)
60
                 {
61
                     conoutf("SCRIPT EXECUTION warning [%d:%s]", &p, p);
62
                     seer_t2.add(seer_t1[seer_index]);
63
--- source/src/command.h.orig	2013-10-22 18:57:19 UTC
64
+++ source/src/command.h
65
@@ -86,6 +86,7 @@ enum { IEXC_CORE = 0, IEXC_CFG, IEXC_PRO
66
 #define VARNP(name, global, min, cur, max) int global = variable(#name, min, cur, max, &global, NULL, true)
67
 #define VARF(name, min, cur, max, body)  extern int name; void var_##name() { body; } int name = variable(#name, min, cur, max, &name, var_##name, false)
68
 #define VARFP(name, min, cur, max, body) extern int name; void var_##name() { body; } int name = variable(#name, min, cur, max, &name, var_##name, true)
69
+#define VARNFP(name, global, min, cur, max, body) extern int global; void var_##name() { body; } int global = variable(#name, min, cur, max, &global, var_##name, true)
70
 
71
 #define FVARP(name, min, cur, max) float name = fvariable(#name, min, cur, max, &name, NULL, true)
72
 #define FVAR(name, min, cur, max)  float name = fvariable(#name, min, cur, max, &name, NULL, false)
73
--- source/src/crypto.cpp.orig	2013-10-09 08:27:37 UTC
74
+++ source/src/crypto.cpp
75
@@ -763,7 +763,7 @@ bool hashstring(const char *str, char *r
76
 const char *genpwdhash(const char *name, const char *pwd, int salt)
77
 {
78
     static string temp;
79
-    formatstring(temp)("%s %d %s %s %d", pwd, salt, name, pwd, abs(PROTOCOL_VERSION));
80
+    formatstring(temp)("%s %d %s %s %d", pwd, salt, name, pwd, iabs(PROTOCOL_VERSION));
81
     tiger::hashval hash;
82
     tiger::hash((uchar *)temp, (int)strlen(temp), hash);
83
     formatstring(temp)("%llx %llx %llx", hash.chunks[0], hash.chunks[1], hash.chunks[2]);
84
--- source/src/editing.cpp.orig	2013-10-22 18:57:16 UTC
85
+++ source/src/editing.cpp
86
@@ -126,11 +126,11 @@ void checkselections()
87
 void makesel(bool isnew)
88
 {
89
     block &cursel = sels.last(); //RR 10/12/12 - FIXEME, error checking should happen with "isnew", not here checking if it really is new.
90
-    if(isnew || sels.length() == 0) addselection(min(lastx, cx), min(lasty, cy), abs(lastx-cx)+1, abs(lasty-cy)+1, max(lasth, ch));
91
+    if(isnew || sels.length() == 0) addselection(min(lastx, cx), min(lasty, cy), iabs(lastx-cx)+1, iabs(lasty-cy)+1, max(lasth, ch));
92
     else
93
     {
94
         cursel.x = min(lastx, cx); cursel.y = min(lasty, cy);
95
-        cursel.xs = abs(lastx-cx)+1; cursel.ys = abs(lasty-cy)+1;
96
+        cursel.xs = iabs(lastx-cx)+1; cursel.ys = iabs(lasty-cy)+1;
97
         cursel.h = max(lasth, ch);
98
         correctsel(cursel);
99
     }
100
@@ -645,7 +645,7 @@ void movemap(int xo, int yo, int zo) // 
101
     }
102
     if(xo || yo)
103
     {
104
-        block b = { max(-xo, 0), max(-yo, 0), ssize - abs(xo), ssize - abs(yo) }, *cp = blockcopy(b);
105
+        block b = { max(-xo, 0), max(-yo, 0), ssize - iabs(xo), ssize - iabs(yo) }, *cp = blockcopy(b);
106
         cp->x = max(xo, 0);
107
         cp->y = max(yo, 0);
108
         blockpaste(*cp);
109
--- source/src/entity.h.orig	2013-10-22 18:57:16 UTC
110
+++ source/src/entity.h
111
@@ -540,7 +540,7 @@ public:
112
     {
113
         const int maxskin[2] = { 4, 6 };
114
         t = team_base(t < 0 ? team : t);
115
-        nextskin[t] = abs(s) % maxskin[t];
116
+        nextskin[t] = iabs(s) % maxskin[t];
117
     }
118
 };
119
 
120
--- source/src/main.cpp.orig	2013-10-29 09:33:15 UTC
121
+++ source/src/main.cpp
122
@@ -513,11 +513,11 @@ void setresdata(char *s, enet_uint32 c)
123
 COMMANDF(screenres, "ii", (int *w, int *h) { screenres(*w, *h); });
124
 
125
 static int curgamma = 100;
126
-VARFP(gamma, 30, 100, 300,
127
+VARNFP(gamma, vgamma, 30, 100, 300,
128
 {
129
-    if(gamma == curgamma) return;
130
-    curgamma = gamma;
131
-    float f = gamma/100.0f;
132
+    if(vgamma == curgamma) return;
133
+    curgamma = vgamma;
134
+    float f = vgamma/100.0f;
135
     if(SDL_SetGamma(f,f,f)==-1) conoutf("Could not set gamma: %s", SDL_GetError());
136
 });
137
 
138
--- source/src/platform.h.orig	2013-10-22 18:57:19 UTC
139
+++ source/src/platform.h
140
@@ -2,14 +2,6 @@
141
     #ifdef _FORTIFY_SOURCE
142
         #undef _FORTIFY_SOURCE
143
     #endif
144
-
145
-    #define gamma __gamma
146
-#endif
147
-
148
-#include <math.h>
149
-
150
-#ifdef __GNUC__
151
-    #undef gamma
152
 #endif
153
 
154
 #include <string.h>
155
@@ -19,6 +11,7 @@
156
 #include <ctype.h>
157
 #include <time.h>
158
 #include <limits.h>
159
+#include <math.h>
160
 #ifdef __GNUC__
161
     #include <new>
162
     #include <signal.h>
163
--- source/src/rendercubes.cpp.orig	2013-10-22 18:57:16 UTC
164
+++ source/src/rendercubes.cpp
165
@@ -202,9 +202,9 @@ void render_flat(int wtex, int x, int y,
166
     else        // continue strip
167
     {
168
         int lighterr = lighterror*2;
169
-        if((abs(ol1r-l3->r)<lighterr && abs(ol2r-l4->r)<lighterr        // skip vertices if light values are close enough
170
-        &&  abs(ol1g-l3->g)<lighterr && abs(ol2g-l4->g)<lighterr
171
-        &&  abs(ol1b-l3->b)<lighterr && abs(ol2b-l4->b)<lighterr) || !wtex)
172
+        if((iabs(ol1r-l3->r)<lighterr && iabs(ol2r-l4->r)<lighterr        // skip vertices if light values are close enough
173
+        &&  iabs(ol1g-l3->g)<lighterr && iabs(ol2g-l4->g)<lighterr
174
+        &&  iabs(ol1b-l3->b)<lighterr && iabs(ol2b-l4->b)<lighterr) || !wtex)
175
         {
176
             verts.setsize(verts.length()-2);
177
             nquads--;
178
@@ -361,7 +361,7 @@ void render_square(int wtex, float floor
179
     {
180
         int lighterr = lighterror*2;
181
         if((!hf && !ohf)
182
-        && ((abs(ol1r-l2->r)<lighterr && abs(ol1g-l2->g)<lighterr && abs(ol1b-l2->b)<lighterr) || !wtex))       // skip vertices if light values are close enough
183
+        && ((iabs(ol1r-l2->r)<lighterr && iabs(ol1g-l2->g)<lighterr && iabs(ol1b-l2->b)<lighterr) || !wtex))       // skip vertices if light values are close enough
184
         {
185
             verts.setsize(verts.length()-2);
186
             nquads--;
187
--- source/src/rendertext.cpp.orig	2013-10-22 18:57:16 UTC
188
+++ source/src/rendertext.cpp
189
@@ -330,7 +330,7 @@ static void text_color(char c, char *sta
190
         if(c=='r') c = stack[(sp > 0) ? --sp : sp]; // restore color
191
         else if(c == 'b') { if(allowblinkingtext && !ignoreblinkingbit) stack[sp] *= -1; } // blinking text - only if allowed
192
         else stack[sp] = c;
193
-        switch(abs(stack[sp]))
194
+        switch(iabs(stack[sp]))
195
         {
196
             case '0': color = bvec( 2,  255,  128 ); break;   // green: player talk
197
             case '1': color = bvec( 96,  160, 255 ); break;   // blue: team chat
198
@@ -380,7 +380,7 @@ static void text_color(char c, char *sta
199
             //default: color = bvec( 255, 255, 255 ); break;
200
         }
201
         int b = (int) (sinf(lastmillis / 200.0f) * 115.0f);
202
-        b = stack[sp] > 0 ? 100 : min(abs(b), 100);
203
+        b = stack[sp] > 0 ? 100 : min(iabs(b), 100);
204
         glColor4ub(color.x, color.y, color.z, (a * b) / 100);
205
     }
206
 }
207
--- source/src/tools.h.orig	2013-10-22 18:57:19 UTC
208
+++ source/src/tools.h
209
@@ -54,8 +54,7 @@ static inline T min(T a, T b)
210
 {
211
     return a < b ? a : b;
212
 }
213
-
214
-static inline float round(float x) { return floor(x + 0.5f); }
215
+inline int iabs(int n) { return labs(n); }
216
 
217
 #define clamp(a,b,c) (max(b, min(a, c)))
218
 #define rnd(x) ((int)(randomMT()&0xFFFFFF)%(x))
219
--- source/src/world.cpp.orig	2013-10-22 18:57:19 UTC
220
+++ source/src/world.cpp
221
@@ -79,9 +79,9 @@ void remip(const block &b, int level)
222
                 || o[i]->ceil!=o[3]->ceil
223
                 || o[i]->ftex!=o[3]->ftex
224
                 || o[i]->ctex!=o[3]->ctex
225
-                || abs(o[i+1]->r-o[0]->r)>lighterr          // perfect mip even if light is not exactly equal
226
-                || abs(o[i+1]->g-o[0]->g)>lighterr
227
-                || abs(o[i+1]->b-o[0]->b)>lighterr
228
+                || iabs(o[i+1]->r-o[0]->r)>lighterr          // perfect mip even if light is not exactly equal
229
+                || iabs(o[i+1]->g-o[0]->g)>lighterr
230
+                || iabs(o[i+1]->b-o[0]->b)>lighterr
231
                 || o[i]->utex!=o[3]->utex
232
                 || o[i]->wtex!=o[3]->wtex) goto c;
233
             }
234
--- source/src/worldrender.cpp.orig	2013-10-09 08:27:37 UTC
235
+++ source/src/worldrender.cpp
236
@@ -270,10 +270,10 @@ void distlod(int &low, int &high, int an
237
 void render_world(float vx, float vy, float vh, float changelod, int yaw, int pitch, float fov, float fovy, int w, int h)
238
 {
239
     loopi(LARGEST_FACTOR) stats[i] = 0;
240
-    min_lod = minimap || (player1->isspectating() && player1->spectatemode == SM_OVERVIEW) ? MAX_LOD : MIN_LOD+abs(pitch)/12;
241
+    min_lod = minimap || (player1->isspectating() && player1->spectatemode == SM_OVERVIEW) ? MAX_LOD : MIN_LOD+iabs(pitch)/12;
242
     yaw = 360-yaw;
243
     float widef = fov/75.0f;
244
-    int cdist = abs(yaw%90-45);
245
+    int cdist = iabs(yaw%90-45);
246
     if(cdist<7)    // hack to avoid popup at high fovs at 45 yaw
247
     {
248
         min_lod = max(min_lod, (int)(MIN_LOD+(10-cdist)/1.0f*widef)); // less if lod worked better
249
--- source/src/zip.cpp.orig	2013-10-22 18:57:19 UTC
250
+++ source/src/zip.cpp
251
@@ -550,7 +550,7 @@ struct zipstream : stream
252
 bool extractzipfile(ziparchive *a, zipfile *f, const char *name)
253
 {
254
     zipstream *s = new zipstream;
255
-    FILE *target;
256
+    FILE *target = NULL;
257
     defformatstring(fname)("%s", findfile(name, "wb"));
258
     preparedir(fname);
259
     bool error = false;
(-)a/games/assaultcube/files/patch-source_enet_unix.c (-20 lines)
Removed Link Here
1
--- source/enet/unix.c.orig	2013-10-22 18:57:22 UTC
2
+++ source/enet/unix.c
3
@@ -97,7 +97,7 @@ enet_address_set_host (ENetAddress * add
4
     char buffer [2048];
5
     int errnum;
6
 
7
-#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
8
+#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
9
     gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum);
10
 #else
11
     hostEntry = gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & errnum);
12
@@ -150,7 +150,7 @@ enet_address_get_host (const ENetAddress
13
 
14
     in.s_addr = address -> host;
15
 
16
-#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
17
+#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
18
     gethostbyaddr_r ((char *) & in, sizeof (struct in_addr), AF_INET, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum);
19
 #else
20
     hostEntry = gethostbyaddr_r ((char *) & in, sizeof (struct in_addr), AF_INET, & hostData, buffer, sizeof (buffer), & errnum);
(-)a/games/assaultcube/files/patch-source_src_console.h (-17 lines)
Removed Link Here
1
--- source/src/console.h.orig	2013-10-09 08:27:31 UTC
2
+++ source/src/console.h
3
@@ -127,7 +127,7 @@
4
     }
5
 };
6
 
7
-/** WIP ALERT */
8
+/** WIP ALERT *//*
9
 struct textinputbuffer_wip
10
 {
11
     string buf;
12
@@ -257,4 +257,4 @@
13
         return false;
14
     }
15
 };
16
-
17
+*/
(-)a/games/assaultcube/files/patch-source_src_master.cpp (-12 lines)
Removed Link Here
1
--- source/src/master.cpp.orig	2013-10-09 08:27:37 UTC
2
+++ source/src/master.cpp
3
@@ -510,7 +510,7 @@
4
     authreq &a = c.authreqs.add();
5
     a.reqtime = servtime;
6
     a.id = id;
7
-    uint seed[3] = { starttime, servtime, randomMT() };
8
+    uint seed[3] = { (uint)starttime, servtime, randomMT() };
9
     static vector<char> buf;
10
     buf.setsize(0);
11
     a.answer = genchallenge(u->pubkey, seed, sizeof(seed), buf);
12
- 

Return to bug 269505