pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/games/exchess games/exchess: update to 7.97beta



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2a35e1487416
branches:  trunk
changeset: 425355:2a35e1487416
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sat Mar 21 14:41:45 2020 +0000

description:
games/exchess: update to 7.97beta

Changes since 7.31beta are unknown since the upstream author didn't
document anything.

I just stumbled upon this package because it didn't build with
-Werror=char-subscripts. That bug seems to have been fixed.

diffstat:

 games/exchess/Makefile                      |   22 +-
 games/exchess/distinfo                      |   21 +-
 games/exchess/files/patch-move              |  399 ++++++++++++++++++++++++++++
 games/exchess/patches/patch-search.par.in   |   15 -
 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 --
 14 files changed, 413 insertions(+), 400 deletions(-)

diffs (truncated from 896 to 300 lines):

diff -r 1bee0e6ce2c2 -r 2a35e1487416 games/exchess/Makefile
--- a/games/exchess/Makefile    Sat Mar 21 14:36:22 2020 +0000
+++ b/games/exchess/Makefile    Sat Mar 21 14:41:45 2020 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.19 2020/01/26 17:31:14 rillig Exp $
+# $NetBSD: Makefile,v 1.20 2020/03/21 14:41:45 rillig Exp $
 
-DISTNAME=              EXchess_v7.31beta
-PKGNAME=               exchess-7.31beta
+DISTNAME=              EXchess_v7.97beta
+PKGNAME=               exchess-7.97beta
 CATEGORIES=            games
-MASTER_SITES=          ${MASTER_SITE_LOCAL}
+MASTER_SITES=          -https://sites.google.com/site/experimentalchessprogram/home/${DISTNAME}${EXTRACT_SUFX}?attredirects=0&d=1
 EXTRACT_SUFX=          .zip
 
 MAINTAINER=            pkgsrc-users%NetBSD.org@localhost
@@ -12,29 +12,25 @@
 LICENSE=               gnu-gpl-v3
 
 USE_LANGUAGES=         c++
