summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorwiedi <wiedi@pkgsrc.org>2014-02-09 16:50:45 +0000
committerwiedi <wiedi@pkgsrc.org>2014-02-09 16:50:45 +0000
commit9c3029338f78ae6496c3c976f1aed9f1b8c44eb9 (patch)
tree3e6b2af9bed00e66d826daf70b7d97eb6f054be8 /games
parent315eef6cf98afd7beddd5b5312aa20992ceda89f (diff)
downloadpkgsrc-9c3029338f78ae6496c3c976f1aed9f1b8c44eb9.tar.gz
Fix build on SunOS (u_int64_t usage and ambigous math)
Diffstat (limited to 'games')
-rw-r--r--games/exchess/Makefile4
-rw-r--r--games/exchess/distinfo4
-rw-r--r--games/exchess/patches/patch-ad58
3 files changed, 61 insertions, 5 deletions
diff --git a/games/exchess/Makefile b/games/exchess/Makefile
index dd72ffc9fc6..04dc184b816 100644
--- a/games/exchess/Makefile
+++ b/games/exchess/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2012/10/06 11:54:36 asau Exp $
+# $NetBSD: Makefile,v 1.16 2014/02/09 16:50:45 wiedi Exp $
DISTNAME= EXCH314S
# 5.01beta available
@@ -19,6 +19,8 @@ WRKSRC= ${WRKDIR}
LIBDIR= ${PREFIX}/lib/exchess
DOCDIR= ${PREFIX}/share/doc/exchess
+CFLAGS.SunOS+= -Du_int64_t=uint64_t
+
post-extract:
cd ${WRKSRC} && ${MV} search.par search.par.in
${CP} ${FILESDIR}/Makefile ${WRKSRC}
diff --git a/games/exchess/distinfo b/games/exchess/distinfo
index 1692af04e85..d726607853c 100644
--- a/games/exchess/distinfo
+++ b/games/exchess/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.9 2013/04/30 22:20:58 joerg Exp $
+$NetBSD: distinfo,v 1.10 2014/02/09 16:50:45 wiedi Exp $
SHA1 (EXCH314S.zip) = 7d8ffbd94dc86a97512826e611048a691c8c646d
RMD160 (EXCH314S.zip) = 0503200c210aaf7ddc69e1372392e8ea690505ea
@@ -6,7 +6,7 @@ Size (EXCH314S.zip) = 110676 bytes
SHA1 (patch-aa) = 6aa16f2ca4ecc52b77739b5d28ab650f8102e54c
SHA1 (patch-ab) = a38d6455675083e9ca291c844c85746a0ed897e5
SHA1 (patch-ac) = cfc1beff8ae3b2e4c9620e8d49852ce80d848ad6
-SHA1 (patch-ad) = 6deeaae3dbaf84f7763306d06117e21aa3dcf885
+SHA1 (patch-ad) = f2d2de59f56a0a24e6408ace9ba15139f986de95
SHA1 (patch-ae) = 9d374b888a6f431604f41c4421baa23d8ca775a1
SHA1 (patch-af) = f2379b8929775ff660f9af9fc96969eab1b25870
SHA1 (patch-ag) = 7072e6b7ac08fcb901630c2705fe38065bc89bab
diff --git a/games/exchess/patches/patch-ad b/games/exchess/patches/patch-ad
index 54c25e2977c..446ff3a1baf 100644
--- a/games/exchess/patches/patch-ad
+++ b/games/exchess/patches/patch-ad
@@ -1,4 +1,4 @@
-$NetBSD: patch-ad,v 1.5 2013/04/30 22:20:58 joerg Exp $
+$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
@@ -29,7 +29,7 @@ $NetBSD: patch-ad,v 1.5 2013/04/30 22:20:58 joerg Exp $
#else
#include <windows.h>
#include <time.h>
-@@ -42,21 +45,21 @@ int omttc = 0, mttc = 0, inc = 0; float
+@@ -42,21 +45,21 @@ int omttc = 0, mttc = 0, inc = 0; float
int display_board = 0;
int analysis_mode = 0;
extern int fail; // flag for fail high/fail low from search
@@ -96,6 +96,51 @@ $NetBSD: patch-ad,v 1.5 2013/04/30 22:20:58 joerg Exp $
{
// find a hint move, check book first then look in pv
+@@ -204,14 +198,14 @@ int main(int argc, char *argv[])
+ if(!game_pos.wtm) // if it is black's turn
+ {
+ if(both) p_side = 0;
+- if(!xboard) cout << "Black-To-Move[" << ceil(T/2) << "]: ";
+- if(logging) logfile << "Black-To-Move[" << ceil(T/2) << "]: ";
++ if(!xboard) cout << "Black-To-Move[" << ceil((double)(T/2)) << "]: ";
++ if(logging) logfile << "Black-To-Move[" << ceil((double)(T/2)) << "]: ";
+ }
+ else // or if it is white's
+ {
+ if(both) p_side = 1;
+- if(!xboard) cout << "White-To-Move[" << (ceil(T/2) + 1) << "]: ";
+- if(logging) logfile << "White-To-Move[" << (ceil(T/2) + 1) << "]: ";
++ if(!xboard) cout << "White-To-Move[" << (ceil((double)(T/2)) + 1) << "]: ";
++ if(logging) logfile << "White-To-Move[" << (ceil((double)(T/2)) + 1) << "]: ";
+ }
+
+ cout.flush();
+@@ -322,12 +316,12 @@ void make_move()
+ if(p_side != game_pos.wtm)
+ {
+ if(game_pos.wtm) {
+- cout << (ceil(T/2) + 1) << ". ";
++ cout << (ceil((double)(T/2)) + 1) << ". ";
+ if(xboard) cout << "... ";
+- if(logging) logfile << (ceil(T/2) + 1) << ". ";
++ if(logging) logfile << (ceil((double)(T/2)) + 1) << ". ";
+ } else {
+- cout << ceil(T/2) << ". ... ";
+- if(logging) logfile << ceil(T/2) << ". ... ";
++ cout << ceil((double)(T/2)) << ". ... ";
++ if(logging) logfile << ceil((double)(T/2)) << ". ... ";
+ }
+ print_move(game_pos, best, mstring);
+ cout << mstring << "\n";
+@@ -558,7 +552,7 @@ void drawboard()
+ print_move(last_pos, game_pos.last, mstring);
+ cout << mstring;
+ }
+- if(j==3) cout << " fifty: " << ceil(game_pos.fifty/2);
++ if(j==3) cout << " fifty: " << ceil((double)(game_pos.fifty/2));
+ if(j==2) cout << " Computer time: " << int(timeleft/100) << " seconds";
+ }
+ cout << "\n +---+---+---+---+---+---+---+---+";
@@ -745,7 +739,7 @@ void parse_command()
else if(!strcmp(response, "nopost")) { post = 0; }
else if(!strcmp(response, "probe")) { cout << probe_tb(&game_pos,0) << "\n"; }
@@ -114,3 +159,12 @@ $NetBSD: patch-ad,v 1.5 2013/04/30 22:20:58 joerg Exp $
int best_depth, best_score;
extern int stage;
unsigned long nodes, nodes1, test_time, test_time1;
+@@ -1063,7 +1057,7 @@ void save_game()
+ for(int i = 1; i < TURN; i++)
+ {
+ print_move(game_pos, game_history[i-1], mstring);
+- if (game_pos.wtm) outfile << (ceil(i/2) + 1) << ". " << mstring;
++ if (game_pos.wtm) outfile << (ceil((double)(i/2)) + 1) << ". " << mstring;
+ else outfile << mstring;
+ outfile << " ";
+ if(!(T%8)) outfile << "\n";