summaryrefslogtreecommitdiff
path: root/games/gnuchess
diff options
context:
space:
mode:
authorminskim <minskim@pkgsrc.org>2004-03-08 03:04:36 +0000
committerminskim <minskim@pkgsrc.org>2004-03-08 03:04:36 +0000
commit14169d1b85f4b2c07a0e2e8325ef500ed49dd879 (patch)
tree5e6e04809d9107c5c43ccc4fed940bd20f64449e /games/gnuchess
parent61294151cfed066a689aa84fccc3c26f07dd9748 (diff)
downloadpkgsrc-14169d1b85f4b2c07a0e2e8325ef500ed49dd879.tar.gz
Update gnuchess to 5.07. Patch provided by Michal Pasternak in
PR pkg/24700, and slightly modified by me. Changes: - New PGN parser handles annotated PGN when creating opening book - Additional command line options - gnuchessx script added - Added code for pondering and analysis mode - Added white/black commands for use with icsDrone - Command line options now follow GNU standards (./gnuchess --help) - Some optimisations added - Book may be stored in /usr/share/games/gnuchess/book.dat - Program no longer starts search from scratch every move - Fixed a potential buffer overflow in pgn.c. - General code cleanups, bug fixes, and probably introduction of new bugs, especially in pondering related code - The opening book is now looked for in /usr/lib/games/gnuchess/book.dat if it is not found in the working directory. - Changes for easing compilation with MSVC - Removed support for the Novag Universal Board. The recommended alternative is to use the winboard driver for this board, which is linked to on http://www.tim-mann.org/extensions.html - Bug fixes (as always) - Bug fixes (The infamous "illegal move" bug should be dead by now.) - Architecture independent binary book. Yes, you may now move your binary book around between little and big endian, 32 and 64 bit machines and it should not break. - Build system is now automake/autoconf, should ease porting gnuchess to your favorite strange architecture. (Hell, what about gnuchess on cellphones...?)
Diffstat (limited to 'games/gnuchess')
-rw-r--r--games/gnuchess/Makefile27
-rw-r--r--games/gnuchess/PLIST4
-rw-r--r--games/gnuchess/distinfo16
-rw-r--r--games/gnuchess/files/gnuchessx.sh7
-rw-r--r--games/gnuchess/patches/patch-aa22
-rw-r--r--games/gnuchess/patches/patch-ab48
-rw-r--r--games/gnuchess/patches/patch-ac12
-rw-r--r--games/gnuchess/patches/patch-ad21
-rw-r--r--games/gnuchess/patches/patch-ae12
-rw-r--r--games/gnuchess/patches/patch-af57
-rw-r--r--games/gnuchess/patches/patch-ag18
-rw-r--r--games/gnuchess/patches/patch-ah10
12 files changed, 11 insertions, 243 deletions
diff --git a/games/gnuchess/Makefile b/games/gnuchess/Makefile
index 62652049fbc..d5a46fa84fa 100644
--- a/games/gnuchess/Makefile
+++ b/games/gnuchess/Makefile
@@ -1,25 +1,20 @@
-# $NetBSD: Makefile,v 1.20 2004/01/24 13:30:56 grant Exp $
+# $NetBSD: Makefile,v 1.21 2004/03/08 03:04:36 minskim Exp $
# FreeBSD Id: Makefile,v 1.6 1999/01/27 07:41:12 fenner Exp
#
-DISTNAME= chess-5.00
-PKGNAME= gnuchess-5.00
-PKGREVISION= 2
+DISTNAME= gnuchess-5.07
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_GNU:=chess/}
-PATCHFILES= gnu500+.patch
-PATCH_SITES= http://www.tim-mann.org/xboard/
-PATCH_DIST_ARGS= -d ${WRKDIR}/${DISTNAME} --quiet -E ${PATCH_STRIP}
-
MAINTAINER= tech-pkg@NetBSD.org
HOMEPAGE= http://www.gnu.org/software/chess/chess.html
COMMENT= GNU chess engine
-WRKSRC= ${WRKDIR}/${DISTNAME}/src
-GNU_CONFIGURE= YES
+PKG_INSTALLATION_TYPES= overwrite pkgviews
+
+USE_BUILDLINK3= yes
+GNU_CONFIGURE= yes
USE_GNU_TOOLS+= make
-ALL_TARGET= gnuchess
BOOKDIR= ${PREFIX}/lib/gnuchess
DOCDIR= ${PREFIX}/share/doc/gnuchess
@@ -31,16 +26,8 @@ CONFIGURE_ENV+= CFLAGS="-O -Winline -Wmissing-prototypes -funroll-loops"
CONFIGURE_ENV+= CFLAGS="-O3 -Winline -Wmissing-prototypes -funroll-loops -fomit-frame-pointer"
.endif
-post-build:
- ${SED} -e "s|@PREFIX@|${PREFIX}|g" \
- ${FILESDIR}/gnuchessx.sh > ${WRKDIR}/gnuchessx.sh
-
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/gnuchess ${PREFIX}/bin/gnuchess
- ${INSTALL_SCRIPT} ${WRKDIR}/gnuchessx.sh ${PREFIX}/bin/gnuchessx
+post-install:
${INSTALL_DATA_DIR} ${DOCDIR}
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/doc/README ${DOCDIR}
- ${INSTALL_DATA_DIR} ${BOOKDIR}
- ${TOUCH} ${BOOKDIR}/.directory
.include "../../mk/bsd.pkg.mk"
diff --git a/games/gnuchess/PLIST b/games/gnuchess/PLIST
index d9a6c98bb9c..0771eb4ff84 100644
--- a/games/gnuchess/PLIST
+++ b/games/gnuchess/PLIST
@@ -1,7 +1,5 @@
-@comment $NetBSD: PLIST,v 1.1 2001/11/01 00:52:52 zuntum Exp $
+@comment $NetBSD: PLIST,v 1.2 2004/03/08 03:04:36 minskim Exp $
bin/gnuchess
bin/gnuchessx
-lib/gnuchess/.directory
share/doc/gnuchess/README
@dirrm share/doc/gnuchess
-@dirrm lib/gnuchess
diff --git a/games/gnuchess/distinfo b/games/gnuchess/distinfo
index 33faed58702..58bd39f421e 100644
--- a/games/gnuchess/distinfo
+++ b/games/gnuchess/distinfo
@@ -1,14 +1,4 @@
-$NetBSD: distinfo,v 1.4 2002/03/15 04:59:16 jmc Exp $
+$NetBSD: distinfo,v 1.5 2004/03/08 03:04:36 minskim Exp $
-SHA1 (chess-5.00.tar.gz) = 86b364d60aab4a2ec5932fb800ef4857251a84cd
-Size (chess-5.00.tar.gz) = 157211 bytes
-SHA1 (gnu500+.patch) = 3ca10daf2beff6f0c03dd9f6c66bea52b8aca6cd
-Size (gnu500+.patch) = 9293 bytes
-SHA1 (patch-aa) = a177d1ac87ae739f62974a277b55c173521cf7d2
-SHA1 (patch-ab) = 093285e9955f23f6ab324cae3e768779a28010ff
-SHA1 (patch-ac) = f027b84d724ce0380784f2a6a67b1998fd119eee
-SHA1 (patch-ad) = 186f7ff808f105cc58f4ea32853dd7bc31faedef
-SHA1 (patch-ae) = 8e423476cc661952c5252ceb7fb721beef620db9
-SHA1 (patch-af) = 55c51f597607726895635024f5646009f8364a1c
-SHA1 (patch-ag) = f78fe990d448ed8c5b5bcd29c038b86ec0b4bc40
-SHA1 (patch-ah) = bce357fa655a49905b95b44c2709244ee04f88fc
+SHA1 (gnuchess-5.07.tar.gz) = 7dbaf957bfea9cf37fe393e1fec7306de0162a16
+Size (gnuchess-5.07.tar.gz) = 234542 bytes
diff --git a/games/gnuchess/files/gnuchessx.sh b/games/gnuchess/files/gnuchessx.sh
deleted file mode 100644
index fdd9e569ba9..00000000000
--- a/games/gnuchess/files/gnuchessx.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: gnuchessx.sh,v 1.2 2001/11/11 07:54:55 jlam Exp $
-#
-# Wrapper script for gnuchess to interface with xboard.
-
-exec @PREFIX@/bin/gnuchess xboard $*
diff --git a/games/gnuchess/patches/patch-aa b/games/gnuchess/patches/patch-aa
deleted file mode 100644
index 6385434a6cf..00000000000
--- a/games/gnuchess/patches/patch-aa
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-aa,v 1.5 2002/03/15 04:59:16 jmc Exp $
-
---- Makefile.in.orig Fri Mar 15 04:46:43 2002
-+++ Makefile.in Fri Mar 15 04:52:04 2002
-@@ -43,7 +43,7 @@
-
- prefix = @prefix@
- exec_prefix = @exec_prefix@
--LIBDIR = $(prefix)/lib
-+LIBDIR = $(prefix)/lib/gnuchess
- BINDIR = $(exec_prefix)/bin
- MANDIR = $(prefix)/man/man6
- MANEXT = .6
-@@ -63,7 +63,7 @@
- # -DUNIVERSAL -- define for use with Novag Universal physical playing board.
- INTERFACE=
-
--CFLAGS=-O3 -Winline -Wmissing-prototypes -funroll-loops -fomit-frame-pointer $(MACHINE) $(INTERFACE)
-+CFLAGS=@CFLAGS@ $(MACHINE) $(INTERFACE) -DLIBDIR=\"${LIBDIR}/\"
-
- # Not normally needed unless debugging or profiling.
- # Debugging
diff --git a/games/gnuchess/patches/patch-ab b/games/gnuchess/patches/patch-ab
deleted file mode 100644
index 029e21497ed..00000000000
--- a/games/gnuchess/patches/patch-ab
+++ /dev/null
@@ -1,48 +0,0 @@
-$NetBSD: patch-ab,v 1.5 2000/12/27 00:24:43 dmcmahill Exp $
-
---- book.c.orig Sat Oct 23 06:07:21 1999
-+++ book.c Tue Dec 26 19:07:35 2000
-@@ -27,4 +27,5 @@
- #include <stdio.h>
- #include <stdlib.h>
-+#include <string.h>
- #ifdef NEVER
- #ifdef UNIX
-@@ -86,5 +87,5 @@
- side = board.side;
- xside = 1^side;
-- rfp = fopen(BOOKBIN,"r+b");
-+ rfp = fopen(BOOKBIN,"rb"); /* don't need to open read/write */
- if (rfp == NULL) {
- if (!(flags & XBOARD))
-@@ -216,6 +217,11 @@
- }
-
--int genbook(void);
--int genbook()
-+/*
-+ * Change genbook() to accept source (pgn book) and target (bin book)
-+ * paths. This lets us generate a book from a pgn file different from
-+ * the ones in BOOKSRC and BOOKBIN.
-+ */
-+int genbook(char *, char *);
-+int genbook(char *src, char *tgt)
- {
- int i,j;
-@@ -226,11 +232,11 @@
- FILE *wfp,*rfp;
-
-- printf("Trying to generate book %s from %s...\n",BOOKBIN,BOOKSRC);
-- if ((wfp = fopen(BOOKBIN,"w+b"))==NULL) {
-- printf("Couldn't open the bin book (%s) for write.\n",BOOKBIN);
-+ printf("Trying to generate book %s from %s...\n",tgt,src);
-+ if ((wfp = fopen(tgt,"w+b"))==NULL) {
-+ printf("Couldn't open the bin book (%s) for write.\n",tgt);
- return(0);
- }
-- if ((rfp = fopen(BOOKSRC,"r"))==NULL) {
-- printf("Couldn't open the pgn book (%s) for read.\n",BOOKSRC);
-+ if ((rfp = fopen(src,"r"))==NULL) {
-+ printf("Couldn't open the pgn book (%s) for read.\n",src);
- fclose(wfp);
- return(0);
diff --git a/games/gnuchess/patches/patch-ac b/games/gnuchess/patches/patch-ac
deleted file mode 100644
index 0d294dea0e1..00000000000
--- a/games/gnuchess/patches/patch-ac
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-ac,v 1.5 2000/10/15 01:53:40 jlam Exp $
-
---- book.h.orig Fri Oct 15 23:41:03 1999
-+++ book.h
-@@ -23,5 +23,5 @@
- bug-gnu-chess@gnu.org
- cracraft@ai.mit.edu, cracraft@stanfordalumni.org, cracraft@earthlink.net
- */
--#define BOOKSRC "book.pgn"
--#define BOOKBIN "book.dat"
-+#define BOOKSRC LIBDIR "book.pgn"
-+#define BOOKBIN LIBDIR "book.dat"
diff --git a/games/gnuchess/patches/patch-ad b/games/gnuchess/patches/patch-ad
deleted file mode 100644
index 58397cea6f3..00000000000
--- a/games/gnuchess/patches/patch-ad
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-ad,v 1.6 2001/11/11 07:54:56 jlam Exp $
-
---- cmd.c.orig Sun Nov 11 02:44:56 2001
-+++ cmd.c
-@@ -26,6 +26,7 @@
-
- #include <stdio.h>
- #include <stdlib.h>
-+#include <string.h>
- #include <signal.h>
- #include <unistd.h>
- #include "version.h"
-@@ -160,7 +161,7 @@
- printf("inputstr = %s\n",inputstr);
- if (strncmp (inputstr, "compile", 7) == 0) {
- printf("calling genbook.\n");
-- genbook ();
-+ genbook (booksrc, bookbin);
- } else if (strcmp (inputstr, "on") == 0) {
- bookmode = BOOKBEST;
- printf("book now on.\n");
diff --git a/games/gnuchess/patches/patch-ae b/games/gnuchess/patches/patch-ae
deleted file mode 100644
index 2e037d8780b..00000000000
--- a/games/gnuchess/patches/patch-ae
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-ae,v 1.3 2000/10/15 01:53:41 jlam Exp $
-
---- common.h.orig Fri Oct 15 23:41:21 1999
-+++ common.h
-@@ -375,6 +375,7 @@
- extern int nmovesfrombook;
- extern float maxtime;
-
-+extern char *booksrc, *bookbin;
-
- enum Piece { empty, pawn, knight, bishop, rook, queen, king, bpawn };
-
diff --git a/games/gnuchess/patches/patch-af b/games/gnuchess/patches/patch-af
deleted file mode 100644
index d3bf21a43c2..00000000000
--- a/games/gnuchess/patches/patch-af
+++ /dev/null
@@ -1,57 +0,0 @@
-$NetBSD: patch-af,v 1.1 2000/10/15 01:53:41 jlam Exp $
-
---- main.c.orig Sat Oct 23 11:50:27 1999
-+++ main.c
-@@ -277,6 +277,9 @@
- 0x7F, 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07, 0x03,
- 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x01 };
-
-+char *booksrc = BOOKSRC;
-+char *bookbin = BOOKBIN;
-+
- int main (int argc, char *argv[])
- {
- int compilebook = 0;
-@@ -302,8 +305,14 @@
- SET (flags, XBOARD);
- } else if (strcmp(argv[i],"post") == 0) {
- SET (flags, POST);
-- } else if (strcmp(argv[i],"compile") == 0)
-+ } else if (strcmp(argv[i],"compile") == 0) {
- compilebook++;
-+ if (argc > 2) {
-+ booksrc = argv[2];
-+ if (argc > 3)
-+ bookbin = argv[3];
-+ }
-+ }
- }
- }
-
-@@ -318,8 +327,14 @@
- SET (flags, XBOARD);
- } else if (strcmp(argv[i],"post") == 0) {
- SET (flags, POST);
-- } else if (strcmp(argv[i],"compile") == 0)
-+ } else if (strcmp(argv[i],"compile") == 0) {
- compilebook++;
-+ if (argc > 2) {
-+ booksrc = argv[2];
-+ if (argc > 3)
-+ bookbin = argv[3];
-+ }
-+ }
- }
- }
-
-@@ -327,8 +342,8 @@
- bookfirstlast = 3;
-
- if (compilebook) {
-- unlink(BOOKBIN);
-- genbook();
-+ unlink(bookbin);
-+ genbook(booksrc, bookbin);
- } else {
- while (!(flags & QUIT))
- {
diff --git a/games/gnuchess/patches/patch-ag b/games/gnuchess/patches/patch-ag
deleted file mode 100644
index 14a6ea9b84d..00000000000
--- a/games/gnuchess/patches/patch-ag
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-ag,v 1.1 2000/12/27 00:24:43 dmcmahill Exp $
-
---- util.c.orig Fri Oct 15 23:56:56 1999
-+++ util.c Tue Dec 26 19:16:54 2000
-@@ -33,4 +33,6 @@
- #include "common.h"
- #include <signal.h>
-+#include <sys/types.h>
-+#include <machine/endian.h>
-
- inline short leadz (BitBoard b)
-@@ -49,5 +51,5 @@
-
- a.bitboard = b;
--#ifdef i386
-+#if (BYTE_ORDER == LITTLE_ENDIAN)
- if (a.v[3] != 0)
- return (lzArray[a.v[3]]);
diff --git a/games/gnuchess/patches/patch-ah b/games/gnuchess/patches/patch-ah
deleted file mode 100644
index c2abafa2728..00000000000
--- a/games/gnuchess/patches/patch-ah
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD: patch-ah,v 1.1 2000/12/27 00:24:43 dmcmahill Exp $
-
---- search.c.orig Fri Oct 15 23:51:49 1999
-+++ search.c Tue Dec 26 19:21:00 2000
-@@ -29,4 +29,5 @@
-
- #include <stdio.h>
-+#include <string.h>
- #include "common.h"
-