summaryrefslogtreecommitdiff
path: root/games/six
diff options
context:
space:
mode:
authorrillig <rillig>2007-09-27 23:09:38 +0000
committerrillig <rillig>2007-09-27 23:09:38 +0000
commitb9c0c457b550adc13d9b4feb605e5d483ffb7a83 (patch)
tree3ddb496afcc9800c8262481fadca6fc8fb30a698 /games/six
parent111af92f7cf44ec1e617c8c7f6ef72f0c1699130 (diff)
downloadpkgsrc-b9c0c457b550adc13d9b4feb605e5d483ffb7a83.tar.gz
Fixed build error on NetBSD 4.99.30. The isnan issue had been only on
NetBSD 3.0, I guess.
Diffstat (limited to 'games/six')
-rw-r--r--games/six/distinfo4
-rw-r--r--games/six/patches/patch-lssolvecpp34
2 files changed, 22 insertions, 16 deletions
diff --git a/games/six/distinfo b/games/six/distinfo
index 2498cb53ae7..f8c22a42d60 100644
--- a/games/six/distinfo
+++ b/games/six/distinfo
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.2 2007/06/13 00:10:43 rillig Exp $
+$NetBSD: distinfo,v 1.3 2007/09/27 23:09:38 rillig Exp $
SHA1 (six-0.5.3.tar.gz) = 4e6281ea0bd420e941909206df381a283e77d149
RMD160 (six-0.5.3.tar.gz) = 3894ebdabe368a918efd4359ba9e2ed7e0d32279
Size (six-0.5.3.tar.gz) = 883013 bytes
SHA1 (patch-batchh) = 2b46c2f8df4cdb046464bf0faf25f735df43b411
-SHA1 (patch-lssolvecpp) = 17038bc249c54f7436eef3dd3b61ee2a6eecc859
+SHA1 (patch-lssolvecpp) = 7d4e6a82104fc55294ec4538c194c9af7f5a45ce
diff --git a/games/six/patches/patch-lssolvecpp b/games/six/patches/patch-lssolvecpp
index d88259c1162..2baa7588efc 100644
--- a/games/six/patches/patch-lssolvecpp
+++ b/games/six/patches/patch-lssolvecpp
@@ -1,29 +1,35 @@
-$NetBSD: patch-lssolvecpp,v 1.1 2007/06/13 00:10:44 rillig Exp $
+$NetBSD: patch-lssolvecpp,v 1.2 2007/09/27 23:09:38 rillig Exp $
--- six/lssolve.cpp.orig 2004-07-19 10:30:50.000000000 +0200
-+++ six/lssolve.cpp 2007-06-13 02:06:20.000000000 +0200
-@@ -120,7 +120,11 @@ static void backwardSubstitution(const M
- double temp;
++++ six/lssolve.cpp 2007-09-28 00:57:32.000000000 +0200
+@@ -22,6 +22,12 @@
+ #include <cassert>
+ #include <cmath>
- x(n - 1) = b(n - 1) / U(n - 1, n - 1);
-+#if defined(__NetBSD__)
-+ if(isnan(x(n - 1)))
++#if defined(__NetBSD__) && defined(__GNUC__) && __GNUC__ == 3
++# define is_nan isnan
+#else
- if(std::isnan(x(n - 1)))
++# define is_nan std::isnan
+#endif
++
+ static void lu(const Mat<double> &X, Mat<double> &L, Mat<double> &U,
+ Vec<int> &p)
+ {
+@@ -120,7 +126,7 @@
+ double temp;
+
+ x(n - 1) = b(n - 1) / U(n - 1, n - 1);
+- if(std::isnan(x(n - 1)))
++ if(is_nan(x(n - 1)))
x(n - 1) = 0.;
for(i = n - 2; i >= 0; i--) {
// Should be: x(i)=((b(i)-U(i,i,i+1,n-1)*x(i+1,n-1))/U(i,i))(0);
-@@ -131,7 +135,11 @@ static void backwardSubstitution(const M
+@@ -131,7 +137,7 @@
temp += U.data()[iPos + j] * x(j);
}
x(i) = (b(i) - temp) / U.data()[iPos + i];
- if(std::isnan(x(i)))
-+#if defined(__NetBSD__)
-+ if(isnan(x(i)))
-+#else
-+ if(std::isnan(x(i)))
-+#endif
++ if(is_nan(x(i)))
x(i) = 0.;
}
}