summaryrefslogtreecommitdiff
path: root/games-misc/typespeed/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /games-misc/typespeed/files
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'games-misc/typespeed/files')
-rw-r--r--games-misc/typespeed/files/typespeed-0.6.5-link-tinfo.patch35
-rw-r--r--games-misc/typespeed/files/typespeed-0.6.5-use-extern.patch116
2 files changed, 151 insertions, 0 deletions
diff --git a/games-misc/typespeed/files/typespeed-0.6.5-link-tinfo.patch b/games-misc/typespeed/files/typespeed-0.6.5-link-tinfo.patch
new file mode 100644
index 000000000000..9ffb9cfcc567
--- /dev/null
+++ b/games-misc/typespeed/files/typespeed-0.6.5-link-tinfo.patch
@@ -0,0 +1,35 @@
+diff -r 8cf704f4cffa configure.ac
+--- a/configure.ac Thu Oct 15 23:52:32 2020 +0000
++++ b/configure.ac Thu Oct 15 23:52:58 2020 +0000
+@@ -16,6 +16,6 @@
+
+ # Checks for libraries.
+-AC_CHECK_LIB([ncurses], [initscr])
++PKG_CHECK_MODULES([NCURSES], [ncurses], [], [exit 1])
+
+ # I18N
+ AM_GNU_GETTEXT_VERSION([0.14.5])
+diff -r e64ba00e0147 src/Makefile.am
+--- a/src/Makefile.am Fri Oct 16 00:08:17 2020 +0000
++++ b/src/Makefile.am Fri Oct 16 00:08:39 2020 +0000
+@@ -15,7 +15,7 @@
+ -DCONFIGFILE=\"$(sysconfdir)/typespeedrc\" \
+ -DHIGHFILE=\"$(highscoredir)/$(HIGHFILE)\" \
+ -DWORDDIR=\"$(WORDDIR)\" -DRULEDIR=\"$(RULEDIR)\"
+-typespeed_LDADD = @LIBINTL@
++typespeed_LDADD = @LIBINTL@ @NCURSES_LIBS@
+ typespeed_SOURCES = file.c gettext.h menu.c misc.c network.c pathnames.h \
+ typespeed.c typespeed.h
+
+diff -r 987ceebc438f testsuite/Makefile.am
+--- a/testsuite/Makefile.am Fri Oct 16 00:14:34 2020 +0000
++++ b/testsuite/Makefile.am Fri Oct 16 00:15:37 2020 +0000
+@@ -2,7 +2,7 @@
+
+ localedir = $(datadir)/locale
+ AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -DTVERSION=\"v$(VERSION)\" -DTEST
+-LDADD = @LIBINTL@
++LDADD = @LIBINTL@ @NCURSES_LIBS@
+
+ EXTRA_DIST = t_unescstr.sh t_loadwords_data/3_empty
+
diff --git a/games-misc/typespeed/files/typespeed-0.6.5-use-extern.patch b/games-misc/typespeed/files/typespeed-0.6.5-use-extern.patch
new file mode 100644
index 000000000000..cd5e4ea54c03
--- /dev/null
+++ b/games-misc/typespeed/files/typespeed-0.6.5-use-extern.patch
@@ -0,0 +1,116 @@
+Description: Fix FTBFS with gcc-10
+
+Author: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
+Bug-Debian: https://bugs.debian.org/957887
+
+---
+
+--- typespeed-0.6.5.orig/src/file.c
++++ typespeed-0.6.5/src/file.c
+@@ -142,6 +142,9 @@ extern int hfd;
+ extern char *rankki[11];
+ extern char *typorank[12];
+ extern char *usedwordfile;
++extern struct rules rules;
++struct rawdata words;
++struct opt opt;
+
+ char ruledir[MAXPATHLEN];
+ char worddir[MAXPATHLEN];
+--- typespeed-0.6.5.orig/src/menu.c
++++ typespeed-0.6.5/src/menu.c
+@@ -76,6 +76,9 @@ void tellstory(void);
+
+ extern int misses;
+ extern char *rankki[11];
++extern struct stats now;
++extern struct rules rules;
++extern struct opt opt;
+
+ struct positions {
+ int rank;
+--- typespeed-0.6.5.orig/src/misc.c
++++ typespeed-0.6.5/src/misc.c
+@@ -75,6 +75,7 @@ char *xstrdup(char *);
+ void xstrncpy(char *, char *, size_t);
+
+ extern char *progname;
++extern struct opt opt;
+
+ static int graph = 0;
+
+--- typespeed-0.6.5.orig/src/network.c
++++ typespeed-0.6.5/src/network.c
+@@ -116,6 +116,7 @@ void setnoblock(void);
+ void writenum(char *, uint32_t);
+
+ extern FILE *netlogfile;
++extern struct opt opt;
+
+ static int ds = -1;
+ static int ss = -1;
+--- typespeed-0.6.5.orig/src/typespeed.c
++++ typespeed-0.6.5/src/typespeed.c
+@@ -146,6 +146,7 @@ char *typorank[12] =
+
+ FILE *netlogfile;
+ struct stats best;
++struct stats now;
+ int hfd;
+ int misses;
+ struct stats other;
+@@ -155,6 +156,9 @@ char *usedwordfile;
+ int wordcount = 0;
+ int wordpos[22];
+ char wordstring[22][20];
++struct rules rules;
++extern struct rawdata words;
++extern struct opt opt;
+
+ struct option options[] = {
+ {"cheat", no_argument, &opt.cheat, 1},
+--- typespeed-0.6.5.orig/src/typespeed.h
++++ typespeed-0.6.5/src/typespeed.h
+@@ -56,7 +56,7 @@ struct stats {
+ clock_t duration;
+ unsigned int sinit;
+ char name[21];
+-} now;
++};
+
+ struct opt {
+ int cheat;
+@@ -66,7 +66,7 @@ struct opt {
+ int usecolors;
+ char name[21];
+ char order[3];
+-} opt;
++};
+
+ struct rules {
+ int misses;
+@@ -85,12 +85,12 @@ struct rules {
+ int maxtime;
+ char name[31];
+ char fname[FILENAME_MAX + 1];
+-} rules;
++};
+
+ struct rawdata {
+ char *bulk;
+ char **word;
+ size_t n;
+ size_t max;
+-} words;
++};
+
+--- typespeed-0.6.5.orig/testsuite/t_loadwords.c
++++ typespeed-0.6.5/testsuite/t_loadwords.c
+@@ -52,6 +52,7 @@ extern void freewords(void);
+ extern int loadwords(char *);
+
+ extern char worddir[MAXPATHLEN];
++extern struct rawdata words;
+
+ int
+ main(void)