-NO_CONFIGURE=          yes
 
 WRKSRC=                        ${WRKDIR}/${DISTNAME:C/beta//}
 LIBDIR=                        ${PREFIX}/lib/exchess
 DOCDIR=                        ${PREFIX}/share/doc/exchess
+AUTO_MKDIRS=           yes
 
 CFLAGS+=               -DEXCHESS_DIR=${LIBDIR}
 LDFLAGS+=              ${PTHREAD_LDFLAGS}
 LIBS+=                 ${PTHREAD_LIBS}
 
-post-extract:
-       cd ${WRKSRC} && ${MV} search.par search.par.in
+SUBST_CLASSES+=                dirs
+SUBST_STAGE.dirs=      pre-configure
+SUBST_FILES.dirs=      search.par
+SUBST_SED.dirs=                -e 's,/Users/homand/EXchess/TB,${PREFIX}/share/egtb,'
 
 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" \
-               < ${WRKSRC}/search.par.in > ${WRKSRC}/search.par
-
-INSTALLATION_DIRS+=    bin lib/exchess ${DOCDIR}
-
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/exchess ${DESTDIR}${PREFIX}/bin
        ${INSTALL_DATA} ${WRKSRC}/search.par ${DESTDIR}${PREFIX}/lib/exchess
diff -r 1bee0e6ce2c2 -r 2a35e1487416 games/exchess/distinfo
--- a/games/exchess/distinfo    Sat Mar 21 14:36:22 2020 +0000
+++ b/games/exchess/distinfo    Sat Mar 21 14:41:45 2020 +0000
@@ -1,17 +1,6 @@
-$NetBSD: distinfo,v 1.12 2015/11/03 20:56:48 agc Exp $
+$NetBSD: distinfo,v 1.13 2020/03/21 14:41:45 rillig Exp $
 
-SHA1 (EXchess_v7.31beta.zip) = 09fa6d133172e34c1908df148f56489c47ee8cc2
-RMD160 (EXchess_v7.31beta.zip) = 38a3a6b3a3a53ff62321642954ff4d29ebfe9705
-SHA512 (EXchess_v7.31beta.zip) = 0bac23f748238fc2f8fceeee29112911a7f3f03ce0ce930bf415ab69632bf673b23d466ca0299069daf5636ef91b9ff0d4633632e6f57a352bebbd9344dd60a6
-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
+SHA1 (EXchess_v7.97beta.zip) = 1ea71ba8ce9ecbc52699ee39490f1d275c91dd82
+RMD160 (EXchess_v7.97beta.zip) = 7e317362040321b8dcecae867a6710036846d579
+SHA512 (EXchess_v7.97beta.zip) = 33e909bf2f39996e579c16ba2752f6d8d1c0d3c7e788c95be7fa8bc8b8ef67d3792693b28d3f73e52fb3f45bffbc5c9ccb0cf7a5fb27f70bb154de7e93f7df86
+Size (EXchess_v7.97beta.zip) = 1759660 bytes
diff -r 1bee0e6ce2c2 -r 2a35e1487416 games/exchess/files/patch-move
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/exchess/files/patch-move    Sat Mar 21 14:41:45 2020 +0000
@@ -0,0 +1,399 @@
+$NetBSD: patch-move,v 1.1 2020/03/21 14:41:45 rillig Exp $
+
+Avoid conflict with std::move (joerg, 2013-04-30).
+
+The package builds fine on NetBSD 8 without this patch. Therefore it is
+placed in files/ instead of patches/, until it is needed. Next time when
+a build failure occurs, please mention the exact build environment.
+
+Can be removed after 2021Q1 if not needed.
+
+--- src/book.cpp.orig  2017-02-04 14:23:32.000000000 +0000
++++ src/book.cpp
+@@ -44,7 +44,7 @@ void build_book(position ipos)
+   char instring[100], line[100];     // strings from input files
+   char outbook[100], resp;
+   position temp_pos;                 // temporary position
+-  move bmove;                        // book move under consideration
++  my_move bmove;                     // book move under consideration
+   unsigned __int64 pcode;            // hash code for position
+   int i = -1, j = 0, p,q;            // loop variables
+   int r, s;                    
+@@ -314,7 +314,7 @@ void build_book(position ipos)
+ //--------------------------------------------------------
+ // Function to find a position in the book
+ //--------------------------------------------------------
+-int find_record(position p, move m, int file_size, book_rec *book_record, fstream *book_f, int file_pos)
++int find_record(position p, my_move m, int file_size, book_rec *book_record, fstream *book_f, int file_pos)
+ {
+   int jump = int(file_size/2);
+   unsigned __int64 pcode = ZERO;
+@@ -384,12 +384,12 @@ int find_record(position p, move m, int 
+ // becomes a candidate move.  Information is stored to
+ // facilitate easy learning during the game.
+ //--------------------------------------------------------
+-move opening_book(h_code hash_code, position p, game_rec *gr)
++my_move opening_book(h_code hash_code, position p, game_rec *gr)
+ {
+   int file_size, mflag = 0, j;
+   int candidates = 0, total_score = 0;
+   move_list list;
+-  move nomove; nomove.t = 0;
++  my_move nomove; nomove.t = 0;
+   char book_file[100];          // file name for the book
+   book_rec book_record;         // record of move considered
+   int file_pos = 0;                 // file position of record
+@@ -680,7 +680,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;
+
+--- src/chess.h.orig   2017-02-04 14:23:32.000000000 +0000
++++ src/chess.h
+@@ -31,7 +31,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;
+   int32_t t;           // assuming a 32 bit integer
+ };
+@@ -39,7 +39,7 @@ union move {
+ // Add a score for sorting purposes to the move record
+ 
+ struct move_rec {
+-  move m;
++  my_move m;
+   int score; 
+ };
+ 
+@@ -91,17 +91,17 @@ struct position {
+   unsigned char threat_square;
+   unsigned char threat_check;
+ 
+-  move hmove;                // expected best move
+-  move rmove;                // reply move               
+-  move cmove;                // combination move
+- 
++  my_move hmove;             // expected best move
++  my_move rmove;             // reply move
++  my_move cmove;             // combination move
++
+   int8_t gstage;             // game stage, range 0-16 -- depends only  
+                              //    upon pawn structure --> important for pawn hashing!
+                              // NOTE: **must** be integer so it is subtracted properly
+                              //   -- should check this for all subtractions!  unsigned ints
+                              //      may be converted incorrectly if they are negated.
+   int8_t plist[2][7][10];    // piece lists
+-  move last;                 // last move made
++  my_move last;              // last move made
+   h_code hcode;              // hash code
+   h_code pcode;              // pawn hash code
+ 
+@@ -142,7 +142,7 @@ struct position {
+ 
+   /* moves.cpp */
+   void allmoves(move_list *list, ts_thread_data *tdata);
+-  int verify_move(move_list *list, ts_thread_data *tdata, move tmove);
++  int verify_move(move_list *list, ts_thread_data *tdata, my_move tmove);
+   void add_move(int fsq, int tsq, move_list *list, char type, ts_thread_data *tdata);
+   void pawn_moves(move_list *list, int sqr, ts_thread_data *tdata);
+   void king_moves(move_list *list, int sqr, ts_thread_data *tdata);
+@@ -169,7 +169,7 @@ struct position {
+   void rook_cc(move_list *list, int sqr, int ds);
+ 
+   /* exmove.cpp */
+-  int exec_move(move emove, int ply);
++  int exec_move(my_move emove, int ply);
+ 
+   /* attacks.cpp */
+   int simple_check(int move_sq);
+@@ -198,8 +198,8 @@ struct position {
+ 
+   /* support.cpp */
+   void write_fen(int trailing_cr);
+-  void print_move(move pmove, char mstring[10], ts_thread_data *temps);
+-  move parse_move(char mstring[10], ts_thread_data *temps);
++  void print_move(my_move pmove, char mstring[10], ts_thread_data *temps);
++  my_move parse_move(char mstring[10], ts_thread_data *temps);
+ 
+ };
+ 
+@@ -225,7 +225,7 @@ struct search_node {
+   h_code ckey;       // variables for combination hash move 
+   cmove_rec *cmove;
+ 
+-  move smove;        // current move we are searching
++  my_move smove;     // current move we are searching
+ 
+   int ply;           
+ 
+@@ -290,7 +290,7 @@ struct ts_thread_data {
+   int quit_thread;         // flag to tell thread to quit
+ 
+   search_node n[MAXD+1];   // array of search positions
+-  move pc[MAXD+1][MAXD+1]; // triangular array for search
++  my_move pc[MAXD+1][MAXD+1];   // triangular array for search
+                            //    principle continuation
+   h_code plist[MAX_GAME_PLY];   // hash codes of positions visited
+ 
+@@ -337,7 +337,7 @@ struct ts_thread_data {
+   }
+ 
+   /* search.cpp */
+-  inline void pc_update(move pcmove, int ply);
++  inline void pc_update(my_move pcmove, int ply);
+ 
+ };
+ 
+@@ -389,16 +389,16 @@ struct tree_search {
+   int fail_high;                // flag for failing high
+   int fail_low;                 // flag for failing low 
+ 
+-  move bookm;                   // move from opening book
+-  move ponder_move;             // move we are pondering
+-  move last_displayed_move;     // best move from previous search display
++  my_move bookm;                // move from opening book
++  my_move ponder_move;          // move we are pondering
++  my_move last_displayed_move;  // best move from previous search display
+ 
+   int tsuite, analysis_mode;    // flags to determine whether we are in
+                                 //    analysis mode or a test suite
+ 
+   move_list root_moves;         // movelist for the root position
+ 
+-  move singular_response;       // store a singular response
++  my_move singular_response;    // store a singular response
+ 
+   // threads for SMP
+   int thread_index;                              
+@@ -415,7 +415,7 @@ struct tree_search {
+ 
+   // variables to support testsuite mode 
+   float soltime;
+-  unsigned int bmcount; move bmoves[256];
++  unsigned int bmcount; my_move bmoves[256];
+   int best_score;
+   char bmtype[3];      // "am" avoid move or "bm" best move string                              
+ 
+@@ -432,7 +432,7 @@ struct tree_search {
+   void history_stats();
+ 
+   /* search.cpp */
+-  move search(position p, int time_limit, int T, game_rec *gr);
++  my_move search(position p, int time_limit, int T, game_rec *gr);
+   int search_threads(int alpha, int beta, int depth, int threads);
+   void sort_root_moves();
+ 
+@@ -465,9 +465,9 @@ struct game_rec {
+   position reset;          // reset position for takebacks
+  /* available moves */
+   move_list movelist;      // list of pseudo-legal moves for current pos
+-  move best;               // best move for current position
++  my_move best;            // best move for current position
+  /* game history info */
+-  move game_history[MAX_GAME_PLY];  // list of move played
++  my_move game_history[MAX_GAME_PLY];  // list of move played
+ 
+  /* game control flags and counters */
+   int T;                   // turn number
+
+--- src/exmove.cpp.orig        2017-02-04 14:23:32.000000000 +0000
++++ src/exmove.cpp
+@@ -15,7 +15,7 @@
+ // If the move is legal, the function returns a 1, otherwise 0.
+ // Note that the move is made, regardless - so proper precautions
+ // need to be taken, if the move might need to be undone
+-int position::exec_move(move emove, int ply)
++int position::exec_move(my_move emove, int ply)
+ {
+   move_t mv = emove.b;
+   register int pi;
+



Home | Main Index | Thread Index | Old Index