diff options
author | Lhxone <lhxone@outlook.com> | 2022-04-27 15:35:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-27 09:35:40 +0200 |
commit | 8c280d98ca7ec3e7158182f3b38c00779dd7852b (patch) | |
tree | a9c82f35ab64375fbe195d4d1a0412760ad4af58 /var | |
parent | d5e1fa5771c9cb1a2b85ab129be182f7081ae7cb (diff) | |
download | spack-8c280d98ca7ec3e7158182f3b38c00779dd7852b.tar.gz spack-8c280d98ca7ec3e7158182f3b38c00779dd7852b.tar.bz2 spack-8c280d98ca7ec3e7158182f3b38c00779dd7852b.tar.xz spack-8c280d98ca7ec3e7158182f3b38c00779dd7852b.zip |
suntans: add new package (#30149)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/suntans/package.py | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/suntans/package.py b/var/spack/repos/builtin/packages/suntans/package.py new file mode 100644 index 0000000000..9678525b37 --- /dev/null +++ b/var/spack/repos/builtin/packages/suntans/package.py @@ -0,0 +1,46 @@ +# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Suntans(MakefilePackage): + """The Stanford unstructured-grid, + nonhydrostatic, parallel coastal + ocean model. """ + + homepage = "https://github.com/ofringer/suntans" + url = "https://github.com/ofringer/suntans/archive/master.zip" + + maintainers = ['ofringer', 'zyaj', 'mrayson', 'jadelson', 'lhxone'] + + version('3.1', '9b5d0dee5502a5650e37bf72f64b1124be86c084e7408aa517c214ddb25e36de') + + depends_on('libx11@1.6.3') + depends_on('mpi') + + def edit(self, spec, prefix): + env['MPIHOME'] = spec['openmpi'].prefix + with working_dir('main'): + makefile = FileFilter('Makefile') + makefile.filter('XINC=.*', 'XINC= -I{0}' + .format(spec['libx11'].prefix.include)) + makefile.filter('XLIBDIR = .*', + 'XLIBDIR = {0}' + .format(spec['libx11'].prefix.lib)) + makefile.filter( + 'INCLUDES = .*', + 'INCLUDES=$(PARMETISINCLUDE)$(TRIANGLEINCLUDE)$(NETCDFINCLUDE)$(XINC)') + + def build(self, spec, prefix): + with working_dir('main'): + make('sunplot') + + def install(self, spec, prefix): + mkdir(prefix.bin) + mkdir(prefix.include) + with working_dir('main'): + install('sunplot', prefix.bin) + install('*.h', prefix.include) |