diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/gis/saga')
-rw-r--r-- | nixpkgs/pkgs/applications/gis/saga/clang_patch.patch | 19 | ||||
-rw-r--r-- | nixpkgs/pkgs/applications/gis/saga/default.nix | 32 | ||||
-rw-r--r-- | nixpkgs/pkgs/applications/gis/saga/finite.patch | 13 |
3 files changed, 64 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/gis/saga/clang_patch.patch b/nixpkgs/pkgs/applications/gis/saga/clang_patch.patch new file mode 100644 index 000000000000..e6af8d130514 --- /dev/null +++ b/nixpkgs/pkgs/applications/gis/saga/clang_patch.patch @@ -0,0 +1,19 @@ +commit e92b250968e9656084ab5984689747ca615ff6e7 +Author: Volker Wichmann <wichmann@laserdata.at> +Date: Sun Mar 5 13:49:53 2017 +0100 + + saga_api, CSG_Table::Del_Records(): bug fix, check record count correctly + +diff --git a/src/saga_core/saga_api/table.cpp b/src/saga_core/saga_api/table.cpp +index 76a1d8d..fa1a66f 100644 +--- a/src/saga_core/saga_api/table.cpp ++++ b/src/saga_core/saga_api/table.cpp +@@ -901,7 +901,7 @@ bool CSG_Table::Del_Record(int iRecord) + //--------------------------------------------------------- + bool CSG_Table::Del_Records(void) + { +- if( m_Records > 0 ) ++ if( m_nRecords > 0 ) + { + _Index_Destroy(); + diff --git a/nixpkgs/pkgs/applications/gis/saga/default.nix b/nixpkgs/pkgs/applications/gis/saga/default.nix new file mode 100644 index 000000000000..90e7af9944d3 --- /dev/null +++ b/nixpkgs/pkgs/applications/gis/saga/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl, gdal, wxGTK30, proj, libiodbc, lzma, + libharu, opencv, vigra, postgresql, Cocoa, + unixODBC , poppler, hdf4, hdf5, netcdf, sqlite, qhull, giflib }: + +stdenv.mkDerivation { + pname = "saga"; + version = "7.3.0"; + + # See https://groups.google.com/forum/#!topic/nix-devel/h_vSzEJAPXs + # for why the have additional buildInputs on darwin + buildInputs = [ gdal wxGTK30 proj libharu opencv vigra postgresql libiodbc lzma + qhull giflib ] + ++ stdenv.lib.optionals stdenv.isDarwin + [ Cocoa unixODBC poppler hdf4.out hdf5 netcdf sqlite ]; + + enableParallelBuilding = true; + + CXXFLAGS = stdenv.lib.optionalString stdenv.cc.isClang "-std=c++11 -Wno-narrowing"; + + src = fetchurl { + url = "https://sourceforge.net/projects/saga-gis/files/SAGA%20-%207/SAGA%20-%207.3.0/saga-7.3.0.tar.gz"; + sha256 = "1g7v6vx7b8mfhbbg03pdk4kyks20maqbcdbasnxazhs8pl2zih7k"; + }; + + meta = with stdenv.lib; { + description = "System for Automated Geoscientific Analyses"; + homepage = http://www.saga-gis.org; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ michelk mpickering ]; + platforms = with platforms; unix; + }; +} diff --git a/nixpkgs/pkgs/applications/gis/saga/finite.patch b/nixpkgs/pkgs/applications/gis/saga/finite.patch new file mode 100644 index 000000000000..7f60743534bd --- /dev/null +++ b/nixpkgs/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 |