pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/exchess Update games/exchess to v7.31beta, this ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b8c61edf157a
branches:  trunk
changeset: 639362:b8c61edf157a
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Thu Sep 11 16:59:16 2014 +0000

description:
Update games/exchess to v7.31beta, this package's first update in 14 years.

The primary motivator for the upgrade is to improve the book generation
time, which is now several times faster (builds were failing with CPU ulimit
of 1 hour on 3GHz Xeon E5's with the previous version).  This new version
even supports multiple cores, though that isn't enabled at this time.

There appear to have been many other updates, but there is no ChangeLog
and there aren't even any intermediate versions for download (hence using
the current beta version).  Upstream unfortunately makes it as difficult
as possible to see the history of this package.

diffstat:

 games/exchess/Makefile                      |   21 ++-
 games/exchess/distinfo                      |   36 ++---
 games/exchess/files/Makefile                |   19 ---
 games/exchess/patches/patch-aa              |   81 -------------
 games/exchess/patches/patch-ab              |   48 -------
 games/exchess/patches/patch-ac              |   35 -----
 games/exchess/patches/patch-ad              |  170 ----------------------------
 games/exchess/patches/patch-ae              |   22 ---
 games/exchess/patches/patch-af              |   32 -----
 games/exchess/patches/patch-ag              |   47 -------
 games/exchess/patches/patch-ah              |   16 --
 games/exchess/patches/patch-ai              |  157 -------------------------
 games/exchess/patches/patch-aj              |   90 --------------
 games/exchess/patches/patch-ak              |   12 -
 games/exchess/patches/patch-funct.h         |   36 -----
 games/exchess/patches/patch-main.h          |   25 ----
 games/exchess/patches/patch-parse.cpp       |   35 -----
 games/exchess/patches/patch-pmoves.cpp      |   13 --
 games/exchess/patches/patch-search.h        |   28 ----
 games/exchess/patches/patch-search.par.in   |   15 ++
 games/exchess/patches/patch-setup.cpp       |   24 ---
 games/exchess/patches/patch-src_book.cpp    |   48 +++++++
 games/exchess/patches/patch-src_chess.h     |  138 ++++++++++++++++++++++
 games/exchess/patches/patch-src_exmove.cpp  |   15 ++
 games/exchess/patches/patch-src_funct.h     |   24 +++
 games/exchess/patches/patch-src_hash.cpp    |   15 ++
 games/exchess/patches/patch-src_hash.h      |   24 +++
 games/exchess/patches/patch-src_main.cpp    |   15 ++
 games/exchess/patches/patch-src_score.cpp   |   15 ++
 games/exchess/patches/patch-src_search.cpp  |   33 +++++
 games/exchess/patches/patch-src_support.cpp |   29 ++++
 31 files changed, 399 insertions(+), 919 deletions(-)

diffs (truncated from 1469 to 300 lines):

diff -r 910827a8aa36 -r b8c61edf157a games/exchess/Makefile
--- a/games/exchess/Makefile    Thu Sep 11 16:11:46 2014 +0000
+++ b/games/exchess/Makefile    Thu Sep 11 16:59:16 2014 +0000
@@ -1,9 +1,7 @@
-# $NetBSD: Makefile,v 1.16 2014/02/09 16:50:45 wiedi Exp $
+# $NetBSD: Makefile,v 1.17 2014/09/11 16:59:16 jperkin Exp $
 
-DISTNAME=              EXCH314S
-# 5.01beta available
-PKGNAME=               exchess-3.14
-PKGREVISION=           1
+DISTNAME=              EXchess_v7.31beta
+PKGNAME=               exchess-7.31beta
 CATEGORIES=            games
 MASTER_SITES=          ${MASTER_SITE_LOCAL}
 EXTRACT_SUFX=          .zip
@@ -11,19 +9,25 @@
 MAINTAINER=            pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=              http://personal.denison.edu/~homand/EXchess.htm
 COMMENT=               Experimental chess engine
+LICENSE=               gnu-gpl-v3
 
 USE_LANGUAGES=         c++
 NO_CONFIGURE=          yes
 
