diff options
author | jlam <jlam@pkgsrc.org> | 2000-10-24 20:08:13 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2000-10-24 20:08:13 +0000 |
commit | d339252696bb42f2f4537cf88f48a05392fd2572 (patch) | |
tree | 682c3847b9e2e92df51451e85a706c8ecfc1d495 /games/colchess | |
parent | cd92bcbc650df965bc41fabc1df501d06515da06 (diff) | |
download | pkgsrc-d339252696bb42f2f4537cf88f48a05392fd2572.tar.gz |
colchess - chess analysis engine
Diffstat (limited to 'games/colchess')
-rw-r--r-- | games/colchess/Makefile | 29 | ||||
-rw-r--r-- | games/colchess/files/md5 | 3 | ||||
-rw-r--r-- | games/colchess/files/patch-sum | 5 | ||||
-rw-r--r-- | games/colchess/patches/patch-aa | 16 | ||||
-rw-r--r-- | games/colchess/patches/patch-ab | 62 | ||||
-rw-r--r-- | games/colchess/patches/patch-ac | 41 | ||||
-rw-r--r-- | games/colchess/pkg/COMMENT | 1 | ||||
-rw-r--r-- | games/colchess/pkg/DESCR | 5 | ||||
-rw-r--r-- | games/colchess/pkg/PLIST | 10 |
9 files changed, 172 insertions, 0 deletions
diff --git a/games/colchess/Makefile b/games/colchess/Makefile new file mode 100644 index 00000000000..cbfca782e9b --- /dev/null +++ b/games/colchess/Makefile @@ -0,0 +1,29 @@ +# $NetBSD: Makefile,v 1.1.1.1 2000/10/24 20:08:13 jlam Exp $ + +DISTNAME= colchess +PKGNAME= ${DISTNAME}-7.0 +WRKSRC= ${WRKDIR}/ColChess +CATEGORIES= games +MASTER_SITES= http://www.ast.cam.ac.uk/~cmf/chess/ +EXTRACT_SUFX= .tgz + +MAINTAINER= jlam@netbsd.org +HOMEPAGE= http://www.ast.cam.ac.uk/~cmf/chess/ + +DIST_SUBDIR= ${PKGNAME} +NO_CONFIGURE= # defined +MAKE_ENV+= PREFIX="${PREFIX}" + +DATADIR= ${PREFIX}/share/colchess +DOCDIR= ${PREFIX}/share/doc/colchess + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/colchess ${PREFIX}/bin + ${INSTALL_DATA_DIR} ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/chessdat.dat ${DATADIR} + ${INSTALL_DATA_DIR} ${DATADIR}/tests + ${INSTALL_DATA} ${WRKSRC}/tests/*.epd ${DATADIR}/tests + ${INSTALL_DATA_DIR} ${DOCDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${DOCDIR} + +.include "../../mk/bsd.pkg.mk" diff --git a/games/colchess/files/md5 b/games/colchess/files/md5 new file mode 100644 index 00000000000..a4be9c60125 --- /dev/null +++ b/games/colchess/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 2000/10/24 20:08:13 jlam Exp $ + +MD5 (colchess-7.0/colchess.tgz) = eed5e9629052c0b70ea70abc9573f3c4 diff --git a/games/colchess/files/patch-sum b/games/colchess/files/patch-sum new file mode 100644 index 00000000000..1f51d8b6f4d --- /dev/null +++ b/games/colchess/files/patch-sum @@ -0,0 +1,5 @@ +$NetBSD: patch-sum,v 1.1.1.1 2000/10/24 20:08:13 jlam Exp $ + +MD5 (patch-aa) = 3e5ac130bb889262d4af188c901bb859 +MD5 (patch-ab) = 4a139d0ddc27f9a1c4f3d3df398187c6 +MD5 (patch-ac) = b20b67a5da091c4ba090a7855f9a800b diff --git a/games/colchess/patches/patch-aa b/games/colchess/patches/patch-aa new file mode 100644 index 00000000000..cce3b83b029 --- /dev/null +++ b/games/colchess/patches/patch-aa @@ -0,0 +1,16 @@ +$NetBSD: patch-aa,v 1.1.1.1 2000/10/24 20:08:13 jlam Exp $ + +--- Makefile.orig Sun Aug 6 19:17:39 2000 ++++ Makefile +@@ -1,7 +1,8 @@ +-CFLAGS=-I . -Wall -O3 ++CFLAGS+=-I . -Wall -DPREFIX=\"${PREFIX}\" + +-chess: chess.o moves.o comp.o tactics.o checks.o misc.o mprocs.o eval.o +- gcc -o chess chess.o comp.o tactics.o moves.o checks.o misc.o mprocs.o eval.o -lm ++all: colchess ++colchess: chess.o moves.o comp.o tactics.o checks.o misc.o mprocs.o eval.o ++ $(CC) -o colchess chess.o comp.o tactics.o moves.o checks.o misc.o mprocs.o eval.o -lm + chess.o: chess.h chess.c moves.h misc.h comp.h checks.h mprocs.h eval.h + moves.o: moves.c moves.h chess.h checks.h + comp.o: comp.c comp.h tactics.h checks.h chess.h moves.h misc.h eval.h mprocs.h diff --git a/games/colchess/patches/patch-ab b/games/colchess/patches/patch-ab new file mode 100644 index 00000000000..7863410d44e --- /dev/null +++ b/games/colchess/patches/patch-ab @@ -0,0 +1,62 @@ +$NetBSD: patch-ab,v 1.1.1.1 2000/10/24 20:08:13 jlam Exp $ + +--- chess.c.orig Thu Aug 17 04:22:08 2000 ++++ chess.c +@@ -26,7 +26,7 @@ + char sep[3] = "\\";
+
+ #else /* UNIX MODE **** */
+-char path[FILENAME_MAX] = "./"; /* <--- PATH TO CHESS DIRECTORY FOR UNIX */
++char path[FILENAME_MAX]; /* <--- PATH TO CHESS DIRECTORY FOR UNIX */
+ char dir_command[10] = "ls";
+ char sep[3] = "/";
+ #endif
+@@ -38,7 +38,8 @@ + #endif
+
+
+-char gamepath[FILENAME_MAX];
++char gamepath[FILENAME_MAX] = "";
++char book_path[FILENAME_MAX];
+ /* Position score weights */
+ int posdat[6][8][8];
+ int posdat_pawn[8][8];
+@@ -91,6 +92,8 @@ + book_on=inidata.book;
+ }
+ #endif
++ strcpy(path,PREFIX);
++ strcat(path,"/share/colchess/");
+ if (a==0 || winloc==NULL) {
+ pathloc = getenv("COLCHESS_PATH");
+ if (pathloc != NULL) {
+@@ -100,9 +103,8 @@ + }
+
+ clock_left[0]=clock_left[1]=300;
+- strcpy(gamepath,path);
+- strcat(gamepath,"games");
+- strcat(gamepath,sep);
++ strcpy(book_path,path);
++ strcat(book_path,"book.dat");
+ beg=time(NULL);
+
+ /* Output the current version number and type */
+@@ -111,7 +113,7 @@ + /* Help on command line options. */
+ if (argc>1 && (!strcmp(argv[1],"?") || !strcmp(argv[1],"HELP") || !strcmp(argv[1],"help"))) {
+ fprintf(stderr,"Command Line Options;\n---------------------\n");
+- fprintf(stderr,"CHESS Q<quiescence depth> H<hash size> D<search depth> L<Time limit>\n");
++ fprintf(stderr,"COLCHESS Q<quiescence depth> H<hash size> D<search depth> L<Time limit>\n");
+ fprintf(stderr,"SW<White Player Skill> SB<Black Player Skill> DEATH WHITE BLACK BOTH\nLEARN NOLEARN BOOK NOBOOK\n\n");
+ exit(0);
+ }
+@@ -1299,7 +1301,7 @@ + strcpy(filename,path);
+ strcat(filename,"chessdat.dat");
+ if ((f=fopen(filename,"r"))==NULL) { /* Open file */
+- fprintf(stderr,"ERROR LOADING DATA FILE!\n");
++ fprintf(stderr,"%s: ERROR LOADING DATA FILE!\n",filename);
+ exit(0);
+ }
+
diff --git a/games/colchess/patches/patch-ac b/games/colchess/patches/patch-ac new file mode 100644 index 00000000000..86e4f6b53d3 --- /dev/null +++ b/games/colchess/patches/patch-ac @@ -0,0 +1,41 @@ +$NetBSD: patch-ac,v 1.1.1.1 2000/10/24 20:08:13 jlam Exp $ + +--- misc.c.orig Thu Aug 17 04:22:08 2000 ++++ misc.c +@@ -16,7 +16,7 @@ + #define ROLLOVER_CORRECTION (double)((1073741824.0/(double)CLOCKS_PER_SEC)*4.0)
+ #define CMSCORE (50000000)
+
+-extern char gamepath[FILENAME_MAX],path[FILENAME_MAX];
++extern char gamepath[FILENAME_MAX],book_path[FILENAME_MAX],path[FILENAME_MAX];
+ extern char dir_command[10],sep[3];
+ extern long int rtable[8][8][13],_nhash,_nanaly;
+ extern double time_spent;
+@@ -1160,13 +1160,10 @@ + int i,a,b;
+ long int npos=0;
+ movelst *mvl=NULL,*oldmvl=NULL;
+- char fen[80],temp[1024],ch,y,book_path[FILENAME_MAX];
++ char fen[80],temp[1024],ch,y;
+ openpos *op=NULL,*oldop=NULL,*opall=NULL;
+ FILE *fp;
+
+- strcpy(book_path,path);
+- strcat(book_path,sep);
+- strcat(book_path,"book.dat");
+ if ((fp = fopen(book_path,"r"))==NULL) {
+ fprintf(stderr,"Failed to load opening book %s\n",book_path);
+ return NULL;
+@@ -1246,12 +1243,8 @@ + void save_openings(openpos *openings) {
+ openpos *op=openings;
+ movelst *mvl;
+- char book_path[FILENAME_MAX];
+ FILE *fp;
+
+- strcpy(book_path,path);
+- strcat(book_path,sep);
+- strcat(book_path,"book.dat");
+ if ((fp = fopen(book_path,"w"))==NULL) {
+ fprintf(stderr,"Failed to save opening book %s\n",book_path);
+ return;
diff --git a/games/colchess/pkg/COMMENT b/games/colchess/pkg/COMMENT new file mode 100644 index 00000000000..4a4f4b741d5 --- /dev/null +++ b/games/colchess/pkg/COMMENT @@ -0,0 +1 @@ +chess analysis engine diff --git a/games/colchess/pkg/DESCR b/games/colchess/pkg/DESCR new file mode 100644 index 00000000000..e8c96eaac11 --- /dev/null +++ b/games/colchess/pkg/DESCR @@ -0,0 +1,5 @@ +ColChess is primarily an analysis engine, though it can also be used for +playing competitive games. It uses the brute force analysis method for +tree searching, meaning that it analyses far more nodes per move than an +ordinary chess program such as GNU Chess or Crafty, but it cuts out all the +guesswork so that its analysis is always accurate to the depth specified. diff --git a/games/colchess/pkg/PLIST b/games/colchess/pkg/PLIST new file mode 100644 index 00000000000..e6c99e2ec6a --- /dev/null +++ b/games/colchess/pkg/PLIST @@ -0,0 +1,10 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2000/10/24 20:08:13 jlam Exp $ +bin/colchess +share/colchess/chessdat.dat +share/colchess/tests/bk.epd +share/colchess/tests/bwtc.epd +share/colchess/tests/wac.epd +share/colchess/tests/wcsac.epd +share/doc/colchess/README +@dirrm share/colchess/tests +@dirrm share/colchess |