summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorJannek Squar <squar@informatik.uni-hamburg.de>2019-11-04 00:26:53 +0100
committerAdam J. Stewart <ajstewart426@gmail.com>2019-11-03 17:26:53 -0600
commited037d0c5dfbeaba0cac0d62a2bb1d05fb0656b4 (patch)
treec4d3b32592a15dc9150b34e2fbf78ada83cafee9 /var
parented898255572a7b00bc2378f33f28ea519d7fd05c (diff)
downloadspack-ed037d0c5dfbeaba0cac0d62a2bb1d05fb0656b4.tar.gz
spack-ed037d0c5dfbeaba0cac0d62a2bb1d05fb0656b4.tar.bz2
spack-ed037d0c5dfbeaba0cac0d62a2bb1d05fb0656b4.tar.xz
spack-ed037d0c5dfbeaba0cac0d62a2bb1d05fb0656b4.zip
Update package saga gis (#13520)
* Improvements of saga-gis package * Added explicit version ranges for old saga-gis version * Update var/spack/repos/builtin/packages/saga-gis/package.py Creative usage of redefinition of getter method Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/saga-gis/package.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/saga-gis/package.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/saga-gis/package.py48
1 files changed, 38 insertions, 10 deletions
diff --git a/var/spack/repos/builtin/packages/saga-gis/package.py b/var/spack/repos/builtin/packages/saga-gis/package.py
index 04ba7f6b92..0661569ce0 100644
--- a/var/spack/repos/builtin/packages/saga-gis/package.py
+++ b/var/spack/repos/builtin/packages/saga-gis/package.py
@@ -17,6 +17,7 @@ class SagaGis(AutotoolsPackage):
git = "git://git.code.sf.net/p/saga-gis/code"
version('develop', branch='master')
+ version('7.4.0', branch='release-7.4.0')
version('7.3.0', branch='release-7.3.0')
version('7.1.1', branch='release-7.1.1')
version('7.1.0', branch='release-7.1.0')
@@ -38,31 +39,52 @@ class SagaGis(AutotoolsPackage):
variant('gui', default=True, description='Build GUI and interactive SAGA tools')
variant('odbc', default=True, description='Build with ODBC support')
+
# FIXME Saga-gis configure file disables triangle even if
# --enable-triangle flag is used
# variant('triangle', default=True, description='Build with triangle.c
+
# non free for commercial use otherwise use qhull')
- variant('libfire', default=True, description='Build with libfire (non free for commercial usage)')
- variant('openmp', default=True, description='Build with OpenMP enabled')
- variant('python', default=False, description='Build Python extension')
+ variant('libfire', default=True, description='Build with libfire (non free for commercial usage)')
+ variant('openmp', default=True, description='Build with OpenMP enabled')
+ variant('python', default=False, description='Build Python extension')
+
+ variant('postgresql', default=False, description='Build with PostgreSQL library')
+ variant('opencv', default=False, description='Build with libraries using OpenCV')
depends_on('autoconf', type='build')
depends_on('automake', type='build')
depends_on('libtool', type='build')
depends_on('m4', type='build')
- # FIXME unnecessary dependency on python3 because of implicit python3
- # dependency through meson by a dependency of wx/gtkplus
- depends_on('python@3:')
-
+ depends_on('libharu')
depends_on('wxwidgets')
- depends_on('gdal')
- depends_on('proj@:5')
-
+ depends_on('postgresql', when='+postgresql')
depends_on('unixodbc', when='+odbc')
+
+ # SAGA-GIS requires projects.h from proj
+ depends_on('proj')
+ # https://sourceforge.net/p/saga-gis/bugs/271/
+ depends_on('proj@:5', when='@:7.2.999')
+
+ # Saga-Gis depends on legacy opencv API removed in opencv 4.x
+ depends_on('opencv@:3', when='+opencv')
+ # Set jpeg provider (similar to #8133)
+ depends_on('libjpeg', when='+opencv')
+ # Set hl variant due to similar issue #7145
+ depends_on('hdf5+hl')
+
+ # write support for grib2 is available since 2.3.0 (https://gdal.org/drivers/raster/grib.html)
+ depends_on('gdal@2.3:+grib+hdf5+netcdf')
+
+ depends_on('gdal@2.3:2.4+grib+hdf5+netcdf', when='@:7.2.999')
+ depends_on('libgeotiff@:1.4', when='@:7.2.999')
+
# FIXME Saga-Gis uses a wrong include path
# depends_on('qhull', when='~triangle')
+
depends_on('swig', type='build', when='+python')
+ extends('python', when='+python')
configure_directory = "saga-gis"
@@ -79,5 +101,11 @@ class SagaGis(AutotoolsPackage):
args += self.enable_or_disable('libfire')
args += self.enable_or_disable('openmp')
args += self.enable_or_disable('python')
+ args += self.with_or_without('postgresql')
return args
+
+ def setup_run_environment(self, env):
+ # Point saga to its tool set, will be loaded during runtime
+ env.set("SAGA_MLB", self.prefix.lib.saga)
+ env.set("SAGA_TLB", self.prefix.lib.saga)