aboutsummaryrefslogtreecommitdiff
path: root/games/cube
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2009-12-18 02:44:30 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2009-12-18 02:44:30 +0000
commit50cc805efcc9a0286cf0af9ff2d3b8a9c1b0e448 (patch)
treef81020e2eb40dff0d08388721496176a968ee1f3 /games/cube
parent16c510212d15d92b8768bd6faa2f35657becfeb6 (diff)
downloadports-50cc805efcc9a0286cf0af9ff2d3b8a9c1b0e448.tar.gz
ports-50cc805efcc9a0286cf0af9ff2d3b8a9c1b0e448.zip
Notes
Diffstat (limited to 'games/cube')
-rw-r--r--games/cube/Makefile1
-rw-r--r--games/cube/files/patch-serverbrowser.cpp11
-rw-r--r--games/cube/files/patch-serverms.cpp21
3 files changed, 33 insertions, 0 deletions
diff --git a/games/cube/Makefile b/games/cube/Makefile
index 429939818aaa..e7b322d63a51 100644
--- a/games/cube/Makefile
+++ b/games/cube/Makefile
@@ -24,6 +24,7 @@ USE_GMAKE= yes
WRKSRC= ${WRKDIR}/${PORTNAME}_source/src
CFLAGS+= -fsigned-char
ALL_TARGET= #empty
+MALE_JOBS_SAFE= yes
OPTIONS= CLIENT "Build client" on \
DEDICATED "Build dedicated server" on \
diff --git a/games/cube/files/patch-serverbrowser.cpp b/games/cube/files/patch-serverbrowser.cpp
new file mode 100644
index 000000000000..fd4a466b1c44
--- /dev/null
+++ b/games/cube/files/patch-serverbrowser.cpp
@@ -0,0 +1,11 @@
+--- serverbrowser.cpp.orig 2004-05-09 19:20:40.000000000 +0400
++++ serverbrowser.cpp 2009-12-18 05:07:23.000000000 +0300
+@@ -268,7 +268,7 @@
+ {
+ if(pingsock == ENET_SOCKET_NULL)
+ {
+- pingsock = enet_socket_create(ENET_SOCKET_TYPE_DATAGRAM, NULL);
++ pingsock = enet_socket_create(ENET_SOCKET_TYPE_DATAGRAM);
+ resolverinit(1, 1000);
+ };
+ resolverclear();
diff --git a/games/cube/files/patch-serverms.cpp b/games/cube/files/patch-serverms.cpp
new file mode 100644
index 000000000000..2ddb7de46493
--- /dev/null
+++ b/games/cube/files/patch-serverms.cpp
@@ -0,0 +1,21 @@
+--- serverms.cpp.orig 2005-08-11 06:02:46.000000000 +0400
++++ serverms.cpp 2009-12-18 05:09:20.000000000 +0300
+@@ -13,7 +13,7 @@
+ if(ad.host==ENET_HOST_ANY) return;
+ };
+ if(mssock!=ENET_SOCKET_NULL) enet_socket_destroy(mssock);
+- mssock = enet_socket_create(ENET_SOCKET_TYPE_STREAM, NULL);
++ mssock = enet_socket_create(ENET_SOCKET_TYPE_STREAM);
+ if(mssock==ENET_SOCKET_NULL) { printf("could not open socket\n"); return; };
+ if(enet_socket_connect(mssock, &ad)<0) { printf("could not connect\n"); return; };
+ ENetBuffer buf;
+@@ -135,7 +135,8 @@
+ if(listen)
+ {
+ ENetAddress address = { ENET_HOST_ANY, CUBE_SERVINFO_PORT };
+- pongsock = enet_socket_create(ENET_SOCKET_TYPE_DATAGRAM, &address);
++ pongsock = enet_socket_create(ENET_SOCKET_TYPE_DATAGRAM);
+ if(pongsock == ENET_SOCKET_NULL) fatal("could not create server info socket\n");
++ if(enet_socket_bind(pongsock, &address) == -1) fatal("cannot bind server info socket\n");
+ };
+ };