pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/games/knightcap Make it build on recent DragonFly.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/dd3738c62f96
branches:  trunk
changeset: 396702:dd3738c62f96
user:      hasso <hasso%pkgsrc.org@localhost>
date:      Sat Aug 01 05:29:59 2009 +0000

description:
Make it build on recent DragonFly.

diffstat:

 games/knightcap/distinfo         |   4 ++--
 games/knightcap/patches/patch-ad |  32 ++++++++++++++++++++++++++------
 2 files changed, 28 insertions(+), 8 deletions(-)

diffs (72 lines):

diff -r da8d60b08eed -r dd3738c62f96 games/knightcap/distinfo
--- a/games/knightcap/distinfo  Sat Aug 01 05:26:24 2009 +0000
+++ b/games/knightcap/distinfo  Sat Aug 01 05:29:59 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2005/02/23 23:11:59 agc Exp $
+$NetBSD: distinfo,v 1.4 2009/08/01 05:29:59 hasso Exp $
 
 SHA1 (KnightCap-3.6.tar.gz) = 923dc3e6b19f3b4b8c2d6236eb438388e68b878a
 RMD160 (KnightCap-3.6.tar.gz) = 83765c75bee566b552428d924815001c0be694b8
@@ -6,7 +6,7 @@
 SHA1 (patch-aa) = 8be5487db04419c82e8fcb9569145303ab783ef2
 SHA1 (patch-ab) = ad31712d14e820521f38432eaa75be5a47a23693
 SHA1 (patch-ac) = de3ce657b4d45aabde42faebe1e32dd95c190795
-SHA1 (patch-ad) = b029ebca0c636d7e1b4a9b0a0079723a6e47d2ad
+SHA1 (patch-ad) = 0b3cdf84647d43cd96f816116523df75715f8c5b
 SHA1 (patch-ae) = 40882eb1368e90283a0bd79d1dd0d3f354fdb2ff
 SHA1 (patch-af) = cb051c8780f6cd81924747e8c140c4a32193f330
 SHA1 (patch-ag) = 54358f858d37569eb13fb6c8fa76b38586051636
diff -r da8d60b08eed -r dd3738c62f96 games/knightcap/patches/patch-ad
--- a/games/knightcap/patches/patch-ad  Sat Aug 01 05:26:24 2009 +0000
+++ b/games/knightcap/patches/patch-ad  Sat Aug 01 05:29:59 2009 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ad,v 1.1.1.1 2000/10/15 08:38:23 jlam Exp $
+$NetBSD: patch-ad,v 1.2 2009/08/01 05:29:59 hasso Exp $
 
---- knightcap.h.orig   Sun May 17 19:09:21 1998
-+++ knightcap.h
-@@ -92,7 +92,22 @@
+--- knightcap.h.orig   1998-05-18 02:09:21 +0300
++++ knightcap.h        2009-08-01 07:33:40 +0300
+@@ -92,7 +92,22 @@ typedef short etype;
  #define USE_PBRAIN 1
  #endif
  
@@ -26,7 +26,7 @@
  
  #ifndef RESIGN_VALUE
  #define RESIGN_VALUE (ROOK_VALUE)
-@@ -296,10 +311,19 @@
+@@ -296,10 +311,19 @@ typedef short etype;
  
  #define INITIAL_MATERIAL (KING_VALUE + QUEEN_VALUE + 2*ROOK_VALUE + 2*BISHOP_VALUE + 2*KNIGHT_VALUE + 8*PAWN_VALUE)
  
@@ -46,7 +46,27 @@
  
  typedef enum {B_KING = -6,B_QUEEN = -5,B_ROOK = -4,B_BISHOP = -3,
              B_KNIGHT = -2,B_PAWN = -1,
-@@ -884,4 +908,8 @@
+@@ -632,6 +656,11 @@ static inline int imax(int i1, int i2)
+       return i1 > i2? i1 : i2;
+ }
+ 
++#if defined(__DragonFly__)
++#include <sys/param.h>
++#endif
++
++#if !(defined(__DragonFly__) && __DragonFly_version >= 200204)
+ static inline float fmin(float i1, float i2)
+ {
+       return i1 > i2? i2 : i1;
+@@ -641,6 +670,7 @@ static inline float fmax(float i1, float
+ {
+       return i1 > i2? i1 : i2;
+ }
++#endif
+ 
+ static inline etype emin(etype i1, etype i2)
+ {
+@@ -884,4 +914,8 @@ static inline int pop_count32(uint32 x)
        return pop_count16((x) & 0xFFFF) + pop_count16((x) >> 16);
  }
  



Home | Main Index | Thread Index | Old Index