summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthelfer <thomas.helfer@cea.fr>2019-01-08 22:07:47 +0100
committerAdam J. Stewart <ajstewart426@gmail.com>2019-01-08 15:07:47 -0600
commitd3caad4cd76462fa1ae88fe84f4c6061b0edac5b (patch)
tree60b95ade5e7dae3984c1ba031d3c9dfc05bddc0f
parent45882e1b6fbb3dd69e8539e92bc5b956110b7b5f (diff)
downloadspack-d3caad4cd76462fa1ae88fe84f4c6061b0edac5b.tar.gz
spack-d3caad4cd76462fa1ae88fe84f4c6061b0edac5b.tar.bz2
spack-d3caad4cd76462fa1ae88fe84f4c6061b0edac5b.tar.xz
spack-d3caad4cd76462fa1ae88fe84f4c6061b0edac5b.zip
New package: MGIS (#10273)
* add the tfel package * fix the tfel package * fix the tfel package * fix the tfel package * Taking Adam J. Steward' remarks into account * fixes trailing white spaces * Update description * Update dependencies following @adamjstewart adices * Style fixes * Style fixes * Add java optional support * add the maintainers attribute (following @alalazo advice), disable interface not selected (following @adamjstewart advice) * flake8 fixes * Fix Cast3M and python-bindings support. Python detection is made compatible with cmake'FindPythonLibs module (at least how it is used in TFEL) * Style fixes * Style fixes * Fix test on python version * Follow @adamjstewart advices: code is much cleaner and readable * Small fix * Small fix * Add comment * Small fix in cmake option * try again (trying to overcome Travis CI unstable build process) * Add support for the MFrontGenericInterfaceSupport project (MGIS) * Style fixes * Package documentation update * Package documentation update * Fix a typo thanks to Andreas Baumbach review * Follow Adam J. Stewart advices * Fix type
-rw-r--r--var/spack/repos/builtin/packages/mgis/package.py73
1 files changed, 73 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/mgis/package.py b/var/spack/repos/builtin/packages/mgis/package.py
new file mode 100644
index 0000000000..83f8688a61
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mgis/package.py
@@ -0,0 +1,73 @@
+# Copyright 2013-2018 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 Mgis(CMakePackage):
+ """
+ The MFrontGenericInterfaceSupport project (MGIS) provides helper
+ functions for various solvers to interact with behaviour written
+ using MFront generic interface.
+
+ MGIS is written in C++.
+ Bindings are provided for C and fortran (2003).
+ A FEniCS binding is also available.
+ """
+
+ homepage = "https://thelfer.github.io/mgis/web/index.html"
+ url = "https://github.com/thelfer/MFrontGenericInterfaceSupport/archive/MFrontGenericInterfaceSupport-1.0.tar.gz"
+ git = "https://github.com/thelfer/MFrontGenericInterfaceSupport.git"
+ maintainers = ['thelfer']
+
+ # development branches
+ version("master", branch="master")
+ version("rliv-1.0", branch="rliv-1.0")
+
+ # released version
+ version('1.0', sha256='279c98da00fa6855edf29c2b8f8bad6e7732298dc62ef67d028d6bbeaac043b3')
+
+ # variants
+ variant('c', default=True,
+ description='Enables c bindings')
+ variant('fortran', default=True,
+ description='Enables fortran bindings')
+ variant('python', default=True,
+ description='Enables python bindings')
+ variant('build_type', default='Release',
+ description='The build type to build',
+ values=('Debug', 'Release'))
+
+ # dependencies
+ depends_on('tfel@3.2.0', when="@1.0")
+ depends_on('tfel@rliv-3.2', when="@rliv-3.2")
+ depends_on('tfel@master', when="@master")
+ depends_on('boost+python', when='+python')
+ extends('python', when='+python')
+
+ def cmake_args(self):
+
+ args = []
+
+ for i in ['c', 'fortran', 'python']:
+ if '+' + i in self.spec:
+ args.append("-Denable-{0}-bindings=ON".format(i))
+ else:
+ args.append("-Denable-{0}-bindings=OFF".format(i))
+
+ if '+python' in self.spec:
+ # adding path to python
+ python = self.spec['python']
+ args.append('-DPYTHON_LIBRARY={0}'.
+ format(python.libs[0]))
+ args.append('-DPYTHON_INCLUDE_DIR={0}'.
+ format(python.headers.directories[0]))
+ args.append('-DPython_ADDITIONAL_VERSIONS={0}'.
+ format(python.version.up_to(2)))
+ # adding path to boost
+ args.append('-DBOOST_ROOT={0}'.
+ format(self.spec['boost'].prefix))
+
+ return args