summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPariksheet Nanda <pariksheet.nanda@uconn.edu>2019-07-23 13:10:01 -0400
committerAdam J. Stewart <ajstewart426@gmail.com>2019-07-23 12:10:01 -0500
commit5878b418c5d01a50b9b965f8f3c7b3956eab3aba (patch)
tree530528a58456765408c5b936615f413991441dfd
parenta086dda82f2f4cab362f59a71958602f9fc31d94 (diff)
downloadspack-5878b418c5d01a50b9b965f8f3c7b3956eab3aba.tar.gz
spack-5878b418c5d01a50b9b965f8f3c7b3956eab3aba.tar.bz2
spack-5878b418c5d01a50b9b965f8f3c7b3956eab3aba.tar.xz
spack-5878b418c5d01a50b9b965f8f3c7b3956eab3aba.zip
ioapi: add version 3.2 (#12088)
* ioapi: add version 3.2 * ioapi: unwrap version checksum; it's exempt from line length QA * ioapi: drop overridden build(); it's the same as the default
-rw-r--r--var/spack/repos/builtin/packages/ioapi/package.py44
1 files changed, 44 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/ioapi/package.py b/var/spack/repos/builtin/packages/ioapi/package.py
new file mode 100644
index 0000000000..2081d70754
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ioapi/package.py
@@ -0,0 +1,44 @@
+# Copyright 2013-2019 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)
+
+import glob
+import os
+
+from spack import *
+
+
+class Ioapi(MakefilePackage):
+ """Models-3/EDSS Input/Output Applications Programming Interface."""
+
+ homepage = "https://www.cmascenter.org/ioapi/"
+ url = "https://www.cmascenter.org/ioapi/download/ioapi-3.2.tar.gz"
+ version('3.2', sha256='56771ff0053d47f2445e00ff369bca7bfc484325a2816b2c648744e523134fe9')
+ depends_on('netcdf@4:')
+ depends_on('netcdf-fortran@4:')
+ depends_on('sed', type='build')
+
+ def edit(self, spec, prefix):
+ # No default Makefile bundled; edit the template.
+ os.symlink('Makefile.template', 'Makefile')
+ # The makefile uses stubborn assignments of = instead of ?= so
+ # edit the makefile instead of using environmental variables.
+ makefile = FileFilter('Makefile')
+ makefile.filter('^BASEDIR.*', 'BASEDIR = ' + self.build_directory)
+ makefile.filter('^INSTALL.*', 'INSTALL = ' + prefix)
+ makefile.filter('^BININST.*', 'BININST = ' + prefix.bin)
+ makefile.filter('^LIBINST.*', 'LIBINST = ' + prefix.lib)
+
+ def install(self, spec, prefix):
+ make('install')
+ # Install the header files.
+ mkdirp(prefix.include.fixed132)
+ headers = glob.glob('ioapi/*.EXT')
+ for header in headers:
+ install(header, prefix.include)
+ # Install the header files for CMAQ and SMOKE in the
+ # non-standard -ffixed-line-length-132 format.
+ headers_fixed132 = glob.glob('ioapi/fixed_src/*.EXT')
+ for header in headers_fixed132:
+ install(header, prefix.include.fixed132)