-WRKSRC=                        ${WRKDIR}
+WRKSRC=                        ${WRKDIR}/${DISTNAME:C/beta//}
 LIBDIR=                        ${PREFIX}/lib/exchess
 DOCDIR=                        ${PREFIX}/share/doc/exchess
 
-CFLAGS.SunOS+=         -Du_int64_t=uint64_t
+CFLAGS+=               -DEXCHESS_DIR=${LIBDIR:Q}
+LDFLAGS+=              ${PTHREAD_LDFLAGS}
+LIBS+=                 ${PTHREAD_LIBS}
 
 post-extract:
        cd ${WRKSRC} && ${MV} search.par search.par.in
-       ${CP} ${FILESDIR}/Makefile ${WRKSRC}
+
+do-build:
+       cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} \
+               ${CXX} ${CFLAGS} src/EXchess.cc -o exchess ${LDFLAGS} ${LIBS}
 
 post-build:
        ${SED}  -e "s,@PREFIX@,${PREFIX},g" \
@@ -36,4 +40,5 @@
        ${INSTALL_DATA} ${WRKSRC}/search.par ${DESTDIR}${PREFIX}/lib/exchess
        ${INSTALL_DATA} ${WRKSRC}/readme.txt ${DESTDIR}${DOCDIR}
 
+.include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 910827a8aa36 -r b8c61edf157a games/exchess/distinfo
--- a/games/exchess/distinfo    Thu Sep 11 16:11:46 2014 +0000
+++ b/games/exchess/distinfo    Thu Sep 11 16:59:16 2014 +0000
@@ -1,22 +1,16 @@
-$NetBSD: distinfo,v 1.10 2014/02/09 16:50:45 wiedi Exp $
+$NetBSD: distinfo,v 1.11 2014/09/11 16:59:16 jperkin Exp $
 
