From 925edb8c0428229eee219c1e1c898636bed6255f Mon Sep 17 00:00:00 2001 From: frueauf Date: Mon, 8 Feb 1999 08:48:37 +0000 Subject: Initial import of gnuchess-4.0.79, the "classic" GNU chess. --- games/gnuchess/Makefile | 22 ++++++++++++++++ games/gnuchess/files/md5 | 3 +++ games/gnuchess/patches/patch-aa | 20 +++++++++++++++ games/gnuchess/patches/patch-ab | 56 +++++++++++++++++++++++++++++++++++++++++ games/gnuchess/patches/patch-ac | 27 ++++++++++++++++++++ games/gnuchess/patches/patch-ad | 13 ++++++++++ games/gnuchess/patches/patch-ae | 21 ++++++++++++++++ games/gnuchess/pkg/COMMENT | 1 + games/gnuchess/pkg/DESCR | 24 ++++++++++++++++++ games/gnuchess/pkg/PLIST | 25 ++++++++++++++++++ 10 files changed, 212 insertions(+) create mode 100644 games/gnuchess/Makefile create mode 100644 games/gnuchess/files/md5 create mode 100644 games/gnuchess/patches/patch-aa create mode 100644 games/gnuchess/patches/patch-ab create mode 100644 games/gnuchess/patches/patch-ac create mode 100644 games/gnuchess/patches/patch-ad create mode 100644 games/gnuchess/patches/patch-ae create mode 100644 games/gnuchess/pkg/COMMENT create mode 100644 games/gnuchess/pkg/DESCR create mode 100644 games/gnuchess/pkg/PLIST (limited to 'games/gnuchess') diff --git a/games/gnuchess/Makefile b/games/gnuchess/Makefile new file mode 100644 index 00000000000..a0ea65b8a49 --- /dev/null +++ b/games/gnuchess/Makefile @@ -0,0 +1,22 @@ +# $NetBSD: Makefile,v 1.1.1.1 1999/02/08 08:48:37 frueauf Exp $ +# FreeBSD Id: Makefile,v 1.6 1999/01/27 07:41:12 fenner Exp +# + +DISTNAME= gnuchess-4.0.pl79 +PKGNAME= gnuchess-4.0.79 +WRKSRC= ${WRKDIR}/${DISTNAME}/src +CATEGORIES= games +MASTER_SITES= ${MASTER_SITE_GNU} +MASTER_SITE_SUBDIR= gnuchess + +MAINTAINER= packages@netbsd.org + +GNU_CONFIGURE= yes + +post-install: + ${MKDIR} ${PREFIX}/share/doc/gnuchess +.for file in ARTICLE ARTICLE.2 CHESSTOOL FAQ HEURISTICS MOVE-GEN README.font README.output + ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/doc/${file} ${PREFIX}/share/doc/gnuchess +.endfor + +.include "../../mk/bsd.pkg.mk" diff --git a/games/gnuchess/files/md5 b/games/gnuchess/files/md5 new file mode 100644 index 00000000000..207d91b28ba --- /dev/null +++ b/games/gnuchess/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 1999/02/08 08:48:37 frueauf Exp $ + +MD5 (gnuchess-4.0.pl79.tar.gz) = 54be6bdcc55d36387213389369f78ec0 diff --git a/games/gnuchess/patches/patch-aa b/games/gnuchess/patches/patch-aa new file mode 100644 index 00000000000..edef1b4f811 --- /dev/null +++ b/games/gnuchess/patches/patch-aa @@ -0,0 +1,20 @@ +$NetBSD: patch-aa,v 1.1.1.1 1999/02/08 08:48:37 frueauf Exp $ + +--- ../../gnuchess-4.0.pl79/src/dspcom.c Mon Sep 28 08:41:19 1998 ++++ ./src/dspcom.c Thu Dec 10 23:40:57 1998 +@@ -1099,14 +1099,14 @@ + #ifdef NONDSP + s[0] = sx[0] = '\0'; + while (!sx[0]) +- (void) gets (sx); ++ (void) fgets (sx, 80, stdin); sx[79] = '\0'; + #else + fflush (stdout); + #ifdef MSDOS + s[0] = '\0'; + eof = ( gets (sx) == NULL ); + #else + eof = ( getstr (sx) == ERR ); + #endif + #endif + sscanf (sx, "%s", s); diff --git a/games/gnuchess/patches/patch-ab b/games/gnuchess/patches/patch-ab new file mode 100644 index 00000000000..b72036ab048 --- /dev/null +++ b/games/gnuchess/patches/patch-ab @@ -0,0 +1,56 @@ +$NetBSD: patch-ab,v 1.1.1.1 1999/02/08 08:48:37 frueauf Exp $ + +--- ../../gnuchess-4.0.pl79/src/gnuan.c Mon Sep 28 08:41:21 1998 ++++ ./src/gnuan.c Thu Dec 10 23:39:26 1998 +@@ -1348,12 +1348,12 @@ + fpout = stderr; + fprintf (fpout, "Input the file with the algebraic moves of the game.\n"); + fflush (fpout); +- gets (infilename); ++ fgets (infilename, 255, stdin); infilename[255] = '\0'; + fprintf (fpout, "\n"); + do + { + fprintf (fpout, "Input the search depth you want to use. (1 to 29)(- for depth from file)\n"); +- gets (inbuf); ++ fgets (inbuf, 256, stdin); inbuf[255] = '\0'; + search_depth = atoi (inbuf); + if (search_depth < 0) + { +@@ -1369,7 +1369,7 @@ + do + { + fprintf (fpout, "Input the maximum number of minutes per move you want to use.\n"); +- gets (inbuf); ++ fgets (inbuf, 256, stdin); inbuf[255] = '\0'; + max_minutes = atoi (inbuf); + if (max_minutes < 0) + { +@@ -1379,7 +1379,7 @@ + } + while ((max_minutes + max_seconds) < 1); + fprintf (fpout, "Post the search results(y/n).\n"); +- gets (inbuf); ++ fgets (inbuf, 256, stdin); inbuf[255] = '\0'; + if (inbuf[0] == 'y') + flag.post = true; + else +@@ -1559,7 +1559,8 @@ + while (true) + { + printf (">"); +- gets (GNUANinbuf1); ++ fgets (GNUANinbuf1, 128, stdin); ++ GNUANinbuf1[127] = '\0'; + p = GNUANinbuf1; + q = GNUANinbuf; + while (true) +@@ -1724,7 +1725,7 @@ + move_percent[black] = ((float) same_moves[black]) * 200 / (float) (GNUANmovecnt + (GNUANmovecnt % 2 ? 1 : 0)); + fprintf (fpout, "\n White's percentage was %5.2f%%. Black's percentage was %5.2f%%.\n", move_percent[white], move_percent[black]); + time (&end_time); +- elapsed_time = difftime(end_time - start_time); ++ elapsed_time = difftime(end_time, start_time); + fprintf (fpout, "\n Elapsed time was %ld seconds.\n", elapsed_time); + fclose (fpin); + fclose (fpout); diff --git a/games/gnuchess/patches/patch-ac b/games/gnuchess/patches/patch-ac new file mode 100644 index 00000000000..cb6eba68fe9 --- /dev/null +++ b/games/gnuchess/patches/patch-ac @@ -0,0 +1,27 @@ +$NetBSD: patch-ac,v 1.1.1.1 1999/02/08 08:48:37 frueauf Exp $ + +--- ../../gnuchess-4.0.pl79/src/nondsp.c Mon Sep 28 08:41:22 1998 ++++ ./src/nondsp.c Thu Dec 10 23:39:26 1998 +@@ -264,10 +264,11 @@ + + NewGame (); + +- gets (s); /* skip "setup" command */ ++ fgets (s, 80, stdin); /* skip "setup" command */ ++ s[79] = '\0'; + for (r = 7; r >= 0; r--) + { +- gets (s); ++ fgets (s, 80, stdin); s[79] = '\0'; + for (c = 0; c <= 7; c++) + { + ch = s[c]; +@@ -617,7 +618,7 @@ + if (!T[0]) + { + printz (CP[61]); +- gets (T); ++ fgets (T, 64, stdin); T[63] = '\0'; + } + strcat (T, "XX"); + /* skip whitespace */ diff --git a/games/gnuchess/patches/patch-ad b/games/gnuchess/patches/patch-ad new file mode 100644 index 00000000000..59fe7a0a3de --- /dev/null +++ b/games/gnuchess/patches/patch-ad @@ -0,0 +1,13 @@ +$NetBSD: patch-ad,v 1.1.1.1 1999/02/08 08:48:37 frueauf Exp $ + +--- ../../gnuchess-4.0.pl79/src/search.c Mon Sep 28 08:41:23 1998 ++++ ./src/search.c Thu Dec 10 23:39:26 1998 +@@ -174,7 +174,7 @@ + while (true) + { + printf ("debug?"); +- gets (b); ++ fgets (b, 32, stdin); b[31] = '\0'; + if (b[0] == 'p') + traceply = atoi (&b[1]); + else if (b[0] == '\0') diff --git a/games/gnuchess/patches/patch-ae b/games/gnuchess/patches/patch-ae new file mode 100644 index 00000000000..5688a0f1eb1 --- /dev/null +++ b/games/gnuchess/patches/patch-ae @@ -0,0 +1,21 @@ +$NetBSD: patch-ae,v 1.1.1.1 1999/02/08 08:48:37 frueauf Exp $ + +--- Makefile.in-orig Mon Sep 28 08:41:13 1998 ++++ Makefile.in Mon Feb 8 08:52:59 1999 +@@ -127,7 +127,7 @@ + + prefix = @prefix@ + exec_prefix = @exec_prefix@ +-LIBDIR = $(prefix)/lib ++LIBDIR = $(prefix)/share/gnuchess + BINDIR = $(exec_prefix)/bin + MANDIR = $(prefix)/man/man6 + MANEXT = .6 +@@ -156,6 +156,7 @@ + $(INSTALL) postprint $(BINDIR)/postprint + $(INSTALL) gnuan $(BINDIR)/gnuan + $(INSTALL) game $(BINDIR)/game ++ mkdir $(LIBDIR) + $(INSTALL) $(srcdir)/../misc/gnuchess.lang $(LIBDIR)/gnuchess.lang + $(INSTALL) $(srcdir)/../book/eco.pgn $(LIBDIR)/eco.pgn + $(INSTALL) gnuchess.data $(LIBDIR)/gnuchess.data diff --git a/games/gnuchess/pkg/COMMENT b/games/gnuchess/pkg/COMMENT new file mode 100644 index 00000000000..a0044f1976d --- /dev/null +++ b/games/gnuchess/pkg/COMMENT @@ -0,0 +1 @@ +the "classic" GNU chess. diff --git a/games/gnuchess/pkg/DESCR b/games/gnuchess/pkg/DESCR new file mode 100644 index 00000000000..f993cb91198 --- /dev/null +++ b/games/gnuchess/pkg/DESCR @@ -0,0 +1,24 @@ + Gnuchess plays a game of chess against the user or it + plays against itself. + + Gnuchess is an updated version of the GNU chess playing + program. It has a simple alpha-numeric board display, an + IBM PC compatible interface, or it can be compiled for use + with the chesstool program on a SUN workstation or with + the xboard program under X-windows. To invoke the program + gnuchess + - simple curses based version + + gnuchessn + - fancy version using curses and inverse video on + UNIX, or IBM PC cursor controls and characters on + MSDOS + + gnuchessr + - ASCII based version + + gnuchessc + - chesstool compatible version + + gnuchessx + - xboard compatible version diff --git a/games/gnuchess/pkg/PLIST b/games/gnuchess/pkg/PLIST new file mode 100644 index 00000000000..fa3d58f6661 --- /dev/null +++ b/games/gnuchess/pkg/PLIST @@ -0,0 +1,25 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 1999/02/08 08:48:37 frueauf Exp $ +bin/gnuchess +bin/gnuchessr +bin/gnuchessn +bin/gnuchessx +bin/gnuchessc +bin/postprint +bin/gnuan +bin/game +share/gnuchess/gnuchess.lang +share/gnuchess/eco.pgn +share/gnuchess/gnuchess.data +share/gnuchess/gnuchess.eco +share/doc/gnuchess/ARTICLE +share/doc/gnuchess/ARTICLE.2 +share/doc/gnuchess/CHESSTOOL +share/doc/gnuchess/FAQ +share/doc/gnuchess/HEURISTICS +share/doc/gnuchess/MOVE-GEN +share/doc/gnuchess/README.font +share/doc/gnuchess/README.output +man/man6/game.6 +man/man6/gnuan.6 +man/man6/gnuchess.6 +man/man6/postprint.6 -- cgit v1.2.3