summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/gis
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2019-06-17 06:48:38 +0000
committerVincent Laporte <vbgl@users.noreply.github.com>2019-06-25 07:07:32 +0000
commite478e6bdff2f8de59ecebd5e3377d03d5150e8a0 (patch)
tree598f06fcc48193aa9b0da59692c7fe4c06ef1daa /pkgs/applications/gis
parentde56d6bfe662a00e38967bccd72c58d9d67e0972 (diff)
saga: 6.3.0 -> 7.2.0
Diffstat (limited to 'pkgs/applications/gis')
-rw-r--r--pkgs/applications/gis/saga/default.nix8
-rw-r--r--pkgs/applications/gis/saga/finite-6.3.0.patch55
2 files changed, 3 insertions, 60 deletions
diff --git a/pkgs/applications/gis/saga/default.nix b/pkgs/applications/gis/saga/default.nix
index 4738bfba14a8..34bb8c9f55ad 100644
--- a/pkgs/applications/gis/saga/default.nix
+++ b/pkgs/applications/gis/saga/default.nix
@@ -3,7 +3,7 @@
unixODBC , poppler, hdf4, hdf5, netcdf, sqlite, qhull, giflib }:
stdenv.mkDerivation rec {
- name = "saga-6.3.0";
+ name = "saga-7.2.0";
# See https://groups.google.com/forum/#!topic/nix-devel/h_vSzEJAPXs
# for why the have additional buildInputs on darwin
@@ -14,13 +14,11 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
- patches = [ ./finite-6.3.0.patch];
-
CXXFLAGS = stdenv.lib.optionalString stdenv.cc.isClang "-std=c++11 -Wno-narrowing";
src = fetchurl {
- url = "mirror://sourceforge/project/saga-gis/SAGA%20-%206/SAGA%20-%206.3.0/saga-6.3.0.tar.gz";
- sha256 = "0hyjim8fcp3mna1hig22nnn4ki3j6b7096am2amcs99sdr09jjxv";
+ url = "mirror://sourceforge/project/saga-gis/SAGA%20-%207/SAGA%20-%207.2.0/saga-7.2.0.tar.gz";
+ sha256 = "10gjc5mc5kwg2c2la22hgwx6s5q60z9xxffjpjw0zrlhksijl5an";
};
meta = with stdenv.lib; {
diff --git a/pkgs/applications/gis/saga/finite-6.3.0.patch b/pkgs/applications/gis/saga/finite-6.3.0.patch
deleted file mode 100644
index 91c9543edfda..000000000000
--- a/pkgs/applications/gis/saga/finite-6.3.0.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-diff --git a/src/tools/imagery/imagery_maxent/me.cpp b/src/tools/imagery/imagery_maxent/me.cpp
-index c5da854..d3e9cff 100755
---- a/src/tools/imagery/imagery_maxent/me.cpp
-+++ b/src/tools/imagery/imagery_maxent/me.cpp
-@@ -21,7 +21,7 @@
- #ifdef _SAGA_MSW
- #define isinf(x) (!_finite(x))
- #else
--#define isinf(x) (!finite(x))
-+#define isinf(x) (!isfinite(x))
- #endif
-
- /** The input array contains a set of log probabilities lp1, lp2, lp3
-@@ -47,7 +47,7 @@ double sumLogProb(vector<double>& logprobs)
- /** returns log (e^logprob1 + e^logprob2). */
- double sumLogProb(double logprob1, double logprob2)
- {
-- if (isinf(logprob1) && isinf(logprob2))
-+ if (isinf(logprob1) && isinf(logprob2))
- return logprob1; // both prob1 and prob2 are 0, return log 0.
- if (logprob1>logprob2)
- return logprob1+log(1+exp(logprob2-logprob1));
-@@ -70,8 +70,8 @@ void MaxEntModel::print(ostream& ostrm, MaxEntTrainer& trainer)
- for (FtMap::iterator it = _index.begin(); it!=_index.end(); it++) {
- unsigned long i = it->second;
- for (unsigned long c = 0; c<_classes; c++) {
-- ostrm << "lambda(" << trainer.className(c) << ", "
-- << trainer.getStr(it->first) << ")="
-+ ostrm << "lambda(" << trainer.className(c) << ", "
-+ << trainer.getStr(it->first) << ")="
- << _lambda[i+c] << endl;
- }
- }
-@@ -86,7 +86,7 @@ int MaxEntModel::getProbs(MaxEntEvent& event, vector<double>& probs)
- double s = 0;
- for (unsigned int f = 0; f<event.size(); f++) {
- FtMap::iterator it = _index.find(event[f]);
-- if (it!=_index.end())
-+ if (it!=_index.end())
- s += _lambda[it->second+c];
- }
- probs[c] = s;
-@@ -142,10 +142,10 @@ double MaxEntModel::getObsCounts(EventSet& events, vector<double>& obsCounts)
- double ftSum = 0;
- for (unsigned long j=0; j<e.size(); j++) {
- FtMap::iterator it = _index.find(e[j]);
-- if (it!=_index.end())
-+ if (it!=_index.end())
- obsCounts[it->second+c] += count;
- else { // new feature, need to expand obsCounts and _lambda
-- for (unsigned int k = 0; k<_classes; k++)
-+ for (unsigned int k = 0; k<_classes; k++)
- obsCounts.push_back(0);
- obsCounts[_lambda.size()+c] += count;
- addFeature(e[j]);