diff options
Diffstat (limited to 'games-misc/typespeed')
-rw-r--r-- | games-misc/typespeed/Manifest | 4 | ||||
-rw-r--r-- | games-misc/typespeed/files/typespeed-0.6.5-link-tinfo.patch | 35 | ||||
-rw-r--r-- | games-misc/typespeed/files/typespeed-0.6.5-use-extern.patch | 116 | ||||
-rw-r--r-- | games-misc/typespeed/typespeed-0.6.5-r2.ebuild (renamed from games-misc/typespeed/typespeed-0.6.5-r1.ebuild) | 34 |
4 files changed, 172 insertions, 17 deletions
diff --git a/games-misc/typespeed/Manifest b/games-misc/typespeed/Manifest index 38b83363829f..23dfe33b319c 100644 --- a/games-misc/typespeed/Manifest +++ b/games-misc/typespeed/Manifest @@ -1,4 +1,6 @@ +AUX typespeed-0.6.5-link-tinfo.patch 1207 BLAKE2B 364daa1006f070f966ba2e27a25a145f2985b4f10042f3e779e9bc2285b45f8d69d93ad22465d2cce72c9ad0675844440c26cd6d33c28dd6fb3f61481d22c040 SHA512 f8a5cc7588d7cb5d5ef29b60f7ba09ac90f486cfc2efe105dfe0060fe26b6265254c77f1793b69d7a9d60f915e145e20819b64fe5cb3c63d82af04b4d5bc81d5 AUX typespeed-0.6.5-musl.patch 418 BLAKE2B c1af19bfbb0c05d3cbc0c4308ff89ecdad0825d8e77b19d32b02d8ba410538ead7c90a20f31083174cf0e0cd9a428cb4070ef76949c105c2768086ac6fbcc81e SHA512 3f5f2d1d1fd85e1829fb024bfbf355b945c04bd0a624b3e2a86dbe029f64d15473c66c7410bd4013d263fcf3142474e2ac92656699aebc0570c62d8a18a4b635 +AUX typespeed-0.6.5-use-extern.patch 2482 BLAKE2B 61614a47fec82e9d0796bc7056a147665257d6e7ee44f9a240d64d6caf0eb8153acd1f90854af689fefd3c546e31c7a15b01dc95a117bfcdfe171fc55762a880 SHA512 f20a8c8774748175d48a10d790463160b23b9279f1974a5ec77314f93c52bef827384dc0e35a5eab09cb066a8352cdab745c59d300b371a2a2e9b9e8713a2d1d DIST typespeed-0.6.5.tar.gz 254170 BLAKE2B ce39d5e7d31a068a34deafa1c81dc69b028339d4f8e7461e5bfce335bdc47885b224f33efc7eb02765a2ae0cc1d1b52559b210a04fa0a549d54093dbc816acc0 SHA512 cf3a8cdeb5fb1ee81bd5cf50d6b2aca1e7331b0bfde518c38050abae35ca617fbeed5bf2a37830a7568712ab71920f60c89197317a2721ae8c89829b0eede190 -EBUILD typespeed-0.6.5-r1.ebuild 815 BLAKE2B 0abcf0a804384eca3295340f306629361c315886e12895001bdf31ca2b2de61f826b7752d13b22e201caf11c4e1a74f506467071559ccaf9490cb552743fb7e2 SHA512 237f57ede6fa954e9be852a888df57c0f128e802dffc73a71e23c597ee524a63a3fbbc70327523b3f1509cbe1dd4ccd72b2d289dbcc6ff205a58358ca225d697 +EBUILD typespeed-0.6.5-r2.ebuild 855 BLAKE2B ab41de4f169d989a279fdbfd0be8b7071fec7ced55bb2b3b98120ee5a9217a9325c5299fdfe18c228426375f56d91e6becd6922ffc12db102d73fa5663dd2382 SHA512 450e78b9a468c7858f3cde08f9ab12e99218da3a0b1263dc6ed5462eef794c7926130e033c50eaf69d19c7fed2c2369d7974475f48085027b47e9dc51cb2af75 MISC metadata.xml 332 BLAKE2B a7dea2ab5d54a1bf0455a41fa30f7bfb1eee06f547e2b14ce5b7d63dbf826ae43287304a331754829819addceade50bae557de63fb7d0536cf0573342ef42734 SHA512 3038edc39a8e186f2d054ff72afd3f28e62e116e436bd818080e65dc8cea1a93b5e41658c86709ca70a9df91116631b90deaefb1dc5cbe77e9f6e802e9b5af1e 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) diff --git a/games-misc/typespeed/typespeed-0.6.5-r1.ebuild b/games-misc/typespeed/typespeed-0.6.5-r2.ebuild index 9e0c90a21b2a..04092fb9bf55 100644 --- a/games-misc/typespeed/typespeed-0.6.5-r1.ebuild +++ b/games-misc/typespeed/typespeed-0.6.5-r2.ebuild @@ -1,7 +1,8 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 + inherit autotools DESCRIPTION="Test your typing speed, and get your fingers CPS" @@ -15,28 +16,29 @@ IUSE="nls" RDEPEND=" sys-libs/ncurses:0= - nls? ( virtual/libintl ) -" -DEPEND="${RDEPEND} - nls? ( sys-devel/gettext ) -" + 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 's/testsuite//' \ - -e 's/doc//' \ - Makefile.am || die - sed -i -e '/^CC =/d' src/Makefile.am || die - eapply "${FILESDIR}"/${P}-musl.patch - rm -rf m4 #417265 + sed -i -e '/^CC =/d' \ + src/Makefile.am \ + testsuite/Makefile.am || die + rm -r m4 || die #bug 417265 eautoreconf } src_configure() { - econf \ - --localedir=/usr/share/locale \ - $(use_enable nls) + econf $(use_enable nls) } src_install() { |