summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-misc')
-rw-r--r--games-misc/typespeed/files/typespeed-0.6.5-gamestat.patch15
-rw-r--r--games-misc/typespeed/files/typespeed-0.6.5-lto.patch54
-rw-r--r--games-misc/typespeed/typespeed-0.6.5-r3.ebuild64
3 files changed, 133 insertions, 0 deletions
diff --git a/games-misc/typespeed/files/typespeed-0.6.5-gamestat.patch b/games-misc/typespeed/files/typespeed-0.6.5-gamestat.patch
new file mode 100644
index 000000000000..7159b1950ecc
--- /dev/null
+++ b/games-misc/typespeed/files/typespeed-0.6.5-gamestat.patch
@@ -0,0 +1,15 @@
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -23,10 +23,10 @@ typespeed.score:
+ @touch typespeed.score
+
+ install-data-hook:
+- -chgrp games $(DESTDIR)$(highscoredir)/$(HIGHFILE) && \
++ -chgrp gamestat $(DESTDIR)$(highscoredir)/$(HIGHFILE) && \
+ chmod g+w $(DESTDIR)$(highscoredir)/$(HIGHFILE) && \
+ chmod o-rwx $(DESTDIR)$(highscoredir)/$(HIGHFILE)
+
+ install-exec-hook:
+- -chgrp games $(DESTDIR)$(bindir)/typespeed && \
++ -chgrp gamestat $(DESTDIR)$(bindir)/typespeed && \
+ chmod g+s $(DESTDIR)$(bindir)/typespeed
diff --git a/games-misc/typespeed/files/typespeed-0.6.5-lto.patch b/games-misc/typespeed/files/typespeed-0.6.5-lto.patch
new file mode 100644
index 000000000000..c734e196e683
--- /dev/null
+++ b/games-misc/typespeed/files/typespeed-0.6.5-lto.patch
@@ -0,0 +1,54 @@
+https://bugs.gentoo.org/858785
+--- a/src/file.c
++++ b/src/file.c
+@@ -97,7 +97,7 @@ extern unsigned long cstrl(char *);
+ extern void defrule(void);
+ extern void drawscreen(void);
+ extern int fileselmenu(int, struct finfo *, const char *);
+-extern unsigned short level(int);
++extern int level(int);
+ extern void liima_mvgetnstr(int, int, char *, int);
+ extern int netrecv(int, int, int, int, char *, size_t);
+ extern int netsend(char *);
+--- a/src/menu.c
++++ b/src/menu.c
+@@ -54,7 +54,7 @@ extern void closenetwork(void);
+ extern unsigned long cstrl(char *);
+ extern void xerrx(int, const char *, ...);
+ extern int initnetwork(char *, int);
+-extern unsigned short level(int);
++extern int level(int);
+ extern void liima_mvgetnstr(int, int, char *, int);
+ extern void multipmenu(void);
+ extern void xcolor_set(short);
+--- a/src/misc.c
++++ b/src/misc.c
+@@ -61,7 +61,7 @@
+ unsigned long cstrl(char *);
+ void endcursestuff(void);
+ void initcursestuff(void);
+-unsigned short level(int);
++int level(int);
+ void liima_mvgetnstr(int, int, char *, int);
+ int r(int);
+ clock_t timenow(void);
+@@ -151,7 +151,7 @@ initcursestuff(void)
+ }
+
+ /* Returns (0 - 10) and sets color according to "pointsit". */
+-unsigned short
++int
+ level(int pointsit)
+ {
+ int leveli;
+--- a/src/typespeed.c
++++ b/src/typespeed.c
+@@ -96,7 +96,7 @@ extern void freewords(void);
+ extern void initcursestuff(void);
+ extern int initnetwork(char *, int);
+ extern void initstatus(char *);
+-extern unsigned short level(int);
++extern int level(int);
+ extern int loadscores(char *);
+ extern void makescorefiles(char *);
+ extern void multipmenu(void);
diff --git a/games-misc/typespeed/typespeed-0.6.5-r3.ebuild b/games-misc/typespeed/typespeed-0.6.5-r3.ebuild
new file mode 100644
index 000000000000..a8cbef568bc7
--- /dev/null
+++ b/games-misc/typespeed/typespeed-0.6.5-r3.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools edo
+
+DESCRIPTION="Test your typing speed, and get your fingers CPS"
+HOMEPAGE="https://typespeed.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE="nls"
+
+RDEPEND="
+ acct-group/gamestat
+ sys-libs/ncurses:=
+ nls? ( virtual/libintl )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-musl.patch
+ "${FILESDIR}"/${P}-use-extern.patch
+ "${FILESDIR}"/${P}-link-tinfo.patch
+ "${FILESDIR}"/${P}-lto.patch
+ "${FILESDIR}"/${P}-gamestat.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i -e '/^CC =/d' \
+ src/Makefile.am \
+ testsuite/Makefile.am || die
+ # bug #417265
+ rm -r m4 || die
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable nls)
+}
+
+src_test() {
+ default
+
+ cd testsuite || die
+ local test
+ for test in t_level t_loadwords t_typorankkaus ; do
+ edo ./${test}
+ done
+}
+
+src_install() {
+ default
+ dodoc doc/README
+}