public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-misc/typespeed/, games-misc/typespeed/files/
Date: Mon,  4 Mar 2024 05:17:13 +0000 (UTC)	[thread overview]
Message-ID: <1709529390.205386500401a626968efb6b5e5dba531e752fe8.sam@gentoo> (raw)

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
+}


             reply	other threads:[~2024-03-04  5:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04  5:17 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-11-15 20:03 [gentoo-commits] repo/gentoo:master commit in: games-misc/typespeed/, games-misc/typespeed/files/ David Seifert
2016-01-02  1:47 Michael Sterrett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1709529390.205386500401a626968efb6b5e5dba531e752fe8.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox