summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorCody Balos <balos1@llnl.gov>2020-10-15 06:38:05 -0700
committerGitHub <noreply@github.com>2020-10-15 15:38:05 +0200
commita9dfa89c898ba15beab7d19a3a02d2df90466ce5 (patch)
tree1beaca54fefcea9f4cb01eac4cf95fd3eefdd651 /var
parentd1423e21fb5b435673bdd4068cdd19a2de4c18de (diff)
downloadspack-a9dfa89c898ba15beab7d19a3a02d2df90466ce5.tar.gz
spack-a9dfa89c898ba15beab7d19a3a02d2df90466ce5.tar.bz2
spack-a9dfa89c898ba15beab7d19a3a02d2df90466ce5.tar.xz
spack-a9dfa89c898ba15beab7d19a3a02d2df90466ce5.zip
xbraid: added v2.3.0 and v3.0.0 (#19280)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/xbraid/package.py38
1 files changed, 33 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/xbraid/package.py b/var/spack/repos/builtin/packages/xbraid/package.py
index d58ac78016..530390c100 100644
--- a/var/spack/repos/builtin/packages/xbraid/package.py
+++ b/var/spack/repos/builtin/packages/xbraid/package.py
@@ -4,8 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
-import glob
-import os.path
class Xbraid(MakefilePackage):
@@ -14,21 +12,51 @@ class Xbraid(MakefilePackage):
homepage = "https://computing.llnl.gov/projects/parallel-time-integration-multigrid/software"
url = "https://github.com/XBraid/xbraid/archive/v2.2.0.tar.gz"
+ version('3.0.0', sha256='06988c0599cd100d3b3f3ebb183c9ad34a4021922e0896815cbedc659aaadce6')
+ version('2.3.0', sha256='706f0acde201c7c336ade3604679759752a74e2cd6c2a29a8bf5676b6e54b704')
version('2.2.0', sha256='082623b2ddcd2150b3ace65b96c1e00be637876ec6c94dc8fefda88743b35ba3')
depends_on('mpi')
+ @when('@:2.2.0')
def build(self, spec, prefix):
make('libbraid.a')
+ @when('@2.3.0:')
+ def build(self, spec, prefix):
+ make('braid')
+
# XBraid doesn't have a real install target, so it has to be done
# manually
+ @when('@2.3.0:')
+ def install(self, spec, prefix):
+ # Install headers
+ mkdirp(prefix.include)
+ install('braid/*.h', prefix.include)
+ install('braid/*.hpp', prefix.include)
+
+ # Install library
+ mkdirp(prefix.lib)
+ install('braid/libbraid.a', join_path(prefix.lib, 'libbraid.a'))
+
+ # Install other material (e.g., examples, tests, docs)
+ mkdirp(prefix.share)
+ install('makefile.inc', prefix.share)
+ install_tree('examples', prefix.share.examples)
+ install_tree('drivers', prefix.share.drivers)
+
+ # TODO: Some of the scripts in 'test' are useful, even for
+ # users; some could be deleted from an installation because
+ # they're not useful to users
+ install_tree('test', prefix.share.test)
+ install_tree('misc', prefix.share.misc)
+ install_tree('docs', prefix.share.docs)
+
+ @when('@:2.2.0')
def install(self, spec, prefix):
# Install headers
mkdirp(prefix.include)
- headers = glob.glob('*.h')
- for f in headers:
- install(f, join_path(prefix.include, os.path.basename(f)))
+ install('*.h', prefix.include)
# Install library
mkdirp(prefix.lib)