summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorhasso <hasso>2009-08-01 05:29:59 +0000
committerhasso <hasso>2009-08-01 05:29:59 +0000
commitdeed5afe9a65a769fa71982fda63b148c9f58cf7 (patch)
tree797ba189adf4dc46c6c7d00707a9844a2129ab8a /games
parent3a22bb3c17ae0820e2e707c28deb95157ad92e49 (diff)
downloadpkgsrc-deed5afe9a65a769fa71982fda63b148c9f58cf7.tar.gz
Make it build on recent DragonFly.
Diffstat (limited to 'games')
-rw-r--r--games/knightcap/distinfo4
-rw-r--r--games/knightcap/patches/patch-ad32
2 files changed, 28 insertions, 8 deletions
diff --git a/games/knightcap/distinfo b/games/knightcap/distinfo
index a414b473c70..165e6eb408a 100644
--- a/games/knightcap/distinfo
+++ b/games/knightcap/distinfo
@@ -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 @@ Size (KnightCap-3.6.tar.gz) = 157943 bytes
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 --git a/games/knightcap/patches/patch-ad b/games/knightcap/patches/patch-ad
index 309aa2d0d52..8ad85c006a9 100644
--- a/games/knightcap/patches/patch-ad
+++ b/games/knightcap/patches/patch-ad
@@ -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 @@ $NetBSD: patch-ad,v 1.1.1.1 2000/10/15 08:38:23 jlam Exp $
#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 @@ $NetBSD: patch-ad,v 1.1.1.1 2000/10/15 08:38:23 jlam Exp $
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);
}