Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jan 2004 17:33:20 +0100 (CET)
From:      Ulrich Spoerlein <q@uni.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/61022: [PATCH] games/mythserver: Unbreak on 5.2
Message-ID:  <200401071633.i07GXK8Z007735@roadrunner.q.local>
Resent-Message-ID: <200401071640.i07Ge5fe022837@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         61022
>Category:       ports
>Synopsis:       [PATCH] games/mythserver: Unbreak on 5.2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 07 08:40:04 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Ulrich Spoerlein
>Release:        FreeBSD 5.2-RC i386
>Organization:
>Environment:
System: FreeBSD roadrunner 5.2-RC FreeBSD 5.2-RC #1: Thu Dec 18 10:30:44 CET 2003
>Description:
Silence a lot of warnings and make this compile again.
NOTE: I have not done any run-time test (don't know how to do them).
I just fixed the compilation.
>How-To-Repeat:
>Fix:

Please add all the files marked with '?'. They are attached below.

--- mythserver-1.0.patch begins here ---
? files/patch-Makefile
? files/patch-common::game_search_packets.c
? files/patch-common::metaserver_packets.h
? files/patch-common::network_queues.c
? files/patch-common::room_packets.h
? files/patch-game_search_new::games_list.c
? files/patch-room_new::roomd_new.c
? files/patch-users_new::orders.c
? files/patch-users_new::users.c
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/games/mythserver/Makefile,v
retrieving revision 1.12
diff -u -u -r1.12 Makefile
--- Makefile	18 Oct 2003 03:06:43 -0000	1.12
+++ Makefile	7 Jan 2004 16:27:07 -0000
@@ -18,12 +18,6 @@
 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 @@
 		@${TOUCH} ${PREFIX}/share/${PORTNAME}/db/orders.dat
 		@${TOUCH} ${PREFIX}/share/${PORTNAME}/db/users.dat
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Index: files/patch-game_search_new::game_search_server.c
===================================================================
RCS file: /home/ncvs/ports/games/mythserver/files/patch-game_search_new::game_search_server.c,v
retrieving revision 1.1
diff -u -u -r1.1 patch-game_search_new::game_search_server.c
--- files/patch-game_search_new::game_search_server.c	11 Feb 2002 08:44:40 -0000	1.1
+++ files/patch-game_search_new::game_search_server.c	7 Jan 2004 16:27:07 -0000
@@ -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
Index: files/patch-room_new::server_code.c
===================================================================
RCS file: /home/ncvs/ports/games/mythserver/files/patch-room_new::server_code.c,v
retrieving revision 1.1
diff -u -u -r1.1 patch-room_new::server_code.c
--- files/patch-room_new::server_code.c	11 Feb 2002 08:44:40 -0000	1.1
+++ files/patch-room_new::server_code.c	7 Jan 2004 16:27:07 -0000
@@ -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"
Index: files/patch-users_new::main.c
===================================================================
RCS file: /home/ncvs/ports/games/mythserver/files/patch-users_new::main.c,v
retrieving revision 1.1
diff -u -u -r1.1 patch-users_new::main.c
--- files/patch-users_new::main.c	18 May 2003 09:43:17 -0000	1.1
+++ files/patch-users_new::main.c	7 Jan 2004 16:27:07 -0000
@@ -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
  };
--- mythserver-1.0.patch ends here ---

Here are the files to add:

--- /dev/null	Wed Jan  7 17:24:54 2004
+++ files/patch-Makefile	Wed Jan  7 16:48:16 2004
@@ -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 $@ $<
+ 
--- /dev/null	Wed Jan  7 17:24:54 2004
+++ files/patch-common::game_search_packets.c	Wed Jan  7 16:20:13 2004
@@ -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"
--- /dev/null	Wed Jan  7 17:30:00 2004
+++ files/patch-common::metaserver_packets.h	Wed Jan  7 16:35:23 2004
@@ -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 */
--- /dev/null	Wed Jan  7 17:30:08 2004
+++ files/patch-common::network_queues.c	Wed Jan  7 16:37:55 2004
@@ -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;
--- /dev/null	Wed Jan  7 17:30:08 2004
+++ files/patch-common::room_packets.h	Wed Jan  7 16:56:40 2004
@@ -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, 
--- /dev/null	Wed Jan  7 17:30:08 2004
+++ files/patch-game_search_new::games_list.c	Wed Jan  7 16:08:00 2004
@@ -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"
--- /dev/null	Wed Jan  7 17:30:08 2004
+++ files/patch-room_new::roomd_new.c	Wed Jan  7 17:12:41 2004
@@ -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"
--- /dev/null	Wed Jan  7 17:30:08 2004
+++ files/patch-users_new::orders.c	Wed Jan  7 17:16:20 2004
@@ -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
--- /dev/null	Wed Jan  7 17:30:08 2004
+++ files/patch-users_new::users.c	Wed Jan  7 17:16:04 2004
@@ -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'
+ 
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401071633.i07GXK8Z007735>