ports/118553: [UPDATE]: games/typespeed to 0.6.4
Tor Halvard Furulund
squat at squat.no
Tue Dec 11 16:10:04 UTC 2007
>Number: 118553
>Category: ports
>Synopsis: [UPDATE]: games/typespeed to 0.6.4
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Tue Dec 11 16:10:03 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: Tor Halvard Furulund
>Release: FreeBSD 6.2-p9 i386
>Organization:
>Environment:
System: FreeBSD 6.2-release-p9
>Description:
- Update from 0.5.2 to 0.6.4, skipping a few years.
My solutions in the work of updating this port is mostly as ugly as the solutions in the 0.5.2-port. The doble use of absolute path should've been done in an other way. Feel free to help me in making this port better. It's about time to update it, anyway.
>How-To-Repeat:
>Fix:
diff -ruN /usr/ports/games/typespeed/Makefile typespeed/Makefile
--- /usr/ports/games/typespeed/Makefile Thu Mar 29 17:17:57 2007
+++ typespeed/Makefile Fri Dec 7 16:50:58 2007
@@ -6,8 +6,7 @@
#
PORTNAME= typespeed
-PORTVERSION= 0.5.2
-PORTREVISION= 1
+PORTVERSION= 0.6.4
CATEGORIES= games
MASTER_SITES= http://tobias.eyedacor.org/typespeed/ \
http://critical.ch/distfiles/ \
@@ -16,51 +15,41 @@
MAINTAINER= ports at FreeBSD.org
COMMENT= Test your typing speed, and get your fingers\' CPS
-USE_GETOPT_LONG=yes
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --with-highscoredir="/var/games/typespeed"
+#USE_GETOPT_LONG=yes
SCOREPREFIX?= /var/games
SCOREDIR= ${SCOREPREFIX}/typespeed
-SCORECAT= dos dut eng fin fra ger ita portuguese prog spanish thai unix
+SCOREFILE= typespeed.score
-SOURCES= file.c menu.c misc.c network.c typespeed.c
-
-LDFLAGS+= -L${LOCALBASE}/lib -lncurses
-CFLAGS+= -I${LOCALBASE}/include -D_GNU_SOURCE -DWORDDIR=\"${DATADIR}\" \
- -DHIGHDIR=\"${SCOREDIR}\" -DHIGHDIR=\"${SCOREDIR}\"
+#LDFLAGS+= -L${LOCALBASE}/lib -lncurses
+#CFLAGS+= -I${LOCALBASE}/include -D_GNU_SOURCE -DWORDDIR=\"${DATADIR}\" \
+CFLAGS+= -I${LOCALBASE}/include -DWITH_HIGHSCOREDIR=\"${SCOREDIR}\" \
+ -DHIGHDIR=\"${SCOREDIR}\" -DHIGHSCOREDIR=\"${SCOREDIR}\"
SUB_FILES= pkg-install pkg-deinstall
-SUB_LIST= SCOREDIR="${SCOREDIR}" SCORECAT="${SCORECAT}"
+SUB_LIST= SCOREDIR="${SCOREDIR}" SCOREFILE="${SCOREFILE}" WRKSRC="${WRKSRC}"
MAN1= typespeed.1
post-patch:
@${REINPLACE_CMD} -e 's|\(/etc\)|${PREFIX}\1|' \
- ${WRKSRC}/pathnames.h
-
-post-extract:
- @${ECHO} ${DATADIR} > ${WRKSRC}/typespeedrc
-
-do-build:
-# build highscore converter
- ${CC} ${CFLAGS} ${WRKSRC}/convert.c -o ${WRKSRC}/convert
-
-# build typespeed
-.for f in ${SOURCES}
- ${CC} ${CFLAGS} -c ${WRKSRC}/${f} -o ${WRKSRC}/${f:C/\.c/.o/}
-.endfor
- ${CC} ${LDFLAGS} ${SOURCES:C/(.*)\.c/${WRKSRC}\/\1.o/} \
- -o ${WRKSRC}/${PORTNAME}
+ ${WRKSRC}/src/pathnames.h
do-install:
- ${INSTALL_PROGRAM} -g games -m 2555 ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
- ${INSTALL_PROGRAM} ${WRKSRC}/convert ${PREFIX}/bin/${PORTNAME}-hs-conv
- ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.6 ${MANPREFIX}/man/man1/${MAN1}
- ${INSTALL_DATA} ${WRKSRC}/typespeedrc ${PREFIX}/etc/typespeedrc.dist
+ ${INSTALL_PROGRAM} -g games -m 2555 ${WRKSRC}/src/${PORTNAME} ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/convert ${PREFIX}/bin/${PORTNAME}-hs-conv
+ ${INSTALL_MAN} ${WRKSRC}/man/${PORTNAME}.6 ${MANPREFIX}/man/man1/${MAN1}+ ${INSTALL_DATA} ${WRKSRC}/etc/typespeedrc ${PREFIX}/etc/typespeedrc.dist .if !exists(${PREFIX}/etc/typespeedrc)
- ${INSTALL_DATA} ${WRKSRC}/typespeedrc ${PREFIX}/etc
+ ${INSTALL_DATA} ${WRKSRC}/etc/typespeedrc ${PREFIX}/etc
.endif
${MKDIR} ${DATADIR}
- ${FIND} ${WRKSRC} -name "words.*" -type f \
- -exec ${INSTALL_DATA} {} ${DATADIR} \;
+ ${MKDIR} ${DATADIR}/words
+ ${FIND} ${WRKSRC}/words/ -name "words.*" -type f \
+ -exec ${INSTALL_DATA} {} ${DATADIR}/words \;
+# ${MKDIR} ${DATADIR}
+# ${INSTALL_PROGRAM} -g games -m 0464 ${WRKSRC}/src/${PORTNAME}.score ${SCOREDIR}/${PORTNAME}.score.default
post-install:
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
diff -ruN /usr/ports/games/typespeed/distinfo typespeed/distinfo
--- /usr/ports/games/typespeed/distinfo Thu Sep 7 18:11:49 2006
+++ typespeed/distinfo Mon Dec 3 10:57:51 2007
@@ -1,3 +1,3 @@
-MD5 (typespeed-0.5.2.tar.gz) = 6e619816d4d2637f132fe951ea3a073e
-SHA256 (typespeed-0.5.2.tar.gz) = f3ad53dd5bc043f5f329ff3f488d5d98cd68605b7e2a7845f3e26289f772526d
-SIZE (typespeed-0.5.2.tar.gz) = 57374
+MD5 (typespeed-0.6.4.tar.gz) = fb55b92ad7e29a1a6a7a3e1ca383d5e2
+SHA256 (typespeed-0.6.4.tar.gz) = 80eafbbdb87720d6ca57bfbd3f5eaa5b66c1f2a4ec3a4a5ce9b0e01335a02644
+SIZE (typespeed-0.6.4.tar.gz) = 250596
diff -ruN /usr/ports/games/typespeed/files/patch-file.c typespeed/files/patch-file.c
--- /usr/ports/games/typespeed/files/patch-file.c Thu Jun 22 13:28:04 2006+++ typespeed/files/patch-file.c Thu Jan 1 01:00:00 1970
@@ -1,11 +0,0 @@
---- file.c.orig Thu Jun 22 12:15:04 2006
-+++ file.c Thu Jun 22 12:18:11 2006
-@@ -393,7 +393,7 @@
- entry[8] = newentry( 0, 0, 0 , 0 , 0, "None");
- entry[9] = newentry( 0, 0, 0 , 0 , 0, "None");
-
-- n = snprintf(filetys, sizeof(filetys), "%s/high.%s", highdir, sanafile);-+ n = snprintf(filetys, sizeof(filetys), "%s/high.%s.default", highdir, sanafile);
- if (n < 6 || (size_t)n > sizeof(filetys) - 1)
- return 1;
-
diff -ruN /usr/ports/games/typespeed/files/pkg-deinstall.in typespeed/files/pkg-deinstall.in
--- /usr/ports/games/typespeed/files/pkg-deinstall.in Thu Jun 22 13:28:04 2006+++ typespeed/files/pkg-deinstall.in Fri Dec 7 17:11:33 2007
@@ -3,14 +3,12 @@
# $FreeBSD: ports/games/typespeed/files/pkg-deinstall.in,v 1.1 2006/06/22 11:28:04 ehaupt Exp $
SCOREDIR="%%SCOREDIR%%"
-SCORECAT="%%SCORECAT%%"
+SCOREFILE="%%SCOREFILE%%"
[ "$2" != "DEINSTALL" ] && exit 0
-for cat in $SCORECAT; do
- file="$SCOREDIR/high.words.$cat"
- cmp -s "$file" "$file.default" && rm -f "$file"
- rm -f "$file.default"
-done
+file="${SCOREDIR}/${SCOREFILE}"
+cmp -s "$file" "$file.default" && rm -f "$file"
+rm -f "$file.default"
rmdir "$SCOREDIR" > /dev/null 2>&1 || true
diff -ruN /usr/ports/games/typespeed/files/pkg-install.in typespeed/files/pkg-install.in
--- /usr/ports/games/typespeed/files/pkg-install.in Thu Jun 22 13:28:04 2006+++ typespeed/files/pkg-install.in Fri Dec 7 16:56:11 2007
@@ -3,7 +3,8 @@
# $FreeBSD: ports/games/typespeed/files/pkg-install.in,v 1.1 2006/06/22 11:28:04 ehaupt Exp $
SCOREDIR="%%SCOREDIR%%"
-SCORECAT="%%SCORECAT%%"
+SCOREFILE="%%SCOREFILE%%"
+WRKSRC="%%WRKSRC%%"
[ "$2" != "POST-INSTALL" ] && exit 0
@@ -12,13 +13,13 @@
chown root:games ${SCOREDIR}
fi
-typespeed --makescore
-
-for cat in $SCORECAT; do
- file="${SCOREDIR}/high.words.$cat"
- if [ -f "$file" ]; then
- cmp -s "$file" "$file.default" && install -o root -g games -m 464 "$file.default" "$file"
- else
- install -o root -g games -m 464 "$file.default" "$file"
- fi
-done
+#typespeed --makescore
+install -o root -g games -m 0464 ${WRKSRC}/src/${SCOREFILE} ${SCOREDIR}/${SCOREFILE}.default
+
+file="${SCOREDIR}/${SCOREFILE}"
+if [ -f "$file" ]; then
+ cmp -s "$file" "$file.default" && install -o root -g games -m 464 "$file.default" "$file"
+else
+ install -o root -g games -m 464 "$file.default" "$file"
+fi
+true
diff -ruN /usr/ports/games/typespeed/pkg-plist typespeed/pkg-plist
--- /usr/ports/games/typespeed/pkg-plist Thu Sep 7 18:11:49 2006
+++ typespeed/pkg-plist Fri Dec 7 15:35:25 2007
@@ -3,17 +3,20 @@
@unexec if cmp -s %D/etc/typespeedrc %D/etc/typespeedrc.dist; then rm -f %D/etc/typespeedrc; fi
etc/typespeedrc.dist
@exec [ -f %B/typespeedrc ] || cp %B/%f %B/typespeedrc
-%%DATADIR%%/words.dos
-%%DATADIR%%/words.dut
-%%DATADIR%%/words.eng
-%%DATADIR%%/words.fin
-%%DATADIR%%/words.fra
-%%DATADIR%%/words.ger
-%%DATADIR%%/words.ita
-%%DATADIR%%/words.portuguese
-%%DATADIR%%/words.prog
-%%DATADIR%%/words.spanish
-%%DATADIR%%/words.test
-%%DATADIR%%/words.thai
-%%DATADIR%%/words.unix
+%%DATADIR%%/words/words.csharp
+%%DATADIR%%/words/words.csharp_with_operators
+%%DATADIR%%/words/words.dos
+%%DATADIR%%/words/words.dut
+%%DATADIR%%/words/words.eng
+%%DATADIR%%/words/words.esp
+%%DATADIR%%/words/words.fin
+%%DATADIR%%/words/words.fra
+%%DATADIR%%/words/words.ger
+%%DATADIR%%/words/words.ita
+%%DATADIR%%/words/words.por
+%%DATADIR%%/words/words.prog
+%%DATADIR%%/words/words.tha
+%%DATADIR%%/words/words.unix
+ at dirrm %%DATADIR%%/words/
@dirrm %%DATADIR%%
+
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list