diff options
author | pav <pav@FreeBSD.org> | 2004-01-08 18:51:16 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2004-01-08 18:51:16 +0800 |
commit | b475a2869fb6b6df2069b976f7f85d2f532060bb (patch) | |
tree | 301f27aa23e365a862d9fcabc4dca36d684ad3ce /games/mythserver | |
parent | 05c2e1053aa925126457efe48ca179630250f489 (diff) | |
download | freebsd-ports-gnome-b475a2869fb6b6df2069b976f7f85d2f532060bb.tar.gz freebsd-ports-gnome-b475a2869fb6b6df2069b976f7f85d2f532060bb.tar.zst freebsd-ports-gnome-b475a2869fb6b6df2069b976f7f85d2f532060bb.zip |
- Fix build on 5.x
PR: ports/61022
Submitted by: Ulrich Spoerlein <q@uni.de>
Diffstat (limited to 'games/mythserver')
-rw-r--r-- | games/mythserver/Makefile | 8 | ||||
-rw-r--r-- | games/mythserver/files/patch-Makefile | 37 | ||||
-rw-r--r-- | games/mythserver/files/patch-common::game_search_packets.c | 12 | ||||
-rw-r--r-- | games/mythserver/files/patch-common::metaserver_packets.h | 19 | ||||
-rw-r--r-- | games/mythserver/files/patch-common::network_queues.c | 33 | ||||
-rw-r--r-- | games/mythserver/files/patch-common::room_packets.h | 26 | ||||
-rw-r--r-- | games/mythserver/files/patch-game_search_new::game_search_server.c | 39 | ||||
-rw-r--r-- | games/mythserver/files/patch-game_search_new::games_list.c | 10 | ||||
-rw-r--r-- | games/mythserver/files/patch-room_new::roomd_new.c | 18 | ||||
-rw-r--r-- | games/mythserver/files/patch-room_new::server_code.c | 12 | ||||
-rw-r--r-- | games/mythserver/files/patch-users_new::main.c | 20 | ||||
-rw-r--r-- | games/mythserver/files/patch-users_new::orders.c | 24 | ||||
-rw-r--r-- | games/mythserver/files/patch-users_new::users.c | 24 |
13 files changed, 262 insertions, 20 deletions
diff --git a/games/mythserver/Makefile b/games/mythserver/Makefile index 43a4db1f1d5f..873a015d6957 100644 --- a/games/mythserver/Makefile +++ b/games/mythserver/Makefile @@ -18,12 +18,6 @@ USE_ZIP= yes USE_GMAKE= yes WRKSRC= ${WRKDIR}/metaserver2open/spaghetti -.include <bsd.port.pre.mk> - -.if ${OSVERSION} >= 501000 -BROKEN= "Does not compile on FreeBSD ${OSVERSION}" -.endif - pre-everything:: @${ECHO_CMD} "#############################################" @${ECHO_CMD} " IMPORTANT!" @@ -43,4 +37,4 @@ do-install: @${TOUCH} ${PREFIX}/share/${PORTNAME}/db/orders.dat @${TOUCH} ${PREFIX}/share/${PORTNAME}/db/users.dat -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/games/mythserver/files/patch-Makefile b/games/mythserver/files/patch-Makefile new file mode 100644 index 000000000000..fa7bcb3cbddc --- /dev/null +++ b/games/mythserver/files/patch-Makefile @@ -0,0 +1,37 @@ +--- build_settings.txt.orig Wed Jan 7 16:45:59 2004 ++++ build_settings.txt Wed Jan 7 16:47:33 2004 +@@ -5,8 +5,8 @@ + # build settings
+
+ ####### compiler settings
+-CPP = g++
+-CC = gcc
++CXX?= g++
++CC?= gcc
+
+ # compiler flags
+ # -g generate extra debugging info
+@@ -18,14 +18,12 @@ + # -D RUNNING_LOCALLY set if testing on the localhost
+
+ # Note: you will get a *ton* of warnings, don't be alarmed :O)
+-CFLAGS = \
+- -O2 \
+- -Wall \
++CFLAGS+= \
+ -D BN2_FULLVERSION \
+ -D HARDCODE_USERD_SETTINGS
+
+ ####### linker settings
+-LINK = gcc
++LINK?= ${CC}
+ LFLAGS =
+
+ ####### Implicit rules
+@@ -36,5 +34,5 @@ + $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
+
+ .cpp.o:
+- $(CPP) -c $(CFLAGS) $(INCPATH) -o $@ $<
++ $(CXX) -c $(CFLAGS) $(INCPATH) -o $@ $<
+
diff --git a/games/mythserver/files/patch-common::game_search_packets.c b/games/mythserver/files/patch-common::game_search_packets.c new file mode 100644 index 000000000000..ea39eff07400 --- /dev/null +++ b/games/mythserver/files/patch-common::game_search_packets.c @@ -0,0 +1,12 @@ +--- common/game_search_packets.c.orig Wed Jan 7 16:16:05 2004 ++++ common/game_search_packets.c Wed Jan 7 16:18:38 2004 +@@ -3,6 +3,9 @@ + Copyright (c) 1997-2002 Bungie Studios
+ Refer to the file "License.txt" for details
+ */
++#include <string.h>
++#include <sys/types.h>
++#include <sys/socket.h>
+
+ #include "cseries.h"
+ #include "byte_swapping.h"
diff --git a/games/mythserver/files/patch-common::metaserver_packets.h b/games/mythserver/files/patch-common::metaserver_packets.h new file mode 100644 index 000000000000..07091bbd26ae --- /dev/null +++ b/games/mythserver/files/patch-common::metaserver_packets.h @@ -0,0 +1,19 @@ +--- common/metaserver_packets.h.orig Wed Jan 7 16:30:43 2004 ++++ common/metaserver_packets.h Wed Jan 7 16:34:45 2004 +@@ -296,6 +296,7 @@ + short add_player_data_to_search_packet(char *buffer, long room_id, struct metaserver_player_aux_data
+ *player_aux_data, void *player_data);
+
++short start_building_game_list_pref_packet(char * buffer);
+ short start_building_game_list_packet(char *buffer);
+ short add_game_data_to_packet(char *buffer, struct metaserver_game_aux_data *aux_data,
+ void *game_data, short game_data_length);
+@@ -321,7 +322,7 @@ + short build_send_versions_packet(char *buffer);
+ short build_update_info_packet(char * buffer, long size, long host, short port);
+ short build_update_player_buddy_list_packet(char * buffer, struct buddy_entry * buddies);
+-short build_update_order_member_list_packet(char * buffer, long member_count, struct order_member * members);
++short build_order_member_list_packet(char * buffer, long member_count, struct order_member * members);
+ short build_you_just_got_blammed_sucka_packet(char * buffer, char * message);
+
+ /* -------- client packets */
diff --git a/games/mythserver/files/patch-common::network_queues.c b/games/mythserver/files/patch-common::network_queues.c new file mode 100644 index 000000000000..ebf2a6093bb8 --- /dev/null +++ b/games/mythserver/files/patch-common::network_queues.c @@ -0,0 +1,33 @@ +--- common/network_queues.c.orig Wed Dec 5 12:59:14 2001 ++++ common/network_queues.c Wed Jan 7 16:37:13 2004 +@@ -339,9 +339,9 @@ + void dump_queue(
+ struct circular_queue *queue)
+ {
+- printf("Queue %s at 0x%x;g", queue->name, queue);
+- printf("Read at %d Write: %d Size: %d;g", queue->read_index, queue->write_index, queue->size);
+- printf("Buffer: 0x%x", queue->buffer);
++ printf("Queue %s at 0x%x;g", queue->name, &queue);
++ printf("Read at %ld Write: %ld Size: %ld;g", queue->read_index, queue->write_index, queue->size);
++ printf("Buffer: 0x%x", &(queue->buffer));
+
+ return;
+ }
+@@ -385,7 +385,7 @@ +
+ if(length>maximum_length)
+ {
+- printf("q: %s got unusually large packet: length: %ld max: %d byteswap: %d",
++ printf("q: %s got unusually large packet: length: %ld max: %ld byteswap: %d",
+ queue->name, length, maximum_length, byteswap);
+ dump_queue(queue);
+ *disconnect = TRUE;
+@@ -460,7 +460,7 @@ +
+ if(length>maximum_length)
+ {
+- printf("q: %s got unusually large packet: length: %d max: %d byteswap: %d",
++ printf("q: %s got unusually large packet: length: %d max: %ld byteswap: %d",
+ queue->name, length, maximum_length, byteswap);
+ dump_queue(queue);
+ *disconnect = TRUE;
diff --git a/games/mythserver/files/patch-common::room_packets.h b/games/mythserver/files/patch-common::room_packets.h new file mode 100644 index 000000000000..8824f5fa57a3 --- /dev/null +++ b/games/mythserver/files/patch-common::room_packets.h @@ -0,0 +1,26 @@ +--- common/room_packets.h.orig Wed Jan 7 16:56:11 2004 ++++ common/room_packets.h Wed Jan 7 16:54:55 2004 +@@ -417,6 +417,11 @@ + unsigned long player_id,
+ char * player_information);
+
++short build_rs_player_enter_room_packet(
++ char * buffer,
++ long player_id,
++ long room_id);
++
+ short build_rs_player_info_request_packet(
+ char * buffer,
+ unsigned long player_id,
+@@ -430,6 +435,11 @@ + short build_rs_score_game_packet(
+ char * buffer,
+ struct game_data * game);
++
++short build_rs_player_leave_room_packet(
++ char * buffer,
++ long player_id,
++ long room_id);
+
+ boolean byteswap_room_packet(
+ char * buffer,
diff --git a/games/mythserver/files/patch-game_search_new::game_search_server.c b/games/mythserver/files/patch-game_search_new::game_search_server.c index 1123fa723c88..c51fcd930b92 100644 --- a/games/mythserver/files/patch-game_search_new::game_search_server.c +++ b/games/mythserver/files/patch-game_search_new::game_search_server.c @@ -1,12 +1,33 @@ ---- game_search_new/game_search_server.c.orig Sat Feb 9 15:00:01 2002 -+++ game_search_new/game_search_server.c Sat Feb 9 15:02:05 2002 -@@ -20,7 +20,9 @@ +--- game_search_new/game_search_server.c.orig Thu Feb 7 11:56:08 2002 ++++ game_search_new/game_search_server.c Wed Jan 7 16:39:16 2004 +@@ -3,6 +3,16 @@ + Copyright (c) 1997-2002 Bungie Studios
+ Refer to the file "License.txt" for details
+ */
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <sys/time.h>
++#include <sys/ioctl.h>
++#include <arpa/inet.h>
++#include <signal.h>
++#include <fcntl.h>
++#include <string.h>
++#include <unistd.h>
+
+ #include "cseries.h"
+ #include "metaserver_common_structs.h"
+@@ -19,13 +29,6 @@ + #include "network_queues.h"
#include "game_search_packets.h"
#include "games_list.h"
+-
+-#include <sys/socket.h>
+-#include <sys/time.h>
+-#include <sys/ioctl.h>
+-#include <arpa/inet.h>
+-#include <signal.h>
+-#include <fcntl.h>
-+#include <sys/types.h>
- #include <sys/socket.h>
-+#include <netinet/in.h>
- #include <sys/time.h>
- #include <sys/ioctl.h>
- #include <arpa/inet.h>
+ #define MAXIMUM_OUTSTANDING_REQUESTS 32
+ #define SELECT_TIMEOUT_PERIOD 10
diff --git a/games/mythserver/files/patch-game_search_new::games_list.c b/games/mythserver/files/patch-game_search_new::games_list.c new file mode 100644 index 000000000000..a9540771692f --- /dev/null +++ b/games/mythserver/files/patch-game_search_new::games_list.c @@ -0,0 +1,10 @@ +--- game_search_new/games_list.c.orig Wed Jan 7 16:05:52 2004 ++++ game_search_new/games_list.c Wed Jan 7 16:07:23 2004 +@@ -3,6 +3,7 @@ + Copyright (c) 1997-2002 Bungie Studios
+ Refer to the file "License.txt" for details
+ */
++#include <string.h>
+
+ #include "cseries.h"
+ #include "metaserver_common_structs.h"
diff --git a/games/mythserver/files/patch-room_new::roomd_new.c b/games/mythserver/files/patch-room_new::roomd_new.c new file mode 100644 index 000000000000..5eaa1bb8f4cc --- /dev/null +++ b/games/mythserver/files/patch-room_new::roomd_new.c @@ -0,0 +1,18 @@ +--- room_new/roomd_new.c.orig Wed Jan 7 17:11:07 2004 ++++ room_new/roomd_new.c Wed Jan 7 17:11:17 2004 +@@ -4,7 +4,6 @@ + Refer to the file "License.txt" for details
+ */
+
+-#include "cseries.h"
+ #include <string.h>
+ #include <fcntl.h>
+ #include <sys/types.h>
+@@ -20,6 +19,7 @@ + #include <errno.h>
+ #include <signal.h>
+
++#include "cseries.h"
+ #include "environment.h"
+ #include "metaserver_common_structs.h"
+ #include "stats.h"
diff --git a/games/mythserver/files/patch-room_new::server_code.c b/games/mythserver/files/patch-room_new::server_code.c index 4acaf83d3aea..c53afb54886c 100644 --- a/games/mythserver/files/patch-room_new::server_code.c +++ b/games/mythserver/files/patch-room_new::server_code.c @@ -1,5 +1,5 @@ ---- room_new/server_code.c.old Sat Feb 9 15:06:52 2002 -+++ room_new/server_code.c Sat Feb 9 15:07:06 2002 +--- room_new/server_code.c.orig Thu Feb 7 11:56:30 2002 ++++ room_new/server_code.c Wed Jan 7 16:51:20 2004 @@ -8,6 +8,7 @@ #include <string.h>
#include <stdlib.h>
@@ -8,3 +8,11 @@ #include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+@@ -25,6 +26,7 @@ + #include "bungie_net_order.h"
+ #include "users.h"
+ #include "games.h"
++#include "games_log.h"
+ #include "rank.h"
+ #include "metaserver_packets.h"
+ #include "room_packets.h"
diff --git a/games/mythserver/files/patch-users_new::main.c b/games/mythserver/files/patch-users_new::main.c index 83ab178b2afa..14f2b9562961 100644 --- a/games/mythserver/files/patch-users_new::main.c +++ b/games/mythserver/files/patch-users_new::main.c @@ -1,5 +1,21 @@ ---- users_new/main.c.orig Sun May 18 02:36:43 2003 -+++ users_new/main.c Sun May 18 02:37:47 2003 +--- users_new/main.c.orig Thu Feb 7 11:58:56 2002 ++++ users_new/main.c Wed Jan 7 17:13:02 2004 +@@ -6,7 +6,6 @@ +
+ #define SERVER
+
+-#include "cseries.h"
+ #include <string.h>
+ #include <fcntl.h>
+ #include <sys/types.h>
+@@ -20,6 +19,7 @@ + #include <errno.h>
+ #include <signal.h>
+
++#include "cseries.h"
+ #include "environment.h"
+ #include "metaserver_common_structs.h"
+ #include "stats.h"
@@ -97,16 +97,7 @@ NUMBER_OF_CLIENT_TYPES
};
diff --git a/games/mythserver/files/patch-users_new::orders.c b/games/mythserver/files/patch-users_new::orders.c new file mode 100644 index 000000000000..1472f4b82f06 --- /dev/null +++ b/games/mythserver/files/patch-users_new::orders.c @@ -0,0 +1,24 @@ +--- users_new/orders.c.orig Wed Jan 7 17:14:38 2004 ++++ users_new/orders.c Wed Jan 7 17:14:50 2004 +@@ -4,6 +4,10 @@ + Refer to the file "License.txt" for details
+ */
+
++#include <unistd.h>
++#include <fcntl.h>
++#include <time.h>
++
+ #include "cseries.h"
+ #include "environment.h"
+ #include "metaserver_common_structs.h"
+@@ -12,10 +16,6 @@ + #include "bungie_net_player.h"
+ #include "bungie_net_order.h"
+ #include "orders.h"
+-
+-#include <unistd.h>
+-#include <fcntl.h>
+-#include <time.h>
+
+ #define BUNGIE_NET_ORDER_DB_SIGNATURE 'ORDR'
+ #define UNUSED_ORDER_ID 0xFFFFFFFF
diff --git a/games/mythserver/files/patch-users_new::users.c b/games/mythserver/files/patch-users_new::users.c new file mode 100644 index 000000000000..9c938781199d --- /dev/null +++ b/games/mythserver/files/patch-users_new::users.c @@ -0,0 +1,24 @@ +--- users_new/users.c.orig Wed Jan 7 17:15:33 2004 ++++ users_new/users.c Wed Jan 7 17:15:41 2004 +@@ -4,6 +4,10 @@ + Refer to the file "License.txt" for details
+ */
+
++#include <unistd.h>
++#include <fcntl.h>
++#include <string.h>
++
+ #include "cseries.h"
+ #include "environment.h"
+ #include "metaserver_common_structs.h"
+@@ -13,10 +17,6 @@ + #include "byte_swapping.h"
+ #include "bungie_net_player.h"
+ #include "users.h"
+-
+-#include <unistd.h>
+-#include <fcntl.h>
+-#include <string.h>
+
+ #define BUNGIE_NET_USER_DB_SIGNATURE 'PLAY'
+
|