Add fixes for -fno-common

ok cwen@
This commit is contained in:
bcallah 2021-01-31 04:07:21 +00:00
parent 1137c338ee
commit 767766c801
4 changed files with 66 additions and 7 deletions

View File

@ -1,20 +1,20 @@
# $OpenBSD: Makefile,v 1.7 2019/07/12 20:46:24 sthen Exp $
# $OpenBSD: Makefile,v 1.8 2021/01/31 04:07:21 bcallah Exp $
COMMENT = 2D RTS space combat game
DISTNAME = spacezero-0.86.00
CATEGORIES = games x11
REVISION = 1
REVISION = 2
HOMEPAGE = http://spacezero.sourceforge.net/
# GPLv3+
PERMIT_PACKAGE = Yes
WANTLIB = X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama Xrandr
WANTLIB += Xrender alut atk-1.0 c cairo fontconfig freetype gdk-x11-2.0
WANTLIB += gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0 gtk-x11-2.0 iconv
WANTLIB += intl m openal pango-1.0 pangocairo-1.0 pangoft2-1.0 pthread
WANTLIB += vorbisfile z
WANTLIB += X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama
WANTLIB += Xrandr Xrender alut atk-1.0 c cairo fontconfig freetype
WANTLIB += gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0
WANTLIB += gtk-x11-2.0 harfbuzz intl m openal pango-1.0 pangocairo-1.0
WANTLIB += pangoft2-1.0 pthread vorbisfile z
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=spacezero/}

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-include_snow_h,v 1.1 2021/01/31 04:07:22 bcallah Exp $
Fix for -fno-common
Index: include/snow.h
--- include/snow.h.orig
+++ include/snow.h
@@ -29,13 +29,6 @@
#include "objects.h"
-struct Flake *flakes;
-
-struct Flake{
- float x,y;
- float vx,vy;
- float s;
-};
void UpdateFlakes(struct Planet *planet);
void DrawFlakes(GdkPixmap *pxmap,GdkGC *pen,int x,int y);

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-src_snow_c,v 1.1 2021/01/31 04:07:22 bcallah Exp $
Fix for -fno-common
Index: src/snow.c
--- src/snow.c.orig
+++ src/snow.c
@@ -38,6 +38,14 @@
#define NFLAKES 1000
+struct Flake{
+ float x,y;
+ float vx,vy;
+ float s;
+};
+
+struct Flake *flakes;
+
void CreateSnow(int w,int h){
int i;

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-src_spacecomm_c,v 1.1 2021/01/31 04:07:22 bcallah Exp $
Fix for -fno-common
Index: src/spacecomm.c
--- src/spacecomm.c.orig
+++ src/spacecomm.c
@@ -63,7 +63,7 @@ SENDOBJUNMOD0
#define SENDORDERS 1
extern struct HeadObjList listheadobjs;
-struct TextMessageList listheadtext;
+extern struct TextMessageList listheadtext;
extern struct CharListHead gameloglist; /* list of all game messages */
extern struct Window windowgamelog;
extern struct Habitat habitat;