pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/games/gnuchess Update gnuchess to 5.07. Patch provide...
details: https://anonhg.NetBSD.org/pkgsrc/rev/5169e2361905
branches: trunk
changeset: 470320:5169e2361905
user: minskim <minskim%pkgsrc.org@localhost>
date: Mon Mar 08 03:04:36 2004 +0000
description:
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:
games/gnuchess/Makefile | 27 ++++-------------
games/gnuchess/PLIST | 4 +--
games/gnuchess/distinfo | 16 ++--------
games/gnuchess/files/gnuchessx.sh | 7 ----
games/gnuchess/patches/patch-aa | 22 ---------------
games/gnuchess/patches/patch-ab | 48 --------------------------------
games/gnuchess/patches/patch-ac | 12 --------
games/gnuchess/patches/patch-ad | 21 --------------
games/gnuchess/patches/patch-ae | 12 --------
games/gnuchess/patches/patch-af | 57 ---------------------------------------
games/gnuchess/patches/patch-ag | 18 ------------
games/gnuchess/patches/patch-ah | 10 ------
12 files changed, 11 insertions(+), 243 deletions(-)
diffs (truncated from 329 to 300 lines):
diff -r e91c4094dd8d -r 5169e2361905 games/gnuchess/Makefile
--- a/games/gnuchess/Makefile Mon Mar 08 02:36:37 2004 +0000
+++ b/games/gnuchess/Makefile Mon Mar 08 03:04:36 2004 +0000
@@ -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@localhost
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="-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 -r e91c4094dd8d -r 5169e2361905 games/gnuchess/PLIST
--- a/games/gnuchess/PLIST Mon Mar 08 02:36:37 2004 +0000
+++ b/games/gnuchess/PLIST Mon Mar 08 03:04:36 2004 +0000
@@ -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 -r e91c4094dd8d -r 5169e2361905 games/gnuchess/distinfo
--- a/games/gnuchess/distinfo Mon Mar 08 02:36:37 2004 +0000
+++ b/games/gnuchess/distinfo Mon Mar 08 03:04:36 2004 +0000
@@ -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 -r e91c4094dd8d -r 5169e2361905 games/gnuchess/files/gnuchessx.sh
--- a/games/gnuchess/files/gnuchessx.sh Mon Mar 08 02:36:37 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r e91c4094dd8d -r 5169e2361905 games/gnuchess/patches/patch-aa
--- a/games/gnuchess/patches/patch-aa Mon Mar 08 02:36:37 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r e91c4094dd8d -r 5169e2361905 games/gnuchess/patches/patch-ab
--- a/games/gnuchess/patches/patch-ab Mon Mar 08 02:36:37 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r e91c4094dd8d -r 5169e2361905 games/gnuchess/patches/patch-ac
--- a/games/gnuchess/patches/patch-ac Mon Mar 08 02:36:37 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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@localhost
- cracraft%ai.mit.edu@localhost, cracraft%stanfordalumni.org@localhost, cracraft%earthlink.net@localhost
- */
--#define BOOKSRC "book.pgn"
--#define BOOKBIN "book.dat"
-+#define BOOKSRC LIBDIR "book.pgn"
-+#define BOOKBIN LIBDIR "book.dat"
diff -r e91c4094dd8d -r 5169e2361905 games/gnuchess/patches/patch-ad
--- a/games/gnuchess/patches/patch-ad Mon Mar 08 02:36:37 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r e91c4094dd8d -r 5169e2361905 games/gnuchess/patches/patch-ae
--- a/games/gnuchess/patches/patch-ae Mon Mar 08 02:36:37 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r e91c4094dd8d -r 5169e2361905 games/gnuchess/patches/patch-af
--- a/games/gnuchess/patches/patch-af Mon Mar 08 02:36:37 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r e91c4094dd8d -r 5169e2361905 games/gnuchess/patches/patch-ag
--- a/games/gnuchess/patches/patch-ag Mon Mar 08 02:36:37 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index