diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-06-10 13:18:22 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-06-10 13:18:22 +0000 |
commit | ff4d2320a80be673d0ffa6efe3e0329892466751 (patch) | |
tree | 84e96751ee089a32bd4d921c794a13962bb99476 /games-misc/typespeed | |
parent | Stable on hppa. See bug #135027. (diff) | |
download | gentoo-2-ff4d2320a80be673d0ffa6efe3e0329892466751.tar.gz gentoo-2-ff4d2320a80be673d0ffa6efe3e0329892466751.tar.bz2 gentoo-2-ff4d2320a80be673d0ffa6efe3e0329892466751.zip |
Version bump #135071.
(Portage version: 2.1)
Diffstat (limited to 'games-misc/typespeed')
-rw-r--r-- | games-misc/typespeed/ChangeLog | 11 | ||||
-rw-r--r-- | games-misc/typespeed/files/digest-typespeed-0.5.0 | 3 | ||||
-rw-r--r-- | games-misc/typespeed/files/typespeed-0.5.0-statedir-fix.patch | 50 | ||||
-rw-r--r-- | games-misc/typespeed/files/typespeed-0.5.0-time.patch | 16 | ||||
-rw-r--r-- | games-misc/typespeed/typespeed-0.5.0.ebuild | 58 |
5 files changed, 136 insertions, 2 deletions
diff --git a/games-misc/typespeed/ChangeLog b/games-misc/typespeed/ChangeLog index bc79e7f80196..ea48cc6c4816 100644 --- a/games-misc/typespeed/ChangeLog +++ b/games-misc/typespeed/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for games-misc/typespeed -# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-misc/typespeed/ChangeLog,v 1.3 2005/08/23 20:03:36 wolf31o2 Exp $ +# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-misc/typespeed/ChangeLog,v 1.4 2006/06/10 13:18:22 vapier Exp $ + +*typespeed-0.5.0 (10 Jun 2006) + + 10 Jun 2006; Mike Frysinger <vapier@gentoo.org> + +files/typespeed-0.5.0-statedir-fix.patch, + +files/typespeed-0.5.0-time.patch, +typespeed-0.5.0.ebuild: + Version bump #135071. 24 Aug 2005; Chris Gianelloni <wolf31o2@gentoo.org> typespeed-0.4.4-r1.ebuild: diff --git a/games-misc/typespeed/files/digest-typespeed-0.5.0 b/games-misc/typespeed/files/digest-typespeed-0.5.0 new file mode 100644 index 000000000000..2aa669df4f95 --- /dev/null +++ b/games-misc/typespeed/files/digest-typespeed-0.5.0 @@ -0,0 +1,3 @@ +MD5 3e22b30fc8ea7f22d9db4b704ddf6ce6 typespeed-0.5.0.tar.gz 55333 +RMD160 6ee8afc7b6cd8619a9bec68b4a98c2792952e46d typespeed-0.5.0.tar.gz 55333 +SHA256 631fe911b465b63cd8ce86f0172a34ac91a3bf60dd2b30ed174dc36301a4eff5 typespeed-0.5.0.tar.gz 55333 diff --git a/games-misc/typespeed/files/typespeed-0.5.0-statedir-fix.patch b/games-misc/typespeed/files/typespeed-0.5.0-statedir-fix.patch new file mode 100644 index 000000000000..0decea6fc0e8 --- /dev/null +++ b/games-misc/typespeed/files/typespeed-0.5.0-statedir-fix.patch @@ -0,0 +1,50 @@ +--- typespeed-0.5.0/file.c ++++ typespeed-0.5.0/file.c +@@ -97,6 +97,7 @@ loadwords(char *filename) + + ignore = 1; + ++chdir("GENTOO_WORDLIST_PATH"); + if ((wordlist = fopen(filename, "r")) == NULL) + return 1; + +@@ -204,6 +205,7 @@ choose_wordfile(int operation) + + drawscreen(); + xcolor_set(5, NULL); ++chdir("GENTOO_WORDLIST_PATH"); + if ((n = scandir(".", &namelist, iswordlist, alphasort)) < 0) { + fputs("scandir failed.\n", stderr); + exit(1); +@@ -400,6 +402,7 @@ resetscorefile(char *sanafile) + strcpy(filetys, "high."); + strcat(filetys, sanafile); + ++chdir("GENTOO_HIGHSCORE_PATH"); + if ((highfile = fopen(filetys, "w")) != NULL) { + for (i = 0; i < 10; i++) { + fwrite(entry[i], sizeof(struct list), 1, highfile); +@@ -432,6 +435,7 @@ loadhighscores(char *sanafile) + drawscreen(); + xcolor_set(4, NULL); + ++chdir("GENTOO_HIGHSCORE_PATH"); + if ((highfile = fopen(filetys, "r")) != NULL) { + mvaddstr(1, 0, + "Top10 (score) (name) (level) (cps) (tcps) (typoinfos)"); +@@ -500,6 +504,7 @@ addtop10(char *sanaf, struct stats *stat + strcpy(filet, "high."); + strcat(filet, sanaf); + ++chdir("GENTOO_HIGHSCORE_PATH"); + if ((highf = fopen(filet, "r")) != NULL) + fclose(highf); + else +@@ -643,6 +648,7 @@ makescorefiles(void) + int n; + struct dirent **namelist; + ++chdir("GENTOO_HIGHSCORE_PATH"); + if ((n = scandir(".", &namelist, iswordlist, alphasort)) < 0) { + fputs("scandir failed.\n", stderr); + exit(1); diff --git a/games-misc/typespeed/files/typespeed-0.5.0-time.patch b/games-misc/typespeed/files/typespeed-0.5.0-time.patch new file mode 100644 index 000000000000..1136f1b77953 --- /dev/null +++ b/games-misc/typespeed/files/typespeed-0.5.0-time.patch @@ -0,0 +1,16 @@ +Fix build failure where 'clock_t' isn't defined: + +cc -O2 -march=k8 -pipe -Wimplicit-function-declaration -Wall -c typespeed.c +misc.c:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'timenow' +make: *** [misc.o] Error 1 + +--- misc.c ++++ misc.c +@@ -23,6 +23,7 @@ + * misc.c - misc functions + */ + ++#include <time.h> + #include <sys/time.h> + + #include <curses.h> diff --git a/games-misc/typespeed/typespeed-0.5.0.ebuild b/games-misc/typespeed/typespeed-0.5.0.ebuild new file mode 100644 index 000000000000..f6e9c0b7610c --- /dev/null +++ b/games-misc/typespeed/typespeed-0.5.0.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-misc/typespeed/typespeed-0.5.0.ebuild,v 1.1 2006/06/10 13:18:22 vapier Exp $ + +inherit eutils games + +DESCRIPTION="Test your typing speed, and get your fingers CPS" +HOMEPAGE="http://tobias.eyedacor.org/typespeed/" +SRC_URI="http://tobias.eyedacor.org/typespeed/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +DEPEND="sys-libs/ncurses" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-time.patch + epatch "${FILESDIR}"/${P}-statedir-fix.patch + sed -i \ + -e "s:GENTOO_WORDLIST_PATH:${GAMES_DATADIR}/${PN}:" \ + -e "s:GENTOO_HIGHSCORE_PATH:${GAMES_STATEDIR}/${PN}:" \ + file.c || die + sed -i \ + -e '/^CC =/d' \ + -e '/^CFLAGS =/s:=.*:+= -Wall:' \ + Makefile || die "sed failed" + local f + for f in words.* ; do + touch high.${f} + done +} + +src_install() { + dogamesbin typespeed || die "dogamesbin failed" + dodir "${GAMES_DATADIR}/${PN}" + cp words* "${D}${GAMES_DATADIR}/${PN}/" || die "cp failed" + dodoc README TODO Changes BUGS + doman typespeed.6 + insinto "${GAMES_STATEDIR}/${PN}" + doins high.words.* || die "doins failed" + prepgamesdirs + chmod g+w "${D}${GAMES_STATEDIR}"/${PN}/* +} + +pkg_postrm() { + echo + einfo "${PN} scorefiles was installed into ${GAMES_STATEDIR}/${PN}" + einfo "and haven't been removed." + einfo "To get rid of ${PN} completely, you can safely remove" + einfo "${GAMES_STATEDIR}/${PN} running:" + echo + einfo "rm -rf ${GAMES_STATEDIR}/${PN}" + echo +} |