summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMichael Kuhn <suraia@ikkoku.de>2018-06-13 15:57:52 +0200
committerAdam J. Stewart <ajstewart426@gmail.com>2018-06-13 08:57:52 -0500
commit04dce191551b6f40866317daa8b1987e8e259d88 (patch)
tree048b909bd4a6e3db92dba6f1518a8af08a54cb3c /var
parent470d4ddd9619e099d25b2357e970d0accb828f4b (diff)
downloadspack-04dce191551b6f40866317daa8b1987e8e259d88.tar.gz
spack-04dce191551b6f40866317daa8b1987e8e259d88.tar.bz2
spack-04dce191551b6f40866317daa8b1987e8e259d88.tar.xz
spack-04dce191551b6f40866317daa8b1987e8e259d88.zip
gplates: new package (#8336)
This also adds an older 1.x version to gdal that is required by gplates.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/gdal/package.py124
-rw-r--r--var/spack/repos/builtin/packages/gplates/package.py77
-rw-r--r--var/spack/repos/builtin/packages/json-c/package.py2
3 files changed, 148 insertions, 55 deletions
diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py
index d303d26f3b..124c472f9e 100644
--- a/var/spack/repos/builtin/packages/gdal/package.py
+++ b/var/spack/repos/builtin/packages/gdal/package.py
@@ -41,9 +41,10 @@ class Gdal(AutotoolsPackage):
list_url = "http://download.osgeo.org/gdal/"
list_depth = 1
- version('2.3.0', '2fe9d64fcd9dc37645940df020d3e200')
- version('2.1.2', 'ae85b78888514c75e813d658cac9478e')
- version('2.0.2', '940208e737c87d31a90eaae43d0efd65')
+ version('2.3.0', '2fe9d64fcd9dc37645940df020d3e200')
+ version('2.1.2', 'ae85b78888514c75e813d658cac9478e')
+ version('2.0.2', '940208e737c87d31a90eaae43d0efd65')
+ version('1.11.5', '5fcee5622430fbeb25556a4d07c06dd7')
variant('libtool', default=True, description='Use libtool to build the library')
variant('libz', default=True, description='Include libz support')
@@ -92,14 +93,15 @@ class Gdal(AutotoolsPackage):
# Required dependencies
depends_on('libtiff@3.6.0:') # 3.9.0+ needed to pass testsuite
depends_on('libgeotiff@1.2.1:')
- depends_on('json-c')
+ depends_on('json-c', when='@2.3:')
+ depends_on('json-c@0.12.1', when='@:2.2.99')
# Optional dependencies
depends_on('libtool', type='build', when='+libtool')
depends_on('zlib', when='+libz')
depends_on('libiconv', when='+libiconv')
depends_on('xz', when='+liblzma')
- depends_on('zstd', when='+zstd')
+ depends_on('zstd', when='+zstd @2.3:')
depends_on('postgresql', when='+pg')
depends_on('cfitsio', when='+cfitsio')
depends_on('libpng', when='+png')
@@ -108,7 +110,7 @@ class Gdal(AutotoolsPackage):
depends_on('fyba', when='+sosi')
depends_on('hdf', when='+hdf4')
depends_on('hdf5', when='+hdf5')
- depends_on('kealib', when='+kea')
+ depends_on('kealib', when='+kea @2:')
depends_on('netcdf', when='+netcdf')
depends_on('jasper@1.900.1', patches=patch('uuid.patch'), when='+jasper')
depends_on('openjpeg', when='+openjpeg')
@@ -120,16 +122,16 @@ class Gdal(AutotoolsPackage):
depends_on('sqlite@3:', when='+sqlite3')
depends_on('pcre', when='+pcre')
depends_on('geos', when='+geos')
- depends_on('qhull', when='+qhull')
+ depends_on('qhull', when='+qhull @2.1:')
depends_on('opencl', when='+opencl')
depends_on('poppler', when='+poppler')
- depends_on('proj', when='+proj')
+ depends_on('proj', when='+proj @2.3:')
depends_on('perl', type=('build', 'run'), when='+perl')
depends_on('python', type=('build', 'run'), when='+python')
depends_on('java', type=('build', 'run'), when='+java')
depends_on('armadillo', when='+armadillo')
- depends_on('cryptopp', when='+cryptopp')
- depends_on('openssl', when='+crypto')
+ depends_on('cryptopp', when='+cryptopp @2.1:')
+ depends_on('openssl', when='+crypto @2.3:')
# https://trac.osgeo.org/gdal/wiki/SWIG
depends_on('swig', type='build', when='+python')
@@ -155,6 +157,45 @@ class Gdal(AutotoolsPackage):
'--with-libjson-c={0}'.format(spec['json-c'].prefix),
]
+ if spec.satisfies('@2.3:'):
+ if '+zstd' in spec:
+ args.append('--with-zstd={0}'.format(spec['zstd'].prefix))
+ else:
+ args.append('--with-zstd=no')
+
+ if '+proj' in spec:
+ args.append('--with-proj={0}'.format(spec['proj'].prefix))
+ if spec.satisfies('^proj@5.0:5.999'):
+ args.append('--with-proj5-api=yes')
+ else:
+ args.append('--with-proj5-api=no')
+ else:
+ args.append('--with-proj=no')
+
+ if '+crypto' in spec:
+ args.append('--with-crypto={0}'.format(spec['openssl'].prefix))
+ else:
+ args.append('--with-crypto=no')
+
+ if spec.satisfies('@2.1:'):
+ if '+qhull' in spec:
+ args.append('--with-qhull=yes')
+ else:
+ args.append('--with-qhull=no')
+
+ if '+cryptopp' in spec:
+ args.append('--with-cryptopp={0}'.format(
+ spec['cryptopp'].prefix))
+ else:
+ args.append('--with-cryptopp=no')
+
+ if spec.satisfies('@2:'):
+ if '+kea' in spec:
+ args.append('--with-kea={0}'.format(
+ join_path(spec['kealib'].prefix.bin, 'kea-config')))
+ else:
+ args.append('--with-kea=no')
+
# Optional dependencies
if '+libtool' in spec:
args.append('--with-libtool=yes')
@@ -177,11 +218,6 @@ class Gdal(AutotoolsPackage):
else:
args.append('--with-liblzma=no')
- if '+zstd' in spec:
- args.append('--with-zstd={0}'.format(spec['zstd'].prefix))
- else:
- args.append('--with-zstd=no')
-
if '+pg' in spec:
args.append('--with-pg={0}'.format(
spec['postgresql'].prefix.bin.pg_config))
@@ -225,12 +261,6 @@ class Gdal(AutotoolsPackage):
else:
args.append('--with-hdf5=no')
- if '+kea' in spec:
- args.append('--with-kea={0}'.format(
- join_path(spec['kealib'].prefix.bin, 'kea-config')))
- else:
- args.append('--with-kea=no')
-
# https://trac.osgeo.org/gdal/wiki/NetCDF
if '+netcdf' in spec:
args.append('--with-netcdf={0}'.format(spec['netcdf'].prefix))
@@ -293,11 +323,6 @@ class Gdal(AutotoolsPackage):
else:
args.append('--with-geos=no')
- if '+qhull' in spec:
- args.append('--with-qhull=yes')
- else:
- args.append('--with-qhull=no')
-
if '+opencl' in spec:
args.append('--with-opencl={0}'.format(spec['opencl'].prefix))
else:
@@ -308,15 +333,6 @@ class Gdal(AutotoolsPackage):
else:
args.append('--with-poppler=no')
- if '+proj' in spec:
- args.append('--with-proj={0}'.format(spec['proj'].prefix))
- if spec.satisfies('^proj@5.0:5.999'):
- args.append('--with-proj5-api=yes')
- else:
- args.append('--with-proj5-api=no')
- else:
- args.append('--with-proj=no')
-
if '+perl' in spec:
args.append('--with-perl=yes')
else:
@@ -339,16 +355,6 @@ class Gdal(AutotoolsPackage):
else:
args.append('--with-armadillo=no')
- if '+cryptopp' in spec:
- args.append('--with-cryptopp={0}'.format(spec['cryptopp'].prefix))
- else:
- args.append('--with-cryptopp=no')
-
- if '+crypto' in spec:
- args.append('--with-crypto={0}'.format(spec['openssl'].prefix))
- else:
- args.append('--with-crypto=no')
-
# TODO: add packages for these dependencies
args.extend([
# https://trac.osgeo.org/gdal/wiki/GRASS
@@ -360,7 +366,6 @@ class Gdal(AutotoolsPackage):
'--with-pcidsk=no',
'--with-ogdi=no',
'--with-fme=no',
- '--with-mongocxx=no',
# https://trac.osgeo.org/gdal/wiki/FileGDB
'--with-fgdb=no',
# https://trac.osgeo.org/gdal/wiki/ECW
@@ -371,14 +376,12 @@ class Gdal(AutotoolsPackage):
'--with-mrsid=no',
'--with-jp2mrsid=no',
'--with-mrsid_lidar=no',
- '--with-jp2lura=no',
# https://trac.osgeo.org/gdal/wiki/MSG
'--with-msg=no',
'--with-bsb=no',
# https://trac.osgeo.org/gdal/wiki/Oracle
'--with-oci=no',
'--with-grib=no',
- '--with-gnm=no',
'--with-mysql=no',
# https://trac.osgeo.org/gdal/wiki/Ingres
'--with-ingres=no',
@@ -386,27 +389,40 @@ class Gdal(AutotoolsPackage):
'--with-libkml=no',
'--with-dods-root=no',
'--with-spatialite=no',
- '--with-rasterlite2=no',
- # https://trac.osgeo.org/gdal/wiki/DxfDwg
- '--with-teigha=no',
'--with-idb=no',
# https://trac.osgeo.org/gdal/wiki/ArcSDE
'--with-sde=no',
# https://trac.osgeo.org/gdal/wiki/Epsilon
'--with-epsilon=no',
'--with-webp=no',
- '--with-sfcgal=no',
'--with-freexl=no',
'--with-pam=no',
'--with-podofo=no',
- '--with-pdfium=no',
'--with-php=no',
# https://trac.osgeo.org/gdal/wiki/mdbtools
'--with-mdb=no',
'--with-rasdaman=no',
- '--with-mrf=no',
])
+ # TODO: add packages for these dependencies (only for 2.3 and newer)
+ if spec.satisfies('@2.3:'):
+ args.extend([
+ '--with-jp2lura=no',
+ '--with-rasterlite2=no',
+ # https://trac.osgeo.org/gdal/wiki/DxfDwg
+ '--with-teigha=no',
+ '--with-sfcgal=no',
+ '--with-mrf=no',
+ ])
+
+ # TODO: add packages for these dependencies (only for 2.1 and newer)
+ if spec.satisfies('@2.1:'):
+ args.extend([
+ '--with-mongocxx=no',
+ '--with-gnm=no',
+ '--with-pdfium=no',
+ ])
+
return args
@run_after('install')
diff --git a/var/spack/repos/builtin/packages/gplates/package.py b/var/spack/repos/builtin/packages/gplates/package.py
new file mode 100644
index 0000000000..a0a1036153
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gplates/package.py
@@ -0,0 +1,77 @@
+##############################################################################
+# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/spack/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Gplates(CMakePackage):
+ """GPlates is desktop software for the interactive visualisation of
+ plate-tectonics. GPlates offers a novel combination of interactive
+ plate-tectonic reconstructions, geographic information system (GIS)
+ functionality and raster data visualisation. GPlates enables both the
+ visualisation and the manipulation of plate-tectonic reconstructions
+ and associated data through geological time."""
+
+ homepage = 'https://www.gplates.org'
+ url = 'https://sourceforge.net/projects/gplates/files/gplates/2.0/gplates-2.0.0-unixsrc.tar.bz2/download'
+
+ version('2.0.0', '9e95874b35a01f4c9bff5845a1621ad5')
+
+ depends_on('cmake@2.6.2:', type='build')
+ # Qt 5 does not support (at least) the Q_WS_* constants.
+ depends_on('qt+opengl@4.4.0:4.99')
+ depends_on('qwt@6.0.1:')
+ depends_on('mesa-glu')
+ depends_on('glew')
+ # GDAL's OGRSFDriverRegistrar is not compatible anymore starting with 2.0.
+ depends_on('gdal@1.3.2:1.99')
+ depends_on('cgal@3.5:')
+ depends_on('proj@4.6.0:')
+ # Boost's Python library has a different name starting with 1.67.
+ # There were changes to Boost's optional in 1.61 that make the build fail.
+ depends_on('boost+python@1.34:1.60')
+ depends_on('python@2:2.99')
+
+ # Officially, GPlates only supports GCC 4. Moreover, it requires
+ # QtXmlPatterns, which Qt 4 only builds with GCC 4.
+ conflicts('%gcc@5:')
+
+ # When built in parallel, headers are not generated before they are used
+ # (specifically, ViewportWindowUi.h).
+ parallel = False
+
+ def url_for_version(self, version):
+ url = 'https://sourceforge.net/projects/gplates/files/gplates/{0}/gplates-{1}-unixsrc.tar.bz2/download'
+ return url.format(version.up_to(2), version)
+
+ def patch(self):
+ # GPlates overrides FindPythonLibs and finds the static library, which
+ # can not be used easily. Fall back to CMake's version, which finds
+ # the shared library instead.
+ force_remove('cmake/modules/FindPythonLibs.cmake')
+
+ # GPlates only installs its binary for the Release configuration.
+ filter_file('CONFIGURATIONS release',
+ 'CONFIGURATIONS Debug Release RelWithDebInfo MinSizeRel',
+ 'src/CMakeLists.txt')
diff --git a/var/spack/repos/builtin/packages/json-c/package.py b/var/spack/repos/builtin/packages/json-c/package.py
index 0579e1fe9a..ad9b6b6f19 100644
--- a/var/spack/repos/builtin/packages/json-c/package.py
+++ b/var/spack/repos/builtin/packages/json-c/package.py
@@ -38,7 +38,7 @@ class JsonC(AutotoolsPackage):
parallel = False
- @when('@0.12.1 %gcc@7')
+ @when('@0.12.1 %gcc@7:')
def patch(self):
filter_file('-Wextra',
'-Wextra -Wno-error=implicit-fallthrough',