aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2007-12-17 07:10:49 +0000
committerPav Lucistnik <pav@FreeBSD.org>2007-12-17 07:10:49 +0000
commit64d5979e9d09cd0c6316191a4d9e0266a5945671 (patch)
tree494993fbbe293bd604f816303149756459b47f6b /games
parent68af2b6c24cc66056a7457e518c0f6082217a31b (diff)
downloadports-64d5979e9d09cd0c6316191a4d9e0266a5945671.tar.gz
ports-64d5979e9d09cd0c6316191a4d9e0266a5945671.zip
Notes
Diffstat (limited to 'games')
-rw-r--r--games/typespeed/Makefile48
-rw-r--r--games/typespeed/distinfo6
-rw-r--r--games/typespeed/files/patch-file.c11
-rw-r--r--games/typespeed/files/pkg-deinstall.in10
-rw-r--r--games/typespeed/files/pkg-install.in22
-rw-r--r--games/typespeed/pkg-plist28
6 files changed, 49 insertions, 76 deletions
diff --git a/games/typespeed/Makefile b/games/typespeed/Makefile
index 79c18710ac94..e39ab9448239 100644
--- a/games/typespeed/Makefile
+++ b/games/typespeed/Makefile
@@ -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,36 @@ MASTER_SITES= http://tobias.eyedacor.org/typespeed/ \
MAINTAINER= ports@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"
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}\"
+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 \;
post-install:
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
diff --git a/games/typespeed/distinfo b/games/typespeed/distinfo
index d0e840b73179..59e1d29f819b 100644
--- a/games/typespeed/distinfo
+++ b/games/typespeed/distinfo
@@ -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 --git a/games/typespeed/files/patch-file.c b/games/typespeed/files/patch-file.c
deleted file mode 100644
index 672ab49f0b2c..000000000000
--- a/games/typespeed/files/patch-file.c
+++ /dev/null
@@ -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 --git a/games/typespeed/files/pkg-deinstall.in b/games/typespeed/files/pkg-deinstall.in
index 1b2456a7b144..003858bfc436 100644
--- a/games/typespeed/files/pkg-deinstall.in
+++ b/games/typespeed/files/pkg-deinstall.in
@@ -3,14 +3,12 @@
# $FreeBSD$
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 --git a/games/typespeed/files/pkg-install.in b/games/typespeed/files/pkg-install.in
index 1099653d4116..824e1e5e658b 100644
--- a/games/typespeed/files/pkg-install.in
+++ b/games/typespeed/files/pkg-install.in
@@ -3,7 +3,8 @@
# $FreeBSD$
SCOREDIR="%%SCOREDIR%%"
-SCORECAT="%%SCORECAT%%"
+SCOREFILE="%%SCOREFILE%%"
+WRKSRC="%%WRKSRC%%"
[ "$2" != "POST-INSTALL" ] && exit 0
@@ -12,13 +13,12 @@ if [ ! -d "${SCOREDIR}" ]; then
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
+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 --git a/games/typespeed/pkg-plist b/games/typespeed/pkg-plist
index c3471cf7fb97..5ac129b6e3c6 100644
--- a/games/typespeed/pkg-plist
+++ b/games/typespeed/pkg-plist
@@ -3,17 +3,19 @@ bin/typespeed-hs-conv
@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
+@dirrm %%DATADIR%%/words
@dirrm %%DATADIR%%