svn commit: r346286 - in head/misc/dvorak7min: . files
Martin Wilke
miwi at FreeBSD.org
Thu Feb 27 09:10:26 UTC 2014
Author: miwi
Date: Thu Feb 27 09:10:24 2014
New Revision: 346286
URL: http://svnweb.freebsd.org/changeset/ports/346286
QAT: https://qat.redports.org/buildarchive/r346286/
Log:
- Update MASTER_SITES and WWW: line
- Add LICENSE
PR: 187046
Submitted by: Ports Fury
Added:
head/misc/dvorak7min/files/patch-lessons.c (contents, props changed)
Modified:
head/misc/dvorak7min/Makefile
head/misc/dvorak7min/distinfo
head/misc/dvorak7min/files/patch-dvorak7min.c
head/misc/dvorak7min/pkg-descr
Modified: head/misc/dvorak7min/Makefile
==============================================================================
--- head/misc/dvorak7min/Makefile Thu Feb 27 09:09:17 2014 (r346285)
+++ head/misc/dvorak7min/Makefile Thu Feb 27 09:10:24 2014 (r346286)
@@ -3,23 +3,30 @@
PORTNAME= dvorak7min
PORTVERSION= 1.6.1
+PORTREVISION= 1
CATEGORIES= misc
-MASTER_SITES= http://www.linalco.com/ragnar/
+MASTER_SITES= DEBIAN
+DISTNAME= ${PORTNAME}_${PORTVERSION}.orig
MAINTAINER= ports at FreeBSD.org
-COMMENT= An ncurses-based Dvorak typing tutor
+COMMENT= Ncurses-based Dvorak typing tutor
-DEPRECATED= No more public distfiles
-EXPIRATION_DATE= 2014-03-10
+LICENSE= GPLv2 # (or later)
-.include <bsd.port.pre.mk>
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-MAKE_ARGS= PROF="${CPPFLAGS} ${CFLAGS}" LDFLAGS="${LDFLAGS}"
+post-patch:
+ @${REINPLACE_CMD} -e \
+ 's|^\(PROF\)|#\1| ; \
+ /^CFLAGS/s|\([[:space:]]\)=|\1+=| ; \
+ s|^\(LDFLAGS\)|#\1| ; \
+ s|-lncurses|-lcurses|' ${WRKSRC}/Makefile
pre-build:
- @cd ${WRKSRC} ; ${MAKE} clean
+ @${RM} -f ${WRKSRC}/*.o
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/dvorak7min ${STAGEDIR}${PREFIX}/bin
+ (cd ${WRKSRC} && ${INSTALL_PROGRAM} dvorak7min \
+ ${STAGEDIR}${PREFIX}/bin)
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Modified: head/misc/dvorak7min/distinfo
==============================================================================
--- head/misc/dvorak7min/distinfo Thu Feb 27 09:09:17 2014 (r346285)
+++ head/misc/dvorak7min/distinfo Thu Feb 27 09:10:24 2014 (r346286)
@@ -1,2 +1,2 @@
-SHA256 (dvorak7min-1.6.1.tar.gz) = f0b5be8b44782904717adea087fc936cd4941d6885fe5d8d0a60a5c8467f15c5
-SIZE (dvorak7min-1.6.1.tar.gz) = 53115
+SHA256 (dvorak7min_1.6.1.orig.tar.gz) = f0b5be8b44782904717adea087fc936cd4941d6885fe5d8d0a60a5c8467f15c5
+SIZE (dvorak7min_1.6.1.orig.tar.gz) = 53115
Modified: head/misc/dvorak7min/files/patch-dvorak7min.c
==============================================================================
--- head/misc/dvorak7min/files/patch-dvorak7min.c Thu Feb 27 09:09:17 2014 (r346285)
+++ head/misc/dvorak7min/files/patch-dvorak7min.c Thu Feb 27 09:10:24 2014 (r346286)
@@ -8,3 +8,74 @@
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
+@@ -173,7 +172,8 @@
+ /* calculate typing speed in a given interval */
+ inline float calcSpeed (time_t timeStart, time_t timeFinish, int hits)
+ {
+- return (float) hits / (timeFinish - timeStart);
++ // Use WPS/WPM as better standard, so also divide by 5
++ return (float) hits / 5 / (timeFinish - timeStart);
+ }
+
+
+@@ -193,7 +193,7 @@
+
+ file = fopen (fileName, "r");
+ if (!file) {
+- postmortem = sys_errlist[errno];
++ postmortem = strerror(errno);
+ return -1;
+ }
+
+@@ -220,7 +220,7 @@
+ while (1) {
+ c = fgetc (file);
+ if (errno) {
+- postmortem = sys_errlist[errno];
++ postmortem = strerror(errno);
+ fclose (file);
+ return -1;
+ }
+@@ -418,6 +418,7 @@
+ ++p;
+ if (!timeStart) {
+ timeStart = time(0);
++ hits = 0;
+ }
+ }
+
+@@ -431,8 +432,9 @@
+ float ratio = hits - misses;
+ ratio = (ratio < 0) ? 0 : (100.0 * ratio / hits);
+ timeCurrent = time(0);
+- speed = calcSpeed (timeStart, timeCurrent, hits);
+- mvprintw (LINES - 1, 0, "CPS %.2f CPM %.2f Hits: %d Misses: %d Seconds: %d Ratio: %.2f%%", speed, speed * 60, hits, misses, time(0) - timeStart, ratio);
++ speed = calcSpeed (timeStart, timeCurrent, hits + misses);
++ // Use WPS/WPM as better standards
++ mvprintw (LINES - 1, 0, "WPS %.2f WPM %.2f Hits: %d Misses: %d Seconds: %d Ratio: %.2f%%", speed, speed * 60, hits, misses, time(0) - timeStart, ratio);
+ clrtoeol();
+ }
+ } while (ch == ERR);
+@@ -510,7 +512,7 @@
+ }
+
+ timeFinish = time(0);
+- speed = calcSpeed(timeStart, timeFinish, hits);
++ speed = calcSpeed(timeStart, timeFinish, hits + misses);
+ clear();
+ cbreak();
+ if (!timeStart) {
+@@ -519,8 +521,11 @@
+ float ratio = hits - misses;
+ ratio = (ratio < 0) ? 0 : (100.0 * ratio / hits);
+ mvprintw (0, 0, "Elapsed time: %d seconds", timeFinish - timeStart);
+- mvprintw (1, 0, "Total: %d Misses: %d Ratio: %.2f%%", hits, misses, ratio);
+- mvprintw (2, 0, "CPS: %.2f CPM: %.2f", speed, speed * 60);
++ mvprintw (1, 0, "Total: %d Misses: %d Ratio: %.2f%%",
++ hits + misses, misses,
++ (float)100*(hits) / (hits + misses));
++ // Use WPM/WPS as better standard
++ mvprintw (2, 0, "WPS: %.2f WPM: %.2f", speed, speed * 60);
+ }
+
+ mvprintw (4, 0, "[ ] Press ESCAPE to continue.");
Added: head/misc/dvorak7min/files/patch-lessons.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/dvorak7min/files/patch-lessons.c Thu Feb 27 09:10:24 2014 (r346286)
@@ -0,0 +1,66 @@
+--- lessons.c.orig
++++ lessons.c
+@@ -166,6 +166,7 @@
+ "gggg pppp gggg pppp gggg pppp gggg pppp gggg pppp gggg pppp gggg ppp\n"
+ "pg pg pg pg pg pg pg pg pg pg pg pg pg pg pg pg pg pg pg pg pg pg pg\n"
+ "gp gp gp gp gp gp gp gp gp gp gp gp gp gp gp gp gp gp gp gp gp gp gp\n"
++"\x1"
+ "gggg hhhh pppp uuuu gggg hhhh pppp uuuu gggg hhhh pppp uuuu\n"
+ "up up up up hug hug hug hug pug pug pug pug pup pup pup pup\n"
+ "ugh ugh ugh ugh Hugh Hugh Hugh Hugh Pugh Pugh Pugh Pugh",
+@@ -263,7 +264,7 @@
+ "The catchup accident at the picnic depicted Dutch as an apathetic nuisance.\n"
+ "It is no coincidence that this idiotic sentence has eight concise Cs in it.\n"
+ "The enthusiastic duchess noticed the Pontiac coupe...and decided to chase it."
+-"\1"
++"\x1"
+ "I detect a headache...I hope it is not the\n"
+ "Schnapps and Cocoa I had as a nightcap.\n"
+ "\n"
+@@ -362,11 +363,12 @@
+ "Allegra, an unparalleled intellectual, calculated the celestial latitudes and\n"
+ "longitudes in her sleep.",
+
+- "YF: index fingers streching up",
++ "YF: index fingers stretching up",
+ "\x2"
+ "ffff yyyy ffff yyyy ffff yyyy ffff yyyy ffff yyyy ffff yyyy ffff yyyy\n"
+ "ffff yyyy ffff yyyy ffff yyyy ffff yyyy ffff yyyy ffff yyyy ffff yyyy\n"
+ "fy fy fy fy fy fy fy yf yf yf yf yf yf yf ffff gggg hhhh yyyy pppp uuuu\n"
++"\x1"
+ "guy guy guy guy guy guy guy guy guy gyp gyp gyp gyp gyp gyp gyp gyp gyp\n"
+ "UHF UHF UHF UHF UHF UHF UHF UHF UHF yuh yuh yuh yuh yuh yuh yuh yuh yuh\n"
+ "huff huff huff huff huff huff huff puff puff puff puff puff puff puff\n"
+@@ -406,6 +408,7 @@
+ "kkkk mmmm kkkk mmmm kkkk mmmm kkkk mmmm kkkk mmmm kkkk mmmm\n"
+ "kkkk mmmm kkkk mmmm kkkk mmmm kkkk mmmm kkkk mmmm kkkk mmmm\n"
+ "km km km km km km km km km km mk mk mk mk mk mk mk mk mk mk\n"
++"\x1"
+ "hhhh kkkk mmmm uuuu hhhh kkkk mmmm uuuu hhhh kkkk mmmm uuuu\n"
+ "ku ku ku ku ku ku ku ku ku ku mu mu mu mu mu mu mu mu mu mu\n"
+ "UK UK UK UK UK UK UK UK UK UK UK UK UK UK UK UK UK UK UK UK\n"
+@@ -442,6 +445,7 @@
+ "jjjj wwww jjjj wwww jjjj wwww jjjj wwww jjjj wwww jjjj wwww\n"
+ "jjjj wwww jjjj wwww jjjj wwww jjjj wwww jjjj wwww jjjj wwww\n"
+ "jw jw jw jw jw jw jw jw jw jw jw wj wj wj wj wj wj wj wj wj\n"
++"\x1"
+ "eeee jjjj tttt wwww eeee jjjj tttt wwww eeee jjjj tttt wwww\n"
+ "ewe ewe ewe ewe ewe jet jet jet jet jet Jew Jew Jew Jew Jew\n"
+ "wee wee wee wee wee wee wee wet wet wet wet wet wet wet wet\n"
+@@ -500,6 +504,7 @@
+ "An acquisitive mind helped Pavlov evolve his theories.\n"
+ "QVC's involvement with Paramount may give it new verve.\n"
+ "Vivian's new Volvo unequivocally vanquished her fears of driving.\n"
++"\x1"
+ "According to Pravda, Vladivostok was a quiet village in its Soviet days.\n"
+ "This unique, opaque liquor does not quench your thirst, it makes you queasy.\n"
+ "David's vivid imagination and his inquisitive and inventive mind suggest a high IQ."
+@@ -548,7 +553,7 @@
+ "activity; several lizards hazarded the freezing waters and capsized the fish\n"
+ "tanks; a dozen grizzlies were waltzing in the plaza.",
+
+- "XB: index fingers streching down",
++ "XB: index fingers stretching down",
+ "\x2"
+ "bbbb xxxx bbbb xxxx bbbb xxxx bbbb xxxx bbbb xxxx bbbb xxxx\n"
+ "bbbb xxxx bbbb xxxx bbbb xxxx bbbb xxxx bbbb xxxx bbbb xxxx\n"
Modified: head/misc/dvorak7min/pkg-descr
==============================================================================
--- head/misc/dvorak7min/pkg-descr Thu Feb 27 09:09:17 2014 (r346285)
+++ head/misc/dvorak7min/pkg-descr Thu Feb 27 09:10:24 2014 (r346286)
@@ -4,6 +4,5 @@ lessons, color for easy visual feedback,
second display. It's called 7min because it originally was a personal
hack written in 7 min.
-Author: Ragnar Hojland Espinosa <ragnar at ragnar-hojland.com>
-WWW: http://www.linalco.com/comunidad.html
- http://freshmeat.net/projects/dvorak7mintutor/
+Author: Ragnar Hojland Espinosa <ragnar at ragnar-hojland.com>
+WWW: http://packages.qa.debian.org/d/dvorak7min.html
More information about the svn-ports-all
mailing list