git.iko.soy/typeable/nixpkgs
on master help sign in
saga: 7.6.3 -> 7.7.0

Other changes include: - Reformat inputs and arguments to drv. - Use autoreconfHook as upstream's generated ./configure has proved to be not reliable (it didn't detect properly missing deps). - Add many more dependencies that were detected now with autoreconfHook. - Upgrade gui dep to wxGTK31-gtk3. - Upgrade opencv dep to opencv4.

commitadaf0065a0148d773df80fc2d4975f9ab6b9c133 authorDoron Behar <doron.behar@gmail.com> dateMon 3 Aug 2020, 22:23 (6 years ago) parent308600c
2 files changed+91−14
pkgs/applications/gis/saga/default.nix+77−14 pkgs/applications/gis/saga/opencv4.patch+14
pkgs/applications/gis/saga/default.nix+77−14
@@ -1,27 +1,90 @@
1−{ stdenv, fetchurl, gdal, wxGTK30, proj, libiodbc, lzma,
2− libharu, opencv2, vigra, postgresql, Cocoa,
3− unixODBC , poppler, hdf4, hdf5, netcdf, sqlite, qhull, giflib }:
1+{ stdenv
2+, fetchurl
3+# native
4+, autoreconfHook
5+, pkg-config
6+# not native
7+, gdal
8+, wxGTK31-gtk3
9+, proj_5
10+, dxflib
11+, curl
12+, libiodbc
13+, lzma
14+, libharu
15+, opencv
16+, vigra
17+, postgresql
18+, Cocoa
19+, unixODBC
20+, poppler
21+, hdf4
22+, hdf5
23+, netcdf
24+, sqlite
25+, qhull
26+, giflib
27+, libsvm
28+, fftw
29+}:
430
5−stdenv.mkDerivation {
31+stdenv.mkDerivation rec {
632 pname = "saga";
7− version = "7.6.3";
33+ version = "7.7.0";
834
35+ src = fetchurl {
36+ url = "https://sourceforge.net/projects/saga-gis/files/SAGA%20-%20${stdenv.lib.versions.major version}/SAGA%20-%20${version}/saga-${version}.tar.gz";
37+ sha256 = "1nmvrlcpcm2pas9pnav13iydnym9d8yqqnwq47lm0j6b0a2wy9zk";
38+ };
39+
40+ nativeBuildInputs = [
41+ # Upstream's gnerated ./configure is not reliable
42+ autoreconfHook
43+ pkg-config
44+ ];
45+ configureFlags = [
46+ "--with-system-svm"
47+ # hdf is no detected otherwise
48+ "HDF5_LIBS=-l${hdf5}/lib"
49+ "HDF5_CFLAGS=-I${hdf5.dev}/include"
50+ ];
51+ buildInputs = [
52+ curl
53+ dxflib
54+ fftw
55+ libsvm
56+ hdf5
57+ gdal
58+ wxGTK31-gtk3
59+ proj_5
60+ libharu
61+ opencv
62+ vigra
63+ postgresql
64+ libiodbc
65+ lzma
66+ qhull
67+ giflib
68+ ]
969 # See https://groups.google.com/forum/#!topic/nix-devel/h_vSzEJAPXs
1070 # for why the have additional buildInputs on darwin
11− buildInputs = [ gdal wxGTK30 proj libharu opencv2 vigra postgresql libiodbc lzma
12− qhull giflib ]
13− ++ stdenv.lib.optionals stdenv.isDarwin
14− [ Cocoa unixODBC poppler hdf4.out hdf5 netcdf sqlite ];
71+ ++ stdenv.lib.optionals stdenv.isDarwin [
72+ Cocoa
73+ unixODBC
74+ poppler
75+ netcdf
76+ sqlite
77+ ];
78+
79+ patches = [
80+ # See https://sourceforge.net/p/saga-gis/bugs/280/
81+ ./opencv4.patch
82+ ];
1583
1684 enableParallelBuilding = true;
1785
1886 CXXFLAGS = stdenv.lib.optionalString stdenv.cc.isClang "-std=c++11 -Wno-narrowing";
1987
20− src = fetchurl {
21− url = "https://sourceforge.net/projects/saga-gis/files/SAGA%20-%207/SAGA%20-%207.6.3/saga-7.6.3.tar.gz";
22− sha256 = "0f1qy2y929gd9y7h45bkv9x71xapbzyn06v6wqivjaiydsi1qycb";
23− };
24−
2588 meta = with stdenv.lib; {
2689 description = "System for Automated Geoscientific Analyses";
2790 homepage = "http://www.saga-gis.org";
pkgs/applications/gis/saga/opencv4.patchnew file+14
@@ -0,0 +1,14 @@
1+--- a/src/tools/imagery/imagery_opencv/Makefile.am
2++++ b/src/tools/imagery/imagery_opencv/Makefile.am
3+@@ -7,9 +7,9 @@
4+
5+ if HAVE_CV
6+ DEF_SAGA = -D_SAGA_LINUX -D_TYPEDEF_BYTE -D_TYPEDEF_WORD
7+-CXX_INCS = -I$(top_srcdir)/src/saga_core -I/usr/include/opencv
8++CXX_INCS = -I$(top_srcdir)/src/saga_core `pkg-config opencv4 --cflags`
9+ AM_CXXFLAGS = -fPIC $(CXX_INCS) $(DEF_SAGA) $(DBGFLAGS) $(GOMPFLAGS)
10+-AM_LDFLAGS = -fPIC -shared -avoid-version `pkg-config opencv --libs`
11++AM_LDFLAGS = -fPIC -shared -avoid-version `pkg-config opencv4 --libs`
12+ pkglib_LTLIBRARIES = libimagery_opencv.la
13+ libimagery_opencv_la_SOURCES =\
14+ MLB_Interface.cpp\