2022-01-13 03:21:41 +08:00
|
|
|
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
2018-10-08 04:52:23 +08:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
2018-06-13 21:57:52 +08:00
|
|
|
#
|
2018-10-08 04:52:23 +08:00
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
2018-06-13 21:57:52 +08:00
|
|
|
from spack import *
|
2022-03-18 07:42:07 +08:00
|
|
|
from spack.pkg.builtin.boost import Boost
|
2018-06-13 21:57:52 +08:00
|
|
|
|
|
|
|
|
|
|
|
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'
|
|
|
|
|
2022-02-03 02:12:33 +08:00
|
|
|
version('2.1.0', sha256='5a52242520d7e243c541e164c8417b23f4e17fcd79ed81f865b2c13628bb0e07')
|
|
|
|
version('2.0.0', sha256='1c27d3932a851153baee7cec48e57c2bbc87e4eea02f8a986882515ba4b44c0b')
|
2018-06-13 21:57:52 +08:00
|
|
|
|
2019-06-19 03:15:14 +08:00
|
|
|
depends_on('cmake@2.8.8:', type='build')
|
2018-11-13 13:56:59 +08:00
|
|
|
depends_on('ninja', type='build')
|
2018-06-13 21:57:52 +08:00
|
|
|
# Qt 5 does not support (at least) the Q_WS_* constants.
|
2021-10-03 21:09:02 +08:00
|
|
|
depends_on('qt+opengl@4.4.0:4')
|
2018-06-13 21:57:52 +08:00
|
|
|
depends_on('qwt@6.0.1:')
|
2019-05-02 06:57:33 +08:00
|
|
|
depends_on('glu')
|
2018-06-13 21:57:52 +08:00
|
|
|
depends_on('glew')
|
|
|
|
# GDAL's OGRSFDriverRegistrar is not compatible anymore starting with 2.0.
|
2021-10-03 21:09:02 +08:00
|
|
|
depends_on('gdal@1.3.2:1')
|
2018-06-13 21:57:52 +08:00
|
|
|
depends_on('cgal@3.5:')
|
2019-06-19 03:15:14 +08:00
|
|
|
# The latest release of gplates came out before PROJ.6 was released,
|
|
|
|
# so I'm assuming it's not supported.
|
|
|
|
depends_on('proj@4.6.0:5')
|
2018-06-13 21:57:52 +08:00
|
|
|
# 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')
|
2021-10-03 21:09:02 +08:00
|
|
|
depends_on('python@2.0:2')
|
2022-03-18 07:42:07 +08:00
|
|
|
# TODO: replace this with an explicit list of components of Boost,
|
|
|
|
# for instance depends_on('boost +filesystem')
|
|
|
|
# See https://github.com/spack/spack/pull/22303 for reference
|
|
|
|
depends_on(Boost.with_default_variants)
|
2018-06-13 21:57:52 +08:00
|
|
|
|
|
|
|
# When built in parallel, headers are not generated before they are used
|
2018-11-13 13:56:59 +08:00
|
|
|
# (specifically, ViewportWindowUi.h) with the Makefiles generator.
|
|
|
|
generator = 'Ninja'
|
2018-06-13 21:57:52 +08:00
|
|
|
|
|
|
|
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')
|