* [gentoo-commits] repo/gentoo:master commit in: games-misc/typespeed/, games-misc/typespeed/files/
@ 2016-01-02 1:47 Michael Sterrett
0 siblings, 0 replies; 3+ messages in thread
From: Michael Sterrett @ 2016-01-02 1:47 UTC (permalink / raw
To: gentoo-commits
commit: cfb29fb00e056aa3b599c34172f7f2ca6bea8a71
Author: Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 2 01:47:09 2016 +0000
Commit: Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
CommitDate: Sat Jan 2 01:47:25 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cfb29fb0
games-misc/typespeed: add patch from Felix Janda to build on the musl profiles (bug #570452)
Package-Manager: portage-2.2.24
games-misc/typespeed/files/typespeed-0.6.5-musl.patch | 15 +++++++++++++++
games-misc/typespeed/typespeed-0.6.5.ebuild | 7 +++----
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/games-misc/typespeed/files/typespeed-0.6.5-musl.patch b/games-misc/typespeed/files/typespeed-0.6.5-musl.patch
new file mode 100644
index 0000000..3fd53b3
--- /dev/null
+++ b/games-misc/typespeed/files/typespeed-0.6.5-musl.patch
@@ -0,0 +1,15 @@
+diff -ur a/typespeed-0.6.5/src/typespeed.h b/typespeed-0.6.5/src/typespeed.h
+--- a/typespeed-0.6.5/src/typespeed.h 2008-08-13 15:36:51.000000000 +0100
++++ b/typespeed-0.6.5/src/typespeed.h 2016-01-01 10:41:54.919998820 +0100
+@@ -27,10 +27,10 @@
+
+ #include <stdint.h>
+ #include <stdio.h>
++#include <time.h>
+
+ #ifdef WIN32
+ #include <dirent.h>
+- #include <time.h>
+
+ #ifndef MAXHOSTNAMELEN
+ #define MAXHOSTNAMELEN 256
diff --git a/games-misc/typespeed/typespeed-0.6.5.ebuild b/games-misc/typespeed/typespeed-0.6.5.ebuild
index 88c9474..cca2de7 100644
--- a/games-misc/typespeed/typespeed-0.6.5.ebuild
+++ b/games-misc/typespeed/typespeed-0.6.5.ebuild
@@ -3,7 +3,7 @@
# $Id$
EAPI=5
-inherit autotools games
+inherit autotools eutils games
DESCRIPTION="Test your typing speed, and get your fingers CPS"
HOMEPAGE="http://typespeed.sourceforge.net/"
@@ -24,9 +24,8 @@ src_prepare() {
-e 's/testsuite//' \
-e 's/doc//' \
Makefile.am || die
- sed -i \
- -e '/^CC =/d' \
- src/Makefile.am || die
+ sed -i -e '/^CC =/d' src/Makefile.am || die
+ epatch "${FILESDIR}"/${P}-musl.patch
rm -rf m4 #417265
eautoreconf
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: games-misc/typespeed/, games-misc/typespeed/files/
@ 2020-11-15 20:03 David Seifert
0 siblings, 0 replies; 3+ messages in thread
From: David Seifert @ 2020-11-15 20:03 UTC (permalink / raw
To: gentoo-commits
commit: 0fc243064474c8e4d688e7d59e5423fe0a931840
Author: Alexey Sokolov <sokolov <AT> google <DOT> com>
AuthorDate: Sun Nov 15 20:02:50 2020 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Nov 15 20:02:50 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fc24306
games-misc/typespeed: fix build
Closes: https://bugs.gentoo.org/694840
Closes: https://bugs.gentoo.org/691256
Closes: https://bugs.gentoo.org/706518
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Signed-off-by: David Seifert <soap <AT> gentoo.org>
.../files/typespeed-0.6.5-link-tinfo.patch | 35 +++++++
.../files/typespeed-0.6.5-use-extern.patch | 116 +++++++++++++++++++++
games-misc/typespeed/typespeed-0.6.5-r2.ebuild | 47 +++++++++
3 files changed, 198 insertions(+)
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 00000000000..9ffb9cfcc56
--- /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 00000000000..cd5e4ea54c0
--- /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)
diff --git a/games-misc/typespeed/typespeed-0.6.5-r2.ebuild b/games-misc/typespeed/typespeed-0.6.5-r2.ebuild
new file mode 100644
index 00000000000..04092fb9bf5
--- /dev/null
+++ b/games-misc/typespeed/typespeed-0.6.5-r2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="Test your typing speed, and get your fingers CPS"
+HOMEPAGE="http://typespeed.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc64 ~x86"
+IUSE="nls"
+
+RDEPEND="
+ sys-libs/ncurses:0=
+ 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
+)
+
+src_prepare() {
+ default
+ sed -i -e '/^CC =/d' \
+ src/Makefile.am \
+ testsuite/Makefile.am || die
+ rm -r m4 || die #bug 417265
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable nls)
+}
+
+src_install() {
+ default
+ dodoc doc/README
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: games-misc/typespeed/, games-misc/typespeed/files/
@ 2024-03-04 5:17 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2024-03-04 5:17 UTC (permalink / raw
To: gentoo-commits
commit: 205386500401a626968efb6b5e5dba531e752fe8
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 4 05:12:27 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 4 05:16:30 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20538650
games-misc/typespeed: update EAPI 7 -> 8, fix build with LTO, fix group for leaderboard
* EAPI 8
* Fix build with LTO (-Wlto-type-mismatch)
* Fix group for leaderboard (tried to use 'games', move to 'gamestat')
* Wire up tests
Closes: https://bugs.gentoo.org/858785
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../typespeed/files/typespeed-0.6.5-gamestat.patch | 15 +++++
.../typespeed/files/typespeed-0.6.5-lto.patch | 54 ++++++++++++++++++
games-misc/typespeed/typespeed-0.6.5-r3.ebuild | 64 ++++++++++++++++++++++
3 files changed, 133 insertions(+)
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
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-04 5:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-02 1:47 [gentoo-commits] repo/gentoo:master commit in: games-misc/typespeed/, games-misc/typespeed/files/ Michael Sterrett
-- strict thread matches above, loose matches on Subject: below --
2020-11-15 20:03 David Seifert
2024-03-04 5:17 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox