GMT: add 6.0.0 (#15785)
This commit is contained in:
parent
25a65638ff
commit
8748160984
@ -14,34 +14,49 @@ class Gmt(Package):
|
|||||||
contour maps to artificially illuminated surfaces and 3D perspective views.
|
contour maps to artificially illuminated surfaces and 3D perspective views.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
homepage = "http://gmt.soest.hawaii.edu/"
|
homepage = "https://www.generic-mapping-tools.org/"
|
||||||
url = "https://github.com/GenericMappingTools/gmt/archive/5.4.4.tar.gz"
|
url = "https://github.com/GenericMappingTools/gmt/archive/6.0.0.tar.gz"
|
||||||
|
git = "https://github.com/GenericMappingTools/gmt.git"
|
||||||
|
|
||||||
|
maintainers = ['adamjstewart']
|
||||||
|
|
||||||
|
version('master', branch='master')
|
||||||
|
version('6.0.0', sha256='7a733e670f01d99f8fc0da51a4337320d764c06a68746621f83ccf2e3453bcb7')
|
||||||
version('5.4.4', sha256='b593dfb101e6507c467619f3d2190a9f78b09d49fe2c27799750b8c4c0cd2da0')
|
version('5.4.4', sha256='b593dfb101e6507c467619f3d2190a9f78b09d49fe2c27799750b8c4c0cd2da0')
|
||||||
version('4.5.9', sha256='9b13be96ccf4bbd38c14359c05dfa7eeeb4b5f06d6f4be9c33d6c3ea276afc86',
|
version('4.5.9', sha256='9b13be96ccf4bbd38c14359c05dfa7eeeb4b5f06d6f4be9c33d6c3ea276afc86',
|
||||||
url='ftp://ftp.soest.hawaii.edu/gmt/legacy/gmt-4.5.9.tar.bz2')
|
url='ftp://ftp.soest.hawaii.edu/gmt/legacy/gmt-4.5.9.tar.bz2')
|
||||||
|
|
||||||
variant('pcre', default=False, description='Enable the PCRE interface')
|
variant('ghostscript', default=False, description='Ability to convert PostScript plots to PDF and rasters')
|
||||||
variant('gdal', default=False, description='Enable the GDAL interface')
|
variant('gdal', default=False, description='Ability to read and write numerous grid and image formats')
|
||||||
variant('fftw', default=True, description='Fast FFTs')
|
variant('pcre', default=False, description='Regular expression support')
|
||||||
variant('lapack', default=True, description='Fast matrix inversion')
|
variant('fftw', default=False, description='Fast FFTs')
|
||||||
variant('blas', default=True, description='Fast matrix multiplications')
|
variant('glib', default=False, description='GTHREAD support')
|
||||||
|
variant('lapack', default=False, description='Fast matrix inversion')
|
||||||
|
variant('blas', default=False, description='Fast matrix multiplications')
|
||||||
|
variant('graphicsmagick', default=False, description='Convert images to animated GIFs')
|
||||||
|
variant('ffmpeg', default=False, description='Convert images to videos')
|
||||||
|
variant('docs', default=False, description='Build manpage and HTML documentation')
|
||||||
|
|
||||||
# http://gmt.soest.hawaii.edu/projects/gmt/wiki/BuildingGMT
|
# https://github.com/GenericMappingTools/gmt/blob/master/BUILDING.md
|
||||||
|
# https://github.com/GenericMappingTools/gmt/blob/master/MAINTENANCE.md
|
||||||
|
|
||||||
# Required dependencies
|
# Required dependencies
|
||||||
depends_on('ghostscript')
|
depends_on('cmake@2.8.7:', type='build', when='@5:')
|
||||||
depends_on('subversion')
|
|
||||||
depends_on('cmake@2.8.5:', type='build', when='@5:')
|
|
||||||
depends_on('netcdf-c@4:')
|
depends_on('netcdf-c@4:')
|
||||||
depends_on('curl', when='@5.4:')
|
depends_on('curl', when='@5.4:')
|
||||||
|
|
||||||
# Optional dependencies
|
# Optional dependencies
|
||||||
depends_on('pcre', when='+pcre')
|
depends_on('ghostscript', when='+ghostscript')
|
||||||
depends_on('gdal', when='+gdal')
|
depends_on('gdal', when='+gdal')
|
||||||
|
depends_on('pcre', when='+pcre')
|
||||||
depends_on('fftw', when='+fftw')
|
depends_on('fftw', when='+fftw')
|
||||||
|
depends_on('glib', when='+glib')
|
||||||
depends_on('lapack', when='+lapack')
|
depends_on('lapack', when='+lapack')
|
||||||
depends_on('blas', when='+blas')
|
depends_on('blas', when='+blas')
|
||||||
|
depends_on('graphicsmagick', when='+graphicsmagick')
|
||||||
|
depends_on('ffmpeg', when='+ffmpeg')
|
||||||
|
depends_on('py-sphinx@1.4:', when='+docs', type='build')
|
||||||
|
|
||||||
depends_on('graphicsmagick', type='test')
|
depends_on('graphicsmagick', type='test')
|
||||||
|
|
||||||
patch('type.patch', when='@4.5.9')
|
patch('type.patch', when='@4.5.9')
|
||||||
@ -49,9 +64,56 @@ class Gmt(Package):
|
|||||||
@when('@5:')
|
@when('@5:')
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
with working_dir('spack-build', create=True):
|
with working_dir('spack-build', create=True):
|
||||||
cmake('..', *std_cmake_args)
|
args = std_cmake_args
|
||||||
|
|
||||||
|
args.extend([
|
||||||
|
'-DNETCDF_CONFIG={0}'.format(
|
||||||
|
spec['netcdf-c'].prefix.bin.join('nc-config')),
|
||||||
|
'-DNETCDF_INCLUDE_DIR={0}'.format(
|
||||||
|
spec['netcdf-c'].headers.directories[0]),
|
||||||
|
'-DNETCDF_LIBRARY={0}'.format(
|
||||||
|
spec['netcdf-c'].libs[0])
|
||||||
|
])
|
||||||
|
|
||||||
|
# If these options aren't explicitly disabled,
|
||||||
|
# CMake will search OS for dependencies
|
||||||
|
if '+ghostscript' in spec:
|
||||||
|
args.append('-DGS={0}'.format(
|
||||||
|
spec['ghostscript'].prefix.bin.gs))
|
||||||
|
else:
|
||||||
|
args.append('-DGS=')
|
||||||
|
|
||||||
|
if '+gdal' in spec:
|
||||||
|
args.extend([
|
||||||
|
'-DGDAL_TRANSLATE={0}'.format(
|
||||||
|
spec['gdal'].prefix.bin.gdal_translate),
|
||||||
|
'-DOGR2OGR={0}'.format(
|
||||||
|
spec['gdal'].prefix.bin.ogr2ogr),
|
||||||
|
])
|
||||||
|
else:
|
||||||
|
args.extend(['-DGDAL_TRANSLATE=', '-DOGR2OGR='])
|
||||||
|
|
||||||
|
if 'graphicsmagick' in spec:
|
||||||
|
args.extend([
|
||||||
|
'-DGM={0}'.format(
|
||||||
|
spec['graphicsmagick'].prefix.bin.gm),
|
||||||
|
'-DGRAPHICSMAGICK={0}'.format(
|
||||||
|
spec['graphicsmagick'].prefix.bin.gm),
|
||||||
|
])
|
||||||
|
else:
|
||||||
|
args.extend(['-DGM=', '-DGRAPHICSMAGICK='])
|
||||||
|
|
||||||
|
if '+ffmpeg' in spec:
|
||||||
|
args.append('-DFFMPEG={0}'.format(
|
||||||
|
spec['ffmpeg'].prefix.bin.ffmpeg))
|
||||||
|
else:
|
||||||
|
args.append('-DFFMPEG=')
|
||||||
|
|
||||||
|
cmake('..', *args)
|
||||||
|
|
||||||
make()
|
make()
|
||||||
|
if self.run_tests:
|
||||||
|
make('check')
|
||||||
make('install')
|
make('install')
|
||||||
|
|
||||||
@when('@:4')
|
@when('@:4')
|
||||||
|
Loading…
Reference in New Issue
Block a user