diff options
author | jlam <jlam> | 2002-09-11 10:52:09 +0000 |
---|---|---|
committer | jlam <jlam> | 2002-09-11 10:52:09 +0000 |
commit | cccecf0c21b2d8d72a469d836a65698fc53368cd (patch) | |
tree | 8f2016bae6ab4e791c81b943e95a48e0f40523bd /games/crafty | |
parent | f604d874cf0b0e751a74f006cdab74bc1ecec838 (diff) | |
download | pkgsrc-cccecf0c21b2d8d72a469d836a65698fc53368cd.tar.gz |
Update games/crafty to 18.15. Changes from version 18.13 include:
18.14 Minor bug in ResignOrDraw() code caused Crafty to not offer draws
although it would accept them when appropriate. Rook vs Minor
is now evaluated as "neither side can win" an oversight in the
EvaluateWinner() code. minor bug in ResignOrDraw() would fail to
offer draws due to the +0.01/-0.01 draw scores returned by the
EGTB probe code.
18.15 change in endgame draw recognition to handle the case where one
side appears to be in a lost ending but is stalemated. the code
now evaluates such positions as "DrawScore()" instead. the code
to accept/decline draws has been modified. when a draw offer is
received, a global variable "draw_offer_pending" is set to 1.
when the search for a move for crafty terminates, crafty then
uses this value to decide whether to accept or decline the draw.
this means that the accept/decline won't happen until _after_ the
search has a chance to see if something good is happening that
should cause the draw to be declined, closing a timing hole that
used to exist that let a few "suspects" get away with draws that
should not have happened (ie crafty has - scores for a long time,
the opponent suddenly fails low and sees he is losing and offers
a draw quickly. Crafty would accept before doing a search and
noticing that it was suddenly winning.) minor evaluation change
to notice that K+B+right RP vs K+B is not necessarily won if the
weaker side has a bishop of the right color.
Diffstat (limited to 'games/crafty')
-rw-r--r-- | games/crafty/Makefile | 29 | ||||
-rw-r--r-- | games/crafty/distinfo | 21 | ||||
-rw-r--r-- | games/crafty/patches/patch-aa | 67 | ||||
-rw-r--r-- | games/crafty/patches/patch-ab | 32 |
4 files changed, 43 insertions, 106 deletions
diff --git a/games/crafty/Makefile b/games/crafty/Makefile index fbd6ab5e2ab..77a032f3385 100644 --- a/games/crafty/Makefile +++ b/games/crafty/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.19 2002/01/12 05:48:15 jlam Exp $ +# $NetBSD: Makefile,v 1.20 2002/09/11 10:52:09 jlam Exp $ -DISTNAME= crafty-18.13 +DISTNAME= crafty-18.15 CATEGORIES= games MASTER_SITES= ftp://ftp.cis.uab.edu/pub/hyatt/v18/ \ ftp://ftp.cis.uab.edu/pub/hyatt/ \ @@ -11,7 +11,7 @@ DISTFILES+= ${CRAFTY_STARTPGN} ${CRAFTY_DOCFILES} MAINTAINER= jlam@netbsd.org COMMENT= chess engine -USE_BUILDLINK_ONLY= YES +USE_BUILDLINK2= YES DIST_SUBDIR= ${DISTNAME} WRKSRC= ${WRKDIR} @@ -22,19 +22,17 @@ EXTRACT_ONLY= ${CRAFTY_DISTFILES} .include "../../mk/bsd.prefs.mk" -.if ${OPSYS} == "NetBSD" -.if ${MACHINE_ARCH} == "i386" -.if ${OBJECT_FMT} == "ELF" +.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) +. if ${OBJECT_FMT} == "ELF" ALL_TARGET= netbsd-i386-elf -.else +. else ALL_TARGET= netbsd-i386 -.endif -.elif ${MACHINE_ARCH} == "sparc" +. endif +.elif !empty(MACHINE_PLATFORM:MNetBSD-*-sparc) ALL_TARGET= netbsd-sparc -.else +.elif !empty(MACHINE_PLATFORM:MNetBSD-*-*) ALL_TARGET= netbsd -.endif -.elif ${OPSYS} == "SunOS" +.elif !empty(MACHINE_PLATFORM:MSunOS-*-*) ALL_TARGET= solaris-gcc .else ALL_TARGET= generic @@ -54,6 +52,13 @@ post-extract: ${CP} ${DISTDIR}/${DIST_SUBDIR}/${CRAFTY_STARTPGN} ${WRKDIR} ${MV} ${WRKSRC}/Sparc.s ${WRKSRC}/Sparc.S +post-patch: + cd ${WRKSRC}; for file in Makefile; do \ + ${SED} -e "s| -O3||g" -e "s| -m486||g" \ + $${file} >> $${file}.fixed; \ + ${MV} $${file}.fixed $${file}; \ + done + post-build: ${RM} -f ${CRAFTYRC} ${ECHO} "books create ${CRAFTY_STARTPGN} 60" > ${CRAFTYRC} diff --git a/games/crafty/distinfo b/games/crafty/distinfo index 9a806ea356d..212dc04a92e 100644 --- a/games/crafty/distinfo +++ b/games/crafty/distinfo @@ -1,12 +1,11 @@ -$NetBSD: distinfo,v 1.6 2002/04/04 19:28:10 jmc Exp $ +$NetBSD: distinfo,v 1.7 2002/09/11 10:52:09 jlam Exp $ -SHA1 (crafty-18.13/crafty-18.13.tar.gz) = 9ec43d2c629eaa6bbb0df53b719764487a9d2be2 -Size (crafty-18.13/crafty-18.13.tar.gz) = 363916 bytes -SHA1 (crafty-18.13/start.pgn) = 09de69c698feda46c1ebafa4fa8e908296c66701 -Size (crafty-18.13/start.pgn) = 1347 bytes -SHA1 (crafty-18.13/read.me) = 0591fd3e511c8171270e5bcab085ae98b78b80fb -Size (crafty-18.13/read.me) = 6942 bytes -SHA1 (crafty-18.13/crafty.faq) = 7ba5cc19e190fdcf1697e3130c679ce5e50141db -Size (crafty-18.13/crafty.faq) = 10252 bytes -SHA1 (patch-aa) = 7e6306d7ba0cc1ac6159c717328bd172785326f1 -SHA1 (patch-ab) = f25fba723d970a04811481947715dfeaf97a988f +SHA1 (crafty-18.15/crafty-18.15.tar.gz) = 8bc3beeb464a792973d8276b291bf761fec38f09 +Size (crafty-18.15/crafty-18.15.tar.gz) = 365476 bytes +SHA1 (crafty-18.15/start.pgn) = 09de69c698feda46c1ebafa4fa8e908296c66701 +Size (crafty-18.15/start.pgn) = 1347 bytes +SHA1 (crafty-18.15/read.me) = b9ec493e51f8eb7828c32a003f0658f3ba5d2319 +Size (crafty-18.15/read.me) = 6944 bytes +SHA1 (crafty-18.15/crafty.faq) = 7ba5cc19e190fdcf1697e3130c679ce5e50141db +Size (crafty-18.15/crafty.faq) = 10252 bytes +SHA1 (patch-ab) = cf686338b72b83922b23751d75011e92cf3dbe83 diff --git a/games/crafty/patches/patch-aa b/games/crafty/patches/patch-aa deleted file mode 100644 index 48027b0eceb..00000000000 --- a/games/crafty/patches/patch-aa +++ /dev/null @@ -1,67 +0,0 @@ -$NetBSD: patch-aa,v 1.5 2001/03/09 19:55:58 jlam Exp $ - ---- Makefile.orig Mon Feb 5 16:20:35 2001 -+++ Makefile -@@ -135,7 +135,7 @@ - dos: - $(MAKE) target=DOS \ - CC=gcc CXX='$$(CC)' \ -- CFLAGS='$(CFLAGS) -fomit-frame-pointer -m486 -O3' \ -+ CFLAGS='$(CFLAGS) -fomit-frame-pointer -O3' \ - LDFLAGS='$(LDFLAGS)' \ - opt='$(opt) -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS \ - -DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B' \ -@@ -145,7 +145,7 @@ - freebsd: - $(MAKE) target=FreeBSD \ - CC=gcc CXX='$$(CC)' \ -- CFLAGS='$(CFLAGS) -fomit-frame-pointer -m486 -O3 -Wall' \ -+ CFLAGS='$(CFLAGS) -fomit-frame-pointer -O3 -Wall' \ - LDFLAGS='$(LDFLAGS)' \ - opt='$(opt) -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS \ - -DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B -DFAST' \ -@@ -243,7 +243,7 @@ - netbsd: - $(MAKE) target=NetBSD \ - CC=gcc CXX=g++ \ -- CFLAGS='$(CFLAGS) -D_REENTRANT -O3 -Wall \ -+ CFLAGS='$(CFLAGS) -D_REENTRANT -Wall \ - -fomit-frame-pointer -funroll-all-loops \ - -finline-functions -ffast-math' \ - LDFLAGS='$(LDFLAGS)' \ -@@ -253,7 +253,7 @@ - netbsd-i386: - $(MAKE) target=NetBSD \ - CC=gcc CXX=g++ \ -- CFLAGS='$(CFLAGS) -D_REENTRANT -O3 -Wall -m486 \ -+ CFLAGS='$(CFLAGS) -D_REENTRANT -Wall \ - -fomit-frame-pointer -funroll-all-loops \ - -finline-functions -ffast-math' \ - LDFLAGS='$(LDFLAGS)' \ -@@ -265,7 +265,7 @@ - netbsd-i386-elf: - $(MAKE) target=NetBSD \ - CC=gcc CXX=g++ \ -- CFLAGS='$(CFLAGS) -D_REENTRANT -O3 -Wall -m486 \ -+ CFLAGS='$(CFLAGS) -D_REENTRANT -Wall \ - -fomit-frame-pointer -funroll-all-loops \ - -finline-functions -ffast-math' \ - LDFLAGS='$(LDFLAGS)' \ -@@ -277,7 +277,7 @@ - netbsd-sparc: - $(MAKE) target=NetBSD \ - CC=gcc CXX=g++ \ -- CFLAGS='$(CFLAGS) -D_REENTRANT -O3 -Wall \ -+ CFLAGS='$(CFLAGS) -D_REENTRANT -Wall \ - -fomit-frame-pointer -funroll-all-loops \ - -finline-functions -ffast-math' \ - LDFLAGS='$(LDFLAGS)' \ -@@ -297,7 +297,7 @@ - os2: - $(MAKE) target=OS2 \ - CC=gcc CXX='$$(CC)' \ -- CFLAGS='$(CFLAGS) -fomit-frame-pointer -m486 -O3 -Wall' \ -+ CFLAGS='$(CFLAGS) -fomit-frame-pointer -O3 -Wall' \ - LDFLAGS='$(LDFLAGS) -Zexe -Zcrtdll -s' \ - opt='$(opt) -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS \ - -DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B -DFAST' \ diff --git a/games/crafty/patches/patch-ab b/games/crafty/patches/patch-ab index 9277af05ed2..bceff76c77d 100644 --- a/games/crafty/patches/patch-ab +++ b/games/crafty/patches/patch-ab @@ -1,8 +1,8 @@ -$NetBSD: patch-ab,v 1.3 2002/04/04 19:28:10 jmc Exp $ +$NetBSD: patch-ab,v 1.4 2002/09/11 10:52:10 jlam Exp $ ---- boolean.c.orig Thu Apr 4 07:18:52 2002 -+++ boolean.c Thu Apr 4 19:19:16 2002 -@@ -61,23 +61,49 @@ +--- boolean.c.orig Thu May 23 10:02:28 2002 ++++ boolean.c +@@ -61,23 +61,49 @@ int PopCnt(register BITBOARD a) { } int FirstOne(BITBOARD arg1) { @@ -10,13 +10,13 @@ $NetBSD: patch-ab,v 1.3 2002/04/04 19:28:10 jmc Exp $ + + j = k = 0; if (arg1>>48) -- return (first_ones[arg1>>48]); +- return (first_one[arg1>>48]); - if ((arg1>>32)&65535) -- return (first_ones[(arg1>>32)&65535]+16); +- return (first_one[(arg1>>32)&65535]+16); - if ((arg1>>16)&65535) -- return (first_ones[(arg1>>16)&65535]+32); -- return (first_ones[arg1&65535]+48); -+ i = ((BITBOARD)(arg1>>48)); +- return (first_one[(arg1>>16)&65535]+32); +- return (first_one[arg1&65535]+48); ++ i = ((BITBOARD)(arg1>>48)); + else if ((arg1>>32)&65535) { + i = ((arg1>>32)&65535); + j = 16; @@ -28,19 +28,19 @@ $NetBSD: patch-ab,v 1.3 2002/04/04 19:28:10 jmc Exp $ + j = 48; + } + while (i >>= 1) -+ k++; ++ k++; + k = 16 - k; + return (j + k - 1); } int LastOne(BITBOARD arg1) { - if (arg1&65535) -- return (last_ones[arg1&65535]+48); +- return (last_one[arg1&65535]+48); - if ((arg1>>16)&65535) -- return (last_ones[(arg1>>16)&65535]+32); +- return (last_one[(arg1>>16)&65535]+32); - if ((arg1>>32)&65535) -- return (last_ones[(arg1>>32)&65535]+16); -- return (last_ones[arg1>>48]); +- return (last_one[(arg1>>32)&65535]+16); +- return (last_one[arg1>>48]); + unsigned int i,j,k; + + j = k = 0; @@ -57,8 +57,8 @@ $NetBSD: patch-ab,v 1.3 2002/04/04 19:28:10 jmc Exp $ + i = arg1>>48; + + while ((i & 0x1) == 0) { -+ i >>= 1; -+ k++; ++ i >>= 1; ++ k++; + } + k = 16 - k; + return j + k - 1; |