-SHA1 (EXCH314S.zip) = 7d8ffbd94dc86a97512826e611048a691c8c646d
-RMD160 (EXCH314S.zip) = 0503200c210aaf7ddc69e1372392e8ea690505ea
-Size (EXCH314S.zip) = 110676 bytes
-SHA1 (patch-aa) = 6aa16f2ca4ecc52b77739b5d28ab650f8102e54c
-SHA1 (patch-ab) = a38d6455675083e9ca291c844c85746a0ed897e5
-SHA1 (patch-ac) = cfc1beff8ae3b2e4c9620e8d49852ce80d848ad6
-SHA1 (patch-ad) = f2d2de59f56a0a24e6408ace9ba15139f986de95
-SHA1 (patch-ae) = 9d374b888a6f431604f41c4421baa23d8ca775a1
-SHA1 (patch-af) = f2379b8929775ff660f9af9fc96969eab1b25870
-SHA1 (patch-ag) = 7072e6b7ac08fcb901630c2705fe38065bc89bab
-SHA1 (patch-ah) = 872b0b7c62f95075f0ce7360464fa51215619ee3
-SHA1 (patch-ai) = 7244cfeb214e08a5e10198de2488957a63e8fda9
-SHA1 (patch-aj) = 064dd97be969d403f09cb9cab70705891b1355de
-SHA1 (patch-ak) = 659f1cf07efefe524be4d025446fea55eb5f3e9a
-SHA1 (patch-funct.h) = 8ff861d1cfaac5aac8722334b2142e9c63a231c6
-SHA1 (patch-main.h) = f49c0c889469002281fd15c6ceac359f8c4e6f51
-SHA1 (patch-parse.cpp) = f000ea0d4e2adb893ec6ec09a5e0c3dc5c77970d
-SHA1 (patch-pmoves.cpp) = 66973c0baee54fa623a9f0b77c29d41e4c6924b8
-SHA1 (patch-search.h) = 85b16b102087dd218d64c14cc294c5c6df6849bb
-SHA1 (patch-setup.cpp) = 16914d19bb6bc48341409dfa15d9f451e4f46733
+SHA1 (EXchess_v7.31beta.zip) = 09fa6d133172e34c1908df148f56489c47ee8cc2
+RMD160 (EXchess_v7.31beta.zip) = 38a3a6b3a3a53ff62321642954ff4d29ebfe9705
+Size (EXchess_v7.31beta.zip) = 3421179 bytes
+SHA1 (patch-search.par.in) = 664781d6f9a204f9a071825dc3ebee19da4e3f8b
+SHA1 (patch-src_book.cpp) = ab12445c7ebd769a2a90166fba4ef256f293709d
+SHA1 (patch-src_chess.h) = 569c3f79a51a6be9cec83e98ef6c38f7e8d30660
+SHA1 (patch-src_exmove.cpp) = e4cff58e89501f5b73d78984ab8bf76a50d12677
+SHA1 (patch-src_funct.h) = d3ecab4fad483ac41f76993ecfb6af38c243115a
+SHA1 (patch-src_hash.cpp) = 3556b37f386d867d092075edcd1cc279bb4c0223
+SHA1 (patch-src_hash.h) = 5af2f9bad4484cc07ff8cb452b7b7759c3ab9d4e
+SHA1 (patch-src_main.cpp) = e68ef0a3a9ef4aaaeab59c8da0e3badd198e49f1
+SHA1 (patch-src_score.cpp) = f74c09b8bed649bbf6d00d0e3401de4dc16dd353
+SHA1 (patch-src_search.cpp) = eae69d8e31ca42b27db64df19e58b02b030b0a6a
+SHA1 (patch-src_support.cpp) = 4329f3863e2f4ebb18f2c427043cfbdff6879c4c
diff -r 910827a8aa36 -r b8c61edf157a games/exchess/files/Makefile
--- a/games/exchess/files/Makefile      Thu Sep 11 16:11:46 2014 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-# $NetBSD: Makefile,v 1.2 2010/01/29 20:29:26 joerg Exp $
-
-LIBDIR=                ${PREFIX}/lib/exchess
-
-CPPFLAGS=      -DEXCHESS_DIR=\"${LIBDIR}/\"
-
-OBJS=          attacks.o book.o check.o exmove.o hash.o main.o movelist.o
-OBJS+=         parse.o pcapts.o pmoves.o probe.o score.o search.o setup.o
-OBJS+=         sort.o swap.o util.o
-
-all: exchess
-
-exchess: ${OBJS}
-       ${CXX} -o ${.TARGET} ${OBJS} -lm
-
-.SUFFIXES: .cpp
-
-.cpp.o:
-       ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c ${.IMPSRC}
diff -r 910827a8aa36 -r b8c61edf157a games/exchess/patches/patch-aa
--- a/games/exchess/patches/patch-aa    Thu Sep 11 16:11:46 2014 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-$NetBSD: patch-aa,v 1.3 2013/04/30 22:20:58 joerg Exp $
-
---- book.cpp.orig      2000-04-30 09:56:26.000000000 +0000
-+++ book.cpp
-@@ -12,12 +12,14 @@
- #include "const.h"
- #include <stdio.h>
- #include <string.h>
--#include <iostream.h>
--#include <iomanip.h>
--#include <fstream.h>
-+#include <iostream>
-+#include <iomanip>
-+#include <fstream>
- #include <math.h>
- #include <time.h>
- 
-+using namespace std;
-+
- /* variables for book learning */
- book_rec learn_book[100];          // book learning array
- int learn_count = 0;               // number of book moves played
-@@ -51,8 +53,8 @@ void build_book(position ipos)
-   char instring[100], line[100];     // strings from input files
-   char outbook[100];
-   position temp_pos;                 // temporary position
--  move bmove;                        // book move under consideration
--  unsigned __int64 pcode;            // hash code for position
-+  my_move bmove;                        // book move under consideration
-+  u_int64_t pcode;                   // hash code for position
-   int i = -1, j = 0, k = 0, p;       // loop variables
-   int count = 0, thresh, LINE_DEPTH; // control variables
- 
-@@ -241,11 +243,11 @@ book_rec book_record;    // working reco
- position temporary_pos;  // working position
- 
- /* Function to find a position in the book */
--int find_record(position p, move m, int file_size)
-+int find_record(position p, my_move m, int file_size)
- {
-   file_pos = 0;
-   int jump = int(file_size/2);
--  unsigned __int64 pcode = ZERO;
-+  u_int64_t pcode = ZERO;
- 
-   temporary_pos = p;
-   if(!exec_move(&temporary_pos, m, 1)) return 0;
-@@ -299,13 +301,13 @@ int find_record(position p, move m, int 
- // position is in the book.  If so, the move in question
- // becomes a candidate move.  Information is stored to
- // facilitate easy learning during the game.
--move opening_book(h_code hash_code, position p)
-+my_move opening_book(h_code hash_code, position p)
- {
-   int file_size, mflag = 0, j;
-   int candidates = 0, total_score = 0;
-   int logger = 0, poster = 0;
-   move_list list;
--  move nomove; nomove.t = 0;
-+  my_move nomove; nomove.t = 0;
-   char book_file[100];   // file name for the book
- 
-   // generate legal moves
-@@ -398,7 +400,7 @@ int edit_book(h_code hash_code, position
-   int file_size, mflag = 0, j, outflag = 0;
-   int search_time = 0, total_score = 0;
-   move_list list;
--  move nomove; nomove.t = 0;
-+  my_move nomove; nomove.t = 0;
-   char resp[2];
-   char book_file[100];   // file name for the book
- 
-@@ -462,7 +464,7 @@ int edit_book(h_code hash_code, position
-   if(outflag == 1) cout << "\n";
- 
-   /* Edit mode for individual moves */
--  move edit_move;
-+  my_move edit_move;
-   while(1) {
-     cout << "\nEnter a move to be edited/investigated (0 = quit): ";
-     cin >> mstring; if(mstring[0] == '0') break;
diff -r 910827a8aa36 -r b8c61edf157a games/exchess/patches/patch-ab
--- a/games/exchess/patches/patch-ab    Thu Sep 11 16:11:46 2014 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-$NetBSD: patch-ab,v 1.3 2013/04/30 22:20:58 joerg Exp $
-
---- chess.h.orig       2000-02-19 11:28:46.000000000 +0000
-+++ chess.h
-@@ -3,6 +3,8 @@
- #ifndef CHESS_H
- #define CHESS_H
- 
-+#include <sys/types.h>
-+
- // move structure to encapsulate several important move parameters
- // note: The char used below is treated like an integer.
- 
-@@ -30,7 +32,7 @@ struct move_t {
- // union of move_t and an integer to make comparison of 
- // moves easier.  (as suggested in Tom Kerrigans simple chess program)
- 
--union move {
-+union my_move {
-   move_t b;
-   int t;           // assuming a 32 bit integer
- };
-@@ -38,7 +40,7 @@ union move {
- // Add a score for sorting purposes to the move record
- 
- struct move_rec {
--  move m;
-+  my_move m;
-   int score; 
- };
- 
-@@ -79,14 +81,14 @@ struct position {
-                              // side to move
-   int extend;                // extension flag
-   char plist[2][7][10];      // piece lists
--  move last;                 // last move made
-+  my_move last;              // last move made
-   h_code hcode;              // hash code
- };
- 
- // Structure for position in the opening book
- 
- struct book_rec {
-- unsigned __int64 pos_code;    // position hash code
-+ u_int64_t pos_code;           // position hash code
-  int score;                    // score for position
-  int gambit;                   // flag for gambit play
- };
diff -r 910827a8aa36 -r b8c61edf157a games/exchess/patches/patch-ac
--- a/games/exchess/patches/patch-ac    Thu Sep 11 16:11:46 2014 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-$NetBSD: patch-ac,v 1.1.1.1 2000/10/25 08:40:00 jlam Exp $
-
---- define.h.orig      Sun Apr 30 10:02:28 2000
-+++ define.h
-@@ -4,25 +4,26 @@
- #ifndef DEFINE_H
- #define DEFINE_H
- 
-+#include <inttypes.h>
-+
- #define VERS  3.14              // program version number
- #define MAXD  60                // max search depth
- #define MATE 10000000           // mate score
- 
- // Compiler flags for different systems
--#define BORLAND  1      // Selects a win95/NT compiler if set to 1
-+#define BORLAND  0      // Selects a win95/NT compiler if set to 1
-                         //   this should work with MSVC and others as
-                         //   well
- #define DEC      0      // Set to 1 for certain DEC Unix systems, not
-                         //   all will need it - some other unixes may
-                         //   need this if there are errors in "book.cpp"
--#define UNIX     0      // Set to 1 for all Unix systems
-+#define UNIX     1      // Set to 1 for all Unix systems
- #define DOS      0      // Set to 1 for Auto232 DOS mode
- #define DEBUG    0      // Set to 1 to debug mode... quite slow
- 
- // define 64 bit integers
- #if !BORLAND
-- #define __int64 long long
-- #define ZERO 0ULL
-+ #define ZERO 0
- #else
-  #define ZERO 0ui64
- #endif
diff -r 910827a8aa36 -r b8c61edf157a games/exchess/patches/patch-ad
--- a/games/exchess/patches/patch-ad    Thu Sep 11 16:11:46 2014 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +0,0 @@
-$NetBSD: patch-ad,v 1.6 2014/02/09 16:50:45 wiedi Exp $
-
---- main.cpp.orig      2000-04-01 07:46:20.000000000 +0000
-+++ main.cpp
-@@ -3,20 +3,23 @@



Home | Main Index | Thread Index | Old Index