summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorThomas Gellekum <tg@FreeBSD.org>1997-01-03 08:15:44 +0000
committerThomas Gellekum <tg@FreeBSD.org>1997-01-03 08:15:44 +0000
commit6ea18d7a8c5fcfe882285533ed1989ae9d2111b2 (patch)
treecc4320a36b4ad38fcf4b61edb9323402529dfa43 /games
parentInstall manpage in man6 as the man page header says it is. (diff)
Import of xgammon, a backgammon game for X11.
The do-extract rule is extremely ugly; I just don't want to write a general tool for RedHats rpm format...
Notes
Notes: svn path=/head/; revision=5182
Diffstat (limited to 'games')
-rw-r--r--games/xgammon/Makefile38
-rw-r--r--games/xgammon/distinfo1
-rw-r--r--games/xgammon/files/patch-aa19
-rw-r--r--games/xgammon/files/patch-ab13
-rw-r--r--games/xgammon/files/patch-ac22
-rw-r--r--games/xgammon/files/patch-ad26
-rw-r--r--games/xgammon/files/patch-ae61
-rw-r--r--games/xgammon/pkg-comment1
-rw-r--r--games/xgammon/pkg-descr12
-rw-r--r--games/xgammon/pkg-plist4
10 files changed, 197 insertions, 0 deletions
diff --git a/games/xgammon/Makefile b/games/xgammon/Makefile
new file mode 100644
index 000000000000..e25576dc4c4b
--- /dev/null
+++ b/games/xgammon/Makefile
@@ -0,0 +1,38 @@
+# New ports collection makefile for: xgammon
+# Version required: 0.98-7
+# Date created: 02 January 1997
+# Whom: Thomas Gellekum <tg@FreeBSD.ORG>
+#
+# $Id$
+#
+
+DISTNAME= xgammon-0.98
+CATEGORIES= games
+MASTER_SITES= ftp://ftp.redhat.com/pub/redhat/devel/srpms/SRPMS/
+EXTRACT_SUFX= -7.src.rpm
+
+PATCH_DIST_STRIP= -p1
+
+MAINTAINER= tg@FreeBSD.ORG
+
+NO_WRKSUBDIR= yes
+USE_IMAKE= yes
+
+PATCH_FILES= ${DISTNAME}-dirent.patch
+
+do-extract:
+.if !defined(NO_WRKDIR)
+ @${RM} -rf ${WRKDIR}
+ @${MKDIR} ${WRKDIR}
+.endif
+ @dd if=${_DISTDIR}${DISTFILES} bs=1706 skip=1 | gzip -cd | \
+ (cd ${WRKDIR}; cpio -i)
+ @tar -xzf ${WRKDIR}/${DISTNAME}.tar.gz -C ${WRKDIR}
+
+pre-patch:
+ @${ECHO_MSG} "===> Applying distribution patches for ${PKGNAME}"
+ @for file in ${PATCH_FILES}; do \
+ ${PATCH} ${PATCH_DIST_ARGS} < ${WRKDIR}/$$file; \
+ done
+
+.include <bsd.port.mk>
diff --git a/games/xgammon/distinfo b/games/xgammon/distinfo
new file mode 100644
index 000000000000..d2d192ce3234
--- /dev/null
+++ b/games/xgammon/distinfo
@@ -0,0 +1 @@
+MD5 (xgammon-0.98-7.src.rpm) = eaae87fde658e19ec5a964fbcbe4512a
diff --git a/games/xgammon/files/patch-aa b/games/xgammon/files/patch-aa
new file mode 100644
index 000000000000..c5440e4fb22b
--- /dev/null
+++ b/games/xgammon/files/patch-aa
@@ -0,0 +1,19 @@
+*** Imakefile.orig Wed Aug 23 21:26:39 1995
+--- Imakefile Sat Apr 27 18:12:34 1996
+***************
+*** 30,36 ****
+ @echo "starting it"
+ @echo "creating the database needs about 3 - 5 hours"
+ @echo "tell you when it is complete"
+! cd lib; db; cd ..
+ @echo "Database complete"
+
+ XGammon.ad: xgammon.ad
+--- 30,36 ----
+ @echo "starting it"
+ @echo "creating the database needs about 3 - 5 hours"
+ @echo "tell you when it is complete"
+! cd lib; ./db; cd ..
+ @echo "Database complete"
+
+ XGammon.ad: xgammon.ad
diff --git a/games/xgammon/files/patch-ab b/games/xgammon/files/patch-ab
new file mode 100644
index 000000000000..8dbe59647812
--- /dev/null
+++ b/games/xgammon/files/patch-ab
@@ -0,0 +1,13 @@
+*** xgammon.ad.orig Tue Aug 29 07:35:39 1995
+--- xgammon.ad Fri Apr 26 19:52:55 1996
+***************
+*** 67,70 ****
+ xgammon.buttonmove: false
+ xgammon.stonesteps: 5
+ xgammon.delaytime: 5
+! xgammon.database: /usr/X11R6/lib/X11/xgammon/xgammon.db
+--- 67,70 ----
+ xgammon.buttonmove: false
+ xgammon.stonesteps: 5
+ xgammon.delaytime: 5
+! !xgammon.database: /usr/X11R6/lib/X11/xgammon/xgammon.db
diff --git a/games/xgammon/files/patch-ac b/games/xgammon/files/patch-ac
new file mode 100644
index 000000000000..7d44dcba7463
--- /dev/null
+++ b/games/xgammon/files/patch-ac
@@ -0,0 +1,22 @@
+--- xgammon.c.orig Tue Aug 29 07:28:41 1995
++++ xgammon.c Thu Jan 2 20:26:43 1997
+@@ -179,7 +179,7 @@
+
+ FILE* protokol_file = NULL;
+
+-char * greetings = "Wellcome to xgammon version 0.98\n (C) 1994 Lambert Klasen Detlef Steuer\n We hope you enjoy it\n\n";
++char * greetings = "Welcome to xgammon version 0.98\n (C) 1994 Lambert Klasen Detlef Steuer\n We hope you enjoy it\n\n";
+
+ XtActionsRec gammon_actions[] = {
+ {"PipCount", PipCount},
+@@ -227,8 +227,8 @@
+ {"rollout", "Rollout", XtRBoolean, sizeof (int), offset (rollout), XtRString, "0"},
+ {"numrollouts", "NumRollouts", XtRInt, sizeof (int), offset (num_rollouts), XtRString, "100"},
+ {"positionfile", "PositionFile", XtRString, sizeof (char *), offset (position_file), XtRString, "xgammon.save"},
+-{"database", "Database", XtRString, sizeof (char *), offset (database), XtRString, "lib/xgammon.db"},
+-{"server", "Server", XtRString, sizeof (char *), offset (server), XtRString, "fraggel65.mdstud.chalmers.se"},
++{"database", "Database", XtRString, sizeof (char *), offset (database), XtRString, DATABASE},
++{"server", "Server", XtRString, sizeof (char *), offset (server), XtRString, "fibs.com"},
+ {"port", "Port", XtRInt, sizeof (int), offset (port), XtRString, "4321"},
+ {"buttonmove", "ButtonMove", XtRBoolean, sizeof (int), offset (button_move), XtRString, "0"}
+
diff --git a/games/xgammon/files/patch-ad b/games/xgammon/files/patch-ad
new file mode 100644
index 000000000000..dbaf5ce1c76d
--- /dev/null
+++ b/games/xgammon/files/patch-ad
@@ -0,0 +1,26 @@
+*** lib/db.c.orig Sat Aug 26 19:56:39 1995
+--- lib/db.c Sat Apr 27 16:40:25 1996
+***************
+*** 259,268 ****
+ close(fid);
+ }
+
+! void main()
+ {
+ set_binom();
+ set_naufm();
+ set_offset();
+ set_V_Werte();
+ }
+--- 259,269 ----
+ close(fid);
+ }
+
+! main()
+ {
+ set_binom();
+ set_naufm();
+ set_offset();
+ set_V_Werte();
++ return 0;
+ }
diff --git a/games/xgammon/files/patch-ae b/games/xgammon/files/patch-ae
new file mode 100644
index 000000000000..bf908f868f71
--- /dev/null
+++ b/games/xgammon/files/patch-ae
@@ -0,0 +1,61 @@
+--- xgammon.c.orig Thu Jan 2 20:28:24 1997
++++ xgammon.c Thu Jan 2 20:28:37 1997
+@@ -306,7 +306,7 @@
+ set_binom (); /* decision ... */
+ set_naufm ();
+
+- srand (time (NULL)); /* rolling */
++ srandom (time (NULL)); /* rolling */
+
+ delaytime = ((unsigned long) gammon_resource.delaytime) * 100000;
+
+--- edit.c.orig Sat Aug 26 13:09:41 1995
++++ edit.c Thu Jan 2 20:30:14 1997
+@@ -266,8 +266,8 @@
+ }
+
+ if (ignore_dice) {
+- roll[0] = (rand ()%6 + 1) * direction;
+- roll[1] = (rand ()%6 + 1) * direction;
++ roll[0] = (random ()%6 + 1) * direction;
++ roll[1] = (random ()%6 + 1) * direction;
+ }
+ if (roll[0] == roll[1]) {
+ roll[3] = roll[2] = roll[0];
+--- misc.c.orig Sun Aug 27 15:20:15 1995
++++ misc.c Thu Jan 2 20:30:33 1997
+@@ -99,8 +99,8 @@
+
+ void RollDice (void)
+ {
+- roll[0] = (rand ()%6 + 1) * direction;
+- roll[1] = (rand ()%6 + 1) * direction;
++ roll[0] = (random ()%6 + 1) * direction;
++ roll[1] = (random ()%6 + 1) * direction;
+
+ if (roll[0] != roll[1]) {
+ roll[2] = 0; /* sure and necessary */
+@@ -253,8 +253,8 @@
+
+ direction = 1; /* get beginner of game */
+ do {
+- roll[0] = (rand ()%6 + 1);
+- roll[1] = (rand ()%6 + 1);
++ roll[0] = (random ()%6 + 1);
++ roll[1] = (random ()%6 + 1);
+ } while (roll[0] == roll[1]);
+
+ roll[2] = 0;
+--- rollout.c.orig Sat Aug 26 19:58:11 1995
++++ rollout.c Thu Jan 2 20:30:44 1997
+@@ -238,8 +238,8 @@
+
+ void rollout_roll_dice (void)
+ {
+- roll[0] = (rand()%6 + 1) * direction;
+- roll[1] = (rand()%6 + 1) * direction;
++ roll[0] = (random()%6 + 1) * direction;
++ roll[1] = (random()%6 + 1) * direction;
+
+ if (roll[0] != roll[1]) {
+ roll[2] = 0; /* sure and necessary */
diff --git a/games/xgammon/pkg-comment b/games/xgammon/pkg-comment
new file mode 100644
index 000000000000..218778bf5671
--- /dev/null
+++ b/games/xgammon/pkg-comment
@@ -0,0 +1 @@
+A backgammon program for X11.
diff --git a/games/xgammon/pkg-descr b/games/xgammon/pkg-descr
new file mode 100644
index 000000000000..11b0e180af94
--- /dev/null
+++ b/games/xgammon/pkg-descr
@@ -0,0 +1,12 @@
+XGammon is a backgammon game which runs under X.
+
+Features:
+ xgammon has nice graphical interface, you move by clicking on mousebuttons.
+ You can do a maildump for a position, that means you get a file with
+ a FIBS style board with current position in it.
+ You can do money game or tournament game.
+ You can edit positions via mouse on the board or via ascii plain text files.
+ You can turn doubling on and off.
+ You can do rollouts with doubling turned on and off.
+ The programm uses an endgame database for perfect bearing off (and for
+ reasonable running game).
diff --git a/games/xgammon/pkg-plist b/games/xgammon/pkg-plist
new file mode 100644
index 000000000000..b38b1bcc8b7e
--- /dev/null
+++ b/games/xgammon/pkg-plist
@@ -0,0 +1,4 @@
+bin/xgammon
+man/man6/xgammon.6.gz
+lib/X11/app-defaults/XGammon
+lib/X11/xgammon/xgammon.db