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...
This commit is contained in:
Thomas Gellekum 1997-01-03 08:15:44 +00:00
parent 90d2987008
commit 6ea18d7a8c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=5182
10 changed files with 197 additions and 0 deletions

38
games/xgammon/Makefile Normal file
View File

@ -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>

1
games/xgammon/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (xgammon-0.98-7.src.rpm) = eaae87fde658e19ec5a964fbcbe4512a

View File

@ -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

View File

@ -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

View File

@ -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"}

View File

@ -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;
}

View File

@ -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 */

View File

@ -0,0 +1 @@
A backgammon program for X11.

12
games/xgammon/pkg-descr Normal file
View File

@ -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).

4
games/xgammon/pkg-plist Normal file
View File

@ -0,0 +1,4 @@
bin/xgammon
man/man6/xgammon.6.gz
lib/X11/app-defaults/XGammon
lib/X11/xgammon/xgammon.db