Skip to content

Commit

Permalink
games/quaqut: fix build with -fno-common
Browse files Browse the repository at this point in the history
Move the definition of a global structure from header to source file.
This unbreaks the build on FreeBSD 13+.
While we are at it, regenerate patch and set LICENSE.
  • Loading branch information
clausecker committed Apr 14, 2023
1 parent cb7e0ef commit 8459032
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 16 deletions.
7 changes: 4 additions & 3 deletions games/quaqut/Makefile
@@ -1,14 +1,15 @@
PORTNAME= quaqut
PORTVERSION= 0.2.0
DISTVERSION= 0.2.0
PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}%20C%20sources/${PORTNAME}-${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT= Queries information from Unreal Tournament 2004 game servers
WWW= http://quaqut.sourceforge.net/

BROKEN_FreeBSD_13= ld: error: duplicate symbol: quaqut
BROKEN_FreeBSD_14= ld: error: duplicate symbol: quaqut
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING

HAS_CONFIGURE= yes
USE_RC_SUBR= ${PORTNAME}
Expand Down
13 changes: 0 additions & 13 deletions games/quaqut/files/patch-display.c

This file was deleted.

13 changes: 13 additions & 0 deletions games/quaqut/files/patch-src_display.c
@@ -0,0 +1,13 @@
--- src/display.c.orig 2004-09-28 12:49:58 UTC
+++ src/display.c
@@ -122,7 +122,9 @@ int quaqut_display_process( int protocol , char comman

if ( quaqut.options & QUAQUT_OPTION_LOGFILE )
fclose(destination);
-
+ else
+ fflush(stdout);
+
return 1;
}

11 changes: 11 additions & 0 deletions games/quaqut/files/patch-src_network.c
@@ -0,0 +1,11 @@
--- src/network.c.orig 2023-04-13 09:01:58 UTC
+++ src/network.c
@@ -22,6 +22,8 @@
#include "quaqut.h"
#include "protocol.h"

+struct quaqut quaqut;
+
#ifdef _WIN_32_
void quaqut_network_initwsa( void );
void quaqut_network_shutwsa( void );
11 changes: 11 additions & 0 deletions games/quaqut/files/patch-src_quaqut.h
@@ -0,0 +1,11 @@
--- src/quaqut.h.orig 2023-04-13 09:01:23 UTC
+++ src/quaqut.h
@@ -114,7 +114,7 @@ int quaqut_utils_bufferize4bytes( unsigned char* , uns
int quaqut_utils_bufferizestring( unsigned char* , unsigned char* , int );


-struct {
+extern struct quaqut {

char command;
unsigned int options;

0 comments on commit 8459032

Please sign in to comment.