diff --git a/games/Makefile b/games/Makefile index c58ca8a53c70..ee155b247945 100644 --- a/games/Makefile +++ b/games/Makefile @@ -388,6 +388,7 @@ SUBDIR += tetrinet SUBDIR += tetrinet-x SUBDIR += textmaze + SUBDIR += thudboard SUBDIR += tictactoe3d SUBDIR += tileworld SUBDIR += tinymux diff --git a/games/thudboard/Makefile b/games/thudboard/Makefile new file mode 100644 index 000000000000..ae3f9a644efb --- /dev/null +++ b/games/thudboard/Makefile @@ -0,0 +1,41 @@ +# New ports collection makefile for: ThudBoard +# Date created: 04 Januar 2004 +# Whom: Jan Stocker +# +# $FreeBSD$ +# + +PORTNAME= thudboard +PORTVERSION= 0.9.6 +CATEGORIES= games +MASTER_SITES= http://www.million.nl/file/ + +MAINTAINER= Jan.Stocker@t-online.de +COMMENT= The Discworld Boardgame Board + +RUN_DEPENDS= ${PYTHON_SITELIBDIR}/_tkinter.so:${PORTSDIR}/x11-toolkits/py-tkinter + +USE_PYTHON= yes + +WRKSRC= ${WRKDIR}/thud + +do-configure: + @${SED} -e "s#%%PREFIX%%#${PREFIX}# ; s#%%PYTHON_CMD%%#${PYTHON_CMD}#" \ + ${FILESDIR}/thudboard > ${WRKDIR}/thudboard.tmp + +do-build: + @${FIND} ${WRKSRC} -name "*.pyc" | ${XARGS} ${RM} + @${FIND} ${WRKSRC} \( -type f -or -type l \) | ${XARGS} ${CHMOD} 644 + @${FIND} ${WRKSRC} -type d | ${XARGS} ${CHMOD} 755 + @${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC} 2>/dev/null + +do-install: + @${RM} -f ${WRKSRC}/battle.py.orig + @${MKDIR} ${DATADIR} + @${TAR} -C ${WRKSRC} --exclude="docs*" -cf - . | ${TAR} -C ${DATADIR} --unlink -xf - + @${INSTALL_SCRIPT} ${WRKDIR}/thudboard.tmp ${PREFIX}/bin/thudboard +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + @${TAR} -C ${WRKSRC}/docs/ -cf - . | ${TAR} -C ${DOCSDIR} --unlink -xf - +.endif +.include diff --git a/games/thudboard/distinfo b/games/thudboard/distinfo new file mode 100644 index 000000000000..8e02f5bacb07 --- /dev/null +++ b/games/thudboard/distinfo @@ -0,0 +1 @@ +MD5 (thudboard-0.9.6.tar.gz) = ff94f07769147d7c3dd6c84c7bf22eb6 diff --git a/games/thudboard/files/patch-battles.py b/games/thudboard/files/patch-battles.py new file mode 100644 index 000000000000..a4b35ff1aec9 --- /dev/null +++ b/games/thudboard/files/patch-battles.py @@ -0,0 +1,14 @@ +--- battle.py.orig Tue Jan 13 17:49:47 2004 ++++ battle.py Tue Jan 13 17:50:54 2004 +@@ -411,9 +411,9 @@ + filename = self.filename + if not filename: + filename = self.name +- filename = os.sep.join([os.getcwd(), "battles", filename+".thud"]) ++ filename = os.sep.join(["~/.thudboard/", "battles", filename+".thud"]) + if not self.name or filename=='': +- filename = os.sep.join([os.getcwd(), "battles", ""]) ++ filename = os.sep.join(["~/.thudboard/", "battles", ""]) + return filename + + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# diff --git a/games/thudboard/files/thudboard b/games/thudboard/files/thudboard new file mode 100644 index 000000000000..f4a3a0d6ad38 --- /dev/null +++ b/games/thudboard/files/thudboard @@ -0,0 +1,11 @@ +#!/bin/sh +if [ ! -e ~/.thudboard ] +then + mkdir ~/.thudboard +fi +if [ ! -e ~/.thudboard/battles ] +then + mkdir ~/.thudboard/battles +fi + +cd %%PREFIX%%/share/thudboard && %%PYTHON_CMD%% thud.pyc $* diff --git a/games/thudboard/pkg-descr b/games/thudboard/pkg-descr new file mode 100644 index 000000000000..76b1d6a7d75e --- /dev/null +++ b/games/thudboard/pkg-descr @@ -0,0 +1,12 @@ +ThudBoard - The Discworld Boardgame Board + +ThudBoard is a computer application that can be used to play Thud battles +without using the actual board. If you don't have a clue what this Thud thing +is, take a look at the official Thud site at http://www.thudgame.com. + +Multiple battles can be stored, so you can play many games simultaneously +without the onerous task of remembering where each individual piece was in +this battle you have been playing with your cousin in XXXX over the last +few years. + +WWW: http://www.million.nl/thudboard/ diff --git a/games/thudboard/pkg-plist b/games/thudboard/pkg-plist new file mode 100644 index 000000000000..c6bb76bf58cf --- /dev/null +++ b/games/thudboard/pkg-plist @@ -0,0 +1,60 @@ +bin/thudboard +%%DATADIR%%/battle.py +%%DATADIR%%/battles/annotated.thud +%%DATADIR%%/images.py +%%DATADIR%%/img/banner.gif +%%DATADIR%%/img/bcktile.gif +%%DATADIR%%/img/board-grid.gif +%%DATADIR%%/img/board.gif +%%DATADIR%%/img/check.gif +%%DATADIR%%/img/copy.gif +%%DATADIR%%/img/dwarf.gif +%%DATADIR%%/img/list.gif +%%DATADIR%%/img/lock.gif +%%DATADIR%%/img/noclip.gif +%%DATADIR%%/img/nopaste.gif +%%DATADIR%%/img/paste.gif +%%DATADIR%%/img/score.gif +%%DATADIR%%/img/stone.gif +%%DATADIR%%/img/submenubottom.gif +%%DATADIR%%/img/submenuitem.gif +%%DATADIR%%/img/submenutop.gif +%%DATADIR%%/img/thudtitle.gif +%%DATADIR%%/img/troll.gif +%%DATADIR%%/thud.ico +%%DATADIR%%/thud.py +%%DATADIR%%/battle.pyc +%%DATADIR%%/images.pyc +%%DATADIR%%/thud.pyc +%%PORTDOCS%%%%DOCSDIR%%/about.html +%%PORTDOCS%%%%DOCSDIR%%/download.html +%%PORTDOCS%%%%DOCSDIR%%/howto.html +%%PORTDOCS%%%%DOCSDIR%%/img/battleline.gif +%%PORTDOCS%%%%DOCSDIR%%/img/bcktile.gif +%%PORTDOCS%%%%DOCSDIR%%/img/copyicon.gif +%%PORTDOCS%%%%DOCSDIR%%/img/dwarf.gif +%%PORTDOCS%%%%DOCSDIR%%/img/filemenu.gif +%%PORTDOCS%%%%DOCSDIR%%/img/helpmenu.gif +%%PORTDOCS%%%%DOCSDIR%%/img/moveinprogress.gif +%%PORTDOCS%%%%DOCSDIR%%/img/movepiece.gif +%%PORTDOCS%%%%DOCSDIR%%/img/optionsmenu.gif +%%PORTDOCS%%%%DOCSDIR%%/img/pasteicon.gif +%%PORTDOCS%%%%DOCSDIR%%/img/quicksavemenu.gif +%%PORTDOCS%%%%DOCSDIR%%/img/quit.gif +%%PORTDOCS%%%%DOCSDIR%%/img/selectname.gif +%%PORTDOCS%%%%DOCSDIR%%/img/singleline.gif +%%PORTDOCS%%%%DOCSDIR%%/img/stone.gif +%%PORTDOCS%%%%DOCSDIR%%/img/thudpreview.gif +%%PORTDOCS%%%%DOCSDIR%%/img/thudscreen.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/thudscroll.gif +%%PORTDOCS%%%%DOCSDIR%%/img/troll.gif +%%PORTDOCS%%%%DOCSDIR%%/index.html +%%PORTDOCS%%%%DOCSDIR%%/thudboard.css +%%PORTDOCS%%%%DOCSDIR%%/files/bug.thud +%%PORTDOCS%%%%DOCSDIR%%/files/ThudBoardBug.jpg +@dirrm %%DATADIR%%/battles +%%PORTDOCS%%@dirrm %%DOCSDIR%%/img +%%PORTDOCS%%@dirrm %%DOCSDIR%%/files +%%PORTDOCS%%@dirrm %%DOCSDIR%% +@dirrm %%DATADIR%%/img +@dirrm %%DATADIR%%