aboutsummaryrefslogtreecommitdiff
path: root/games/connect4
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>1997-06-04 03:21:13 +0000
committerSatoshi Asami <asami@FreeBSD.org>1997-06-04 03:21:13 +0000
commit61bc540838e0a1f54f671af5817da61bbe913fa2 (patch)
tree80d952b48426ad7b0938aa2f1ec6f549c998f1ec /games/connect4
parent97b19190ea76d0c15a93cd108b48a23fb3ffb14c (diff)
downloadports-61bc540838e0a1f54f671af5817da61bbe913fa2.tar.gz
ports-61bc540838e0a1f54f671af5817da61bbe913fa2.zip
Classic "drop tokens" game.
PR: 3625 Submitted by: Joel Sutton sutton@aardvark.apana.org.au
Notes
Notes: svn path=/head/; revision=6730
Diffstat (limited to 'games/connect4')
-rw-r--r--games/connect4/Makefile35
-rw-r--r--games/connect4/distinfo1
-rw-r--r--games/connect4/files/connect4.646
-rw-r--r--games/connect4/files/patch-aa24
-rw-r--r--games/connect4/files/patch-ab49
-rw-r--r--games/connect4/files/patch-ac23
-rw-r--r--games/connect4/pkg-comment1
-rw-r--r--games/connect4/pkg-descr8
-rw-r--r--games/connect4/pkg-plist3
9 files changed, 190 insertions, 0 deletions
diff --git a/games/connect4/Makefile b/games/connect4/Makefile
new file mode 100644
index 000000000000..b18a9697ff27
--- /dev/null
+++ b/games/connect4/Makefile
@@ -0,0 +1,35 @@
+# New ports collection makefile for: connect4
+# Version required: 3.2
+# Date created: Thu May 8 16:41:01 EST 1997
+# Whom: Joel Sutton <sutton@aardvark.apana.org.au>
+# FreeBSD Version: 2.1.5-RELEASE
+#
+# $Id$
+#
+
+DISTNAME= connect4
+PKGNAME= connect4-3.2
+CATEGORIES= games
+MASTER_SITES= ftp://ftp.gu.kiev.ua/pub/cdrom5/games/volume6/ \
+ ftp://scitsc.wlv.ac.uk/pub/infomagic/usenet/games/volume6/
+EXTRACT_SUFX= ""
+
+MAINTAINER= sutton@aardvark.apana.org.au
+
+BUILD_DEPENDS= gunshar:${PORTSDIR}/archivers/gshar+gunshar
+
+EXTRACT_CMD= gunshar
+EXTRACT_BEFORE_ARGS= ""
+NO_WRKSUBDIR= yes
+MAN6= connect4.6
+
+MANDIR= ${PREFIX}/man/man
+LIBDIR= ${PREFIX}/lib
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/c4 ${PREFIX}/bin/connect4
+ ${MKDIR} ${LIBDIR}/connect4
+ ${INSTALL_DATA} -m 666 /dev/null ${LIBDIR}/connect4/scores
+ ${INSTALL_MAN} ${FILESDIR}/connect4.6 ${MANDIR}6/
+
+.include <bsd.port.mk>
diff --git a/games/connect4/distinfo b/games/connect4/distinfo
new file mode 100644
index 000000000000..c454663d8cd7
--- /dev/null
+++ b/games/connect4/distinfo
@@ -0,0 +1 @@
+MD5 (connect4) = d09ae9fc10591b6c0f021f38c129d90f
diff --git a/games/connect4/files/connect4.6 b/games/connect4/files/connect4.6
new file mode 100644
index 000000000000..819d0e0827a5
--- /dev/null
+++ b/games/connect4/files/connect4.6
@@ -0,0 +1,46 @@
+.TH connect4 6 "8th May, 1997" "Version 3.2"
+.SH NAME
+\fBconnect4\fP - a game of placement
+.SH SYNOPSIS
+.IP "connect4" 10
+\fB[ -Shv12 ]\fP
+.LP
+.SH DESCRIPTION
+\fBconnect4(6)\fP is a simple game where you must line up four tokens
+in a row.
+.SH OPTIONS
+.IP "\fB-S\fP"
+Display high scores
+.IP "\fB-h\fP"
+Help on command line switches
+.IP "\fB-v\fP"
+Display version number
+.IP "\fB-1\fP"
+Player has first move
+.IP "\fB-2\fP"
+Computer has first move
+.SH NOTES
+.LP
+The real-life version of connect4 is basically an upright hollow board
+with several vertical columns and windows. Tokens are placed into the
+columns alternately by each player until one of the players has four
+tokens in a row. These four tokens must be adjacent to each other but
+the series of four can be in any direction.
+.sp
+Tokens are placed into a column by typing the number of the column
+printed at the top of the screen.
+.sp
+To exit the game type \fBq\fP or \fBx\fP and \fBctrl-L\fP redraws the screen.
+.SH BUGS
+There are bound to be bugs in this program. Use at your own risk as no
+guarantee will be made that this software will not break your system
+in any way.
+.SH AUTHORS
+connect4 came from comp.sources.games Volume 6, Issue 51
+.br
+Submitted by Terry Jones <tcjones@watdragon.waterloo.edu> April,
+1989
+.sp
+Man page by Joel Sutton <sutton@aardvark.apana.org.au>
+.SH COPYRIGHT
+Connect Four is undoubtedly a trade mark or some such of Milton Bradley. \ No newline at end of file
diff --git a/games/connect4/files/patch-aa b/games/connect4/files/patch-aa
new file mode 100644
index 000000000000..4cf5b4658c23
--- /dev/null
+++ b/games/connect4/files/patch-aa
@@ -0,0 +1,24 @@
+*** Makefile.orig Tue Apr 15 21:55:19 1997
+--- Makefile Tue Apr 15 21:57:58 1997
+***************
+*** 1,7 ****
+ # Makefile for c4
+
+! CFLAGS = -g #-DSCOREFILE=\"/usr/games/lib/c4.scores\"
+ CURSES = -lcurses -ltermcap
+
+ c4 : c4.o screen.o c4.h tables.h types.h
+ cc $(CFLAGS) -o c4 c4.o screen.o $(CURSES)
+--- 1,12 ----
+ # Makefile for c4
++ # Patched for FreeBSD 2.1.5R by
++ # Joel Sutton <suttonj@interconnect.com.au>
++ # 15th April, 1997
+
+! CFLAGS = -O -g -DSCOREFILE=\"/usr/local/lib/connect4/scores\"
+ CURSES = -lcurses -ltermcap
++
++ all: c4
+
+ c4 : c4.o screen.o c4.h tables.h types.h
+ cc $(CFLAGS) -o c4 c4.o screen.o $(CURSES)
diff --git a/games/connect4/files/patch-ab b/games/connect4/files/patch-ab
new file mode 100644
index 000000000000..40d88a84d8c0
--- /dev/null
+++ b/games/connect4/files/patch-ab
@@ -0,0 +1,49 @@
+*** c4.c.orig Tue Apr 15 22:06:03 1997
+--- c4.c Tue Apr 15 22:16:29 1997
+***************
+*** 11,16 ****
+--- 11,18 ----
+ * BITNET: tcjones@WATER.bitnet
+ * Canadian domain: tcjones@dragon.uwaterloo.ca
+ *
++ * Patched by Joel Sutton, 15th April 1997
++ * Changed gets calls to fgets. Changed inital prompt slightly.
+ */
+
+ #include <stdio.h>
+***************
+*** 219,225 ****
+ register char *cp;
+
+ printf("Would you like to go first? (yes/no) -> ");
+! if (!gets(line)){
+ plot_finish();
+ fprintf(stderr, "Could not read input line.\n");
+ goodbye();
+--- 221,227 ----
+ register char *cp;
+
+ printf("Would you like to go first? (yes/no) -> ");
+! if (!fgets(line,256,stdin)){
+ plot_finish();
+ fprintf(stderr, "Could not read input line.\n");
+ goodbye();
+***************
+*** 620,627 ****
+ }
+ }
+
+! printf("Do you need help (n/y)? -> ");
+! if (!gets(line)){
+ fprintf(stderr, "Could not read input line\n");
+ goodbye();
+ }
+--- 622,629 ----
+ }
+ }
+
+! printf("Do you need help (y/n)? -> ");
+! if (!fgets(line,256,stdin)){
+ fprintf(stderr, "Could not read input line\n");
+ goodbye();
+ }
diff --git a/games/connect4/files/patch-ac b/games/connect4/files/patch-ac
new file mode 100644
index 000000000000..c9fa9c17aa62
--- /dev/null
+++ b/games/connect4/files/patch-ac
@@ -0,0 +1,23 @@
+*** screen.c.orig Tue Apr 15 22:06:03 1997
+--- screen.c Tue Apr 15 22:16:30 1997
+***************
+*** 1,3 ****
+--- 1,8 ----
++ /*
++ * Patched by Joel Sutton, 15th April 1997
++ * Added endwin to tidy things up as per usenet posted patch.
++ */
++
+ #include <stdio.h>
+ #include <curses.h>
+ #include "c4.h"
+***************
+*** 116,121 ****
+--- 121,127 ----
+ refresh();
+ nocrmode();
+ echo();
++ endwin();
+ }
+
+
diff --git a/games/connect4/pkg-comment b/games/connect4/pkg-comment
new file mode 100644
index 000000000000..035b92868726
--- /dev/null
+++ b/games/connect4/pkg-comment
@@ -0,0 +1 @@
+A curses version of the classic game.
diff --git a/games/connect4/pkg-descr b/games/connect4/pkg-descr
new file mode 100644
index 000000000000..3924b89aad45
--- /dev/null
+++ b/games/connect4/pkg-descr
@@ -0,0 +1,8 @@
+Please refer to the man page for instructions and further information.
+
+This version contains my patches and man page.
+
+Share and enjoy,
+
+Joel...
+sutton@aardvark.apana.org.au
diff --git a/games/connect4/pkg-plist b/games/connect4/pkg-plist
new file mode 100644
index 000000000000..3ca0466f90bc
--- /dev/null
+++ b/games/connect4/pkg-plist
@@ -0,0 +1,3 @@
+bin/connect4
+man/man6/connect4.6.gz
+lib/connect4/scores