From 8a4661588af073fe6a3f8e90f66fdd2c11b99153 Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Sun, 12 Aug 2018 22:13:00 +0100 Subject: Fixes for rebase --- pkgs/applications/gis/saga/finite.patch | 13 +++++++++++++ pkgs/applications/gis/saga/lts.nix | 10 +++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 pkgs/applications/gis/saga/finite.patch (limited to 'pkgs/applications/gis') diff --git a/pkgs/applications/gis/saga/finite.patch b/pkgs/applications/gis/saga/finite.patch new file mode 100644 index 000000000000..7f60743534bd --- /dev/null +++ b/pkgs/applications/gis/saga/finite.patch @@ -0,0 +1,13 @@ +diff --git a/saga-gis/src/modules/imagery/imagery_maxent/me.cpp b/saga-gis/src/modules/imagery/imagery_maxent/me.cpp +index c5da854..d3e9cff 100755 +--- a/src/modules/imagery/imagery_maxent/me.cpp ++++ b/src/modules/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 diff --git a/pkgs/applications/gis/saga/lts.nix b/pkgs/applications/gis/saga/lts.nix index ed2fb1a65ada..e69d52701be7 100644 --- a/pkgs/applications/gis/saga/lts.nix +++ b/pkgs/applications/gis/saga/lts.nix @@ -1,6 +1,6 @@ { stdenv, fetchgit, gdal, wxGTK30, proj, libiodbc, lzma, jasper, libharu, opencv, vigra, postgresql, autoreconfHook, Cocoa - , unixODBC , poppler, hdf4, hdf5, netcdf, sqlite }: + , unixODBC , poppler, hdf4, hdf5, netcdf, sqlite, qhull, giflib }: stdenv.mkDerivation rec { name = "saga-2.3.2"; @@ -9,14 +9,18 @@ stdenv.mkDerivation rec { # for why the have additional buildInputs on darwin buildInputs = [ autoreconfHook gdal wxGTK30 proj libharu opencv vigra postgresql libiodbc lzma jasper - unixODBC poppler hdf4.out hdf5 netcdf sqlite ] + unixODBC poppler hdf4.out hdf5 netcdf sqlite qhull giflib ] ++ stdenv.lib.optional stdenv.isDarwin Cocoa ; enableParallelBuilding = true; + GDAL_CFLAGS = "-std=c++11"; + + CXXFLAGS = stdenv.lib.optionalString stdenv.cc.isClang "-std=c++11 -Wno-narrowing"; + sourceRoot = "code-b6f474f/saga-gis"; - patches = [ ./clang_patch.patch ]; + patches = [ ./clang_patch.patch ./finite.patch]; src = fetchgit { url = "https://git.code.sf.net/p/saga-gis/code.git"; -- cgit 1.4.1