From 7bb9699d66991ac8a69c566c6521442cef7cdeb6 Mon Sep 17 00:00:00 2001 From: kirby Date: Sat, 6 Feb 2021 09:31:46 +0000 Subject: [PATCH] Fix for -no-common from Gentoo https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8edf247202490c028bce701f26b52e39f996c287 --- games/lincity/Makefile | 4 ++-- games/lincity/patches/patch-fileutil_c | 16 ++++++++++++++++ games/lincity/patches/patch-ldsvguts_c | 17 +++++++++++++++++ games/lincity/patches/patch-main_c | 18 ++++++++++++++++++ games/lincity/patches/patch-screen_h | 16 ++++++++++++++++ 5 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 games/lincity/patches/patch-fileutil_c create mode 100644 games/lincity/patches/patch-ldsvguts_c create mode 100644 games/lincity/patches/patch-main_c create mode 100644 games/lincity/patches/patch-screen_h diff --git a/games/lincity/Makefile b/games/lincity/Makefile index 5e0ce656799..2feb7f27818 100644 --- a/games/lincity/Makefile +++ b/games/lincity/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.21 2019/07/12 20:46:20 sthen Exp $ +# $OpenBSD: Makefile,v 1.22 2021/02/06 09:31:46 kirby Exp $ COMMENT= Rich city simulation game for X DISTNAME= lincity-1.13.1 CATEGORIES= games HOMEPAGE= http://lincity.sourceforge.net/ -REVISION= 0 +REVISION= 1 # GPLv2 only PERMIT_PACKAGE= Yes diff --git a/games/lincity/patches/patch-fileutil_c b/games/lincity/patches/patch-fileutil_c new file mode 100644 index 00000000000..f095fec4681 --- /dev/null +++ b/games/lincity/patches/patch-fileutil_c @@ -0,0 +1,16 @@ +$OpenBSD: patch-fileutil_c,v 1.1 2021/02/06 09:31:46 kirby Exp $ +Fix for -fno-common from Gentoo +https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8edf247202490c028bce701f26b52e39f996c287 + +Index: fileutil.c +--- fileutil.c.orig ++++ fileutil.c +@@ -105,7 +105,7 @@ static const char *guess_category_value (int category, + * ---------------------------------------------------------------------- */ + char LIBDIR[LC_PATH_MAX]; + +-char *lc_save_dir; ++extern char *lc_save_dir; + int lc_save_dir_len; + static char *lc_temp_filename; + diff --git a/games/lincity/patches/patch-ldsvguts_c b/games/lincity/patches/patch-ldsvguts_c new file mode 100644 index 00000000000..994dcd02770 --- /dev/null +++ b/games/lincity/patches/patch-ldsvguts_c @@ -0,0 +1,17 @@ +$OpenBSD: patch-ldsvguts_c,v 1.1 2021/02/06 09:31:46 kirby Exp $ + +Fix for -fno-common from Gentoo +https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8edf247202490c028bce701f26b52e39f996c287 + +Index: ldsvguts.c +--- ldsvguts.c.orig ++++ ldsvguts.c +@@ -91,8 +91,6 @@ int verify_city (char *cname); + * Private Global Variables + * ---------------------------------------------------------------------- */ + +-char save_names[10][42]; +- + /* ---------------------------------------------------------------------- * + * Public functions + * ---------------------------------------------------------------------- */ diff --git a/games/lincity/patches/patch-main_c b/games/lincity/patches/patch-main_c new file mode 100644 index 00000000000..7dd4fd60167 --- /dev/null +++ b/games/lincity/patches/patch-main_c @@ -0,0 +1,18 @@ +$OpenBSD: patch-main_c,v 1.1 2021/02/06 09:31:46 kirby Exp $ +Fix for -fno-common from Gentoo +https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8edf247202490c028bce701f26b52e39f996c287 + +Index: main.c +--- main.c.orig ++++ main.c +@@ -96,9 +96,8 @@ char LIBDIR[LC_PATH_MAX]; + #endif + #endif + +-char *lc_save_dir; ++extern char *lc_save_dir; + char *lc_temp_file; +-char save_names[10][42]; + + #ifdef CS_PROFILE + int prof_countdown = PROFILE_COUNTDOWN; diff --git a/games/lincity/patches/patch-screen_h b/games/lincity/patches/patch-screen_h new file mode 100644 index 00000000000..df13f99eafe --- /dev/null +++ b/games/lincity/patches/patch-screen_h @@ -0,0 +1,16 @@ +$OpenBSD: patch-screen_h,v 1.1 2021/02/06 09:31:46 kirby Exp $ +Fix for -fno-common from Gentoo +https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8edf247202490c028bce701f26b52e39f996c287 + +Index: screen.h +--- screen.h.orig ++++ screen.h +@@ -20,7 +20,7 @@ extern unsigned char start_font1[2048]; + extern unsigned char start_font2[4096]; + extern unsigned char start_font3[4096]; + +-int monthgraph_style; ++extern int monthgraph_style; + + /* This is on in screen_full_refresh, used in *_refresh() */ + extern char screen_refreshing;