mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-26 09:46:09 +00:00
games/typespeed: Fix link error on FreeBSD 13 or later (-fno-common)
PR: 259501 MFH: 2021Q4
This commit is contained in:
parent
d49c84d3ae
commit
679cfe51e8
@ -12,9 +12,6 @@ COMMENT= Test your typing speed and get your fingers' CPS
|
||||
LICENSE= GPLv2+
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
BROKEN_FreeBSD_13= ld: error: duplicate symbol: now
|
||||
BROKEN_FreeBSD_14= ld: error: duplicate symbol: now
|
||||
|
||||
USES= ncurses
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS= --with-highscoredir="${SCOREDIR}"
|
||||
@ -22,7 +19,7 @@ CONFIGURE_ARGS= --with-highscoredir="${SCOREDIR}"
|
||||
SCOREDIR= /var/games/typespeed
|
||||
SCOREFILE= typespeed.score
|
||||
|
||||
OPTIONS_DEFINE= NLS DOCS
|
||||
OPTIONS_DEFINE= DOCS NLS
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
NLS_USES= gettext
|
||||
|
15
games/typespeed/files/patch-src-typespeed.c
Normal file
15
games/typespeed/files/patch-src-typespeed.c
Normal file
@ -0,0 +1,15 @@
|
||||
--- src/typespeed.c.orig 2008-08-13 14:36:51 UTC
|
||||
+++ src/typespeed.c
|
||||
@@ -136,6 +136,12 @@ static void usage(void);
|
||||
#endif /* TEST */
|
||||
|
||||
/* globals */
|
||||
+struct finfo finfo;
|
||||
+struct stats now;
|
||||
+struct opt opt;
|
||||
+struct rules rules;
|
||||
+struct rawdata words;
|
||||
+
|
||||
char *rankki[11] =
|
||||
{"None", "Beginner", "Learner", "NoGood", "Average",
|
||||
"Good", "VeryGood", "Pro", "3l33t", "*(GOD)*", "Computer"};
|
47
games/typespeed/files/patch-src-typespeed.h
Normal file
47
games/typespeed/files/patch-src-typespeed.h
Normal file
@ -0,0 +1,47 @@
|
||||
--- src/typespeed.h.orig 2008-08-13 14:36:51 UTC
|
||||
+++ src/typespeed.h
|
||||
@@ -44,6 +44,7 @@ struct finfo {
|
||||
char descr[61];
|
||||
char name[MAXPATHLEN];
|
||||
};
|
||||
+extern struct finfo finfo;
|
||||
|
||||
struct stats {
|
||||
uint8_t level;
|
||||
@@ -56,7 +57,8 @@ struct stats {
|
||||
clock_t duration;
|
||||
unsigned int sinit;
|
||||
char name[21];
|
||||
-} now;
|
||||
+};
|
||||
+extern struct stats now;
|
||||
|
||||
struct opt {
|
||||
int cheat;
|
||||
@@ -66,7 +68,8 @@ struct opt {
|
||||
int usecolors;
|
||||
char name[21];
|
||||
char order[3];
|
||||
-} opt;
|
||||
+};
|
||||
+extern struct opt opt;
|
||||
|
||||
struct rules {
|
||||
int misses;
|
||||
@@ -85,12 +88,13 @@ struct rules {
|
||||
int maxtime;
|
||||
char name[31];
|
||||
char fname[FILENAME_MAX + 1];
|
||||
-} rules;
|
||||
+};
|
||||
+extern struct rules rules;
|
||||
|
||||
struct rawdata {
|
||||
char *bulk;
|
||||
char **word;
|
||||
size_t n;
|
||||
size_t max;
|
||||
-} words;
|
||||
-
|
||||
+};
|
||||
+extern struct rawdata words;
|
Loading…
Reference in New Issue
Block a user