mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
- Fix build on 5.x
PR: ports/61022 Submitted by: Ulrich Spoerlein <q@uni.de>
This commit is contained in:
parent
1ce403733c
commit
1d959a3fc8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=97668
@ -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>
|
||||
|
37
games/mythserver/files/patch-Makefile
Normal file
37
games/mythserver/files/patch-Makefile
Normal file
@ -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 $@ $<
|
||||
|
12
games/mythserver/files/patch-common::game_search_packets.c
Normal file
12
games/mythserver/files/patch-common::game_search_packets.c
Normal file
@ -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"
|
19
games/mythserver/files/patch-common::metaserver_packets.h
Normal file
19
games/mythserver/files/patch-common::metaserver_packets.h
Normal file
@ -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 */
|
33
games/mythserver/files/patch-common::network_queues.c
Normal file
33
games/mythserver/files/patch-common::network_queues.c
Normal file
@ -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;
|
26
games/mythserver/files/patch-common::room_packets.h
Normal file
26
games/mythserver/files/patch-common::room_packets.h
Normal file
@ -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,
|
@ -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
|
||||
|
10
games/mythserver/files/patch-game_search_new::games_list.c
Normal file
10
games/mythserver/files/patch-game_search_new::games_list.c
Normal file
@ -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"
|
18
games/mythserver/files/patch-room_new::roomd_new.c
Normal file
18
games/mythserver/files/patch-room_new::roomd_new.c
Normal file
@ -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"
|
@ -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"
|
||||
|
@ -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
|
||||
};
|
||||
|
24
games/mythserver/files/patch-users_new::orders.c
Normal file
24
games/mythserver/files/patch-users_new::orders.c
Normal file
@ -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
|
24
games/mythserver/files/patch-users_new::users.c
Normal file
24
games/mythserver/files/patch-users_new::users.c
Normal file
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user