summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTiziano Müller <tiziano.mueller@chem.uzh.ch>2021-07-19 18:28:31 +0200
committerGitHub <noreply@github.com>2021-07-19 10:28:31 -0600
commitd74b2967525c3e71183d52cce439a8bbf4b8a51f (patch)
tree30b7303cfb9e586ecd4d7a967c821ab52351747f /var
parent78459397223565371ba705619d662fc4e335c261 (diff)
downloadspack-d74b2967525c3e71183d52cce439a8bbf4b8a51f.tar.gz
spack-d74b2967525c3e71183d52cce439a8bbf4b8a51f.tar.bz2
spack-d74b2967525c3e71183d52cce439a8bbf4b8a51f.tar.xz
spack-d74b2967525c3e71183d52cce439a8bbf4b8a51f.zip
libint: add debug/fma variants, fix tests for v2.6 (#24665)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/libint/package.py33
1 files changed, 27 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/libint/package.py b/var/spack/repos/builtin/packages/libint/package.py
index 854849ac33..5a24da6071 100644
--- a/var/spack/repos/builtin/packages/libint/package.py
+++ b/var/spack/repos/builtin/packages/libint/package.py
@@ -28,6 +28,8 @@ class Libint(AutotoolsPackage):
homepage = "https://github.com/evaleev/libint"
url = "https://github.com/evaleev/libint/archive/v2.1.0.tar.gz"
+ maintainers = ['dev-zero']
+
version('2.6.0', sha256='4ae47e8f0b5632c3d2a956469a7920896708e9f0e396ec10071b8181e4c8d9fa')
version('2.4.2', sha256='86dff38065e69a3a51d15cfdc638f766044cb87e5c6682d960c14f9847e2eac3')
version('2.4.1', sha256='0513be124563fdbbc7cd3c7043e221df1bda236a037027ba9343429a27db8ce4')
@@ -37,11 +39,16 @@ class Libint(AutotoolsPackage):
version('1.1.6', sha256='f201b0c621df678cfe8bdf3990796b8976ff194aba357ae398f2f29b0e2985a6')
version('1.1.5', sha256='ec8cd4a4ba1e1a98230165210c293632372f0e573acd878ed62e5ec6f8b6174b')
+ variant('debug', default=False,
+ description='Enable building with debug symbols')
variant('fortran', default=False,
description='Build & install Fortran bindings')
variant('tune', default='none', multi=False,
values=TUNE_VARIANTS,
description='Tune libint for use with the given package')
+ variant('fma', default=False,
+ description=('Generate code utilizing FMA'
+ ' (requires capable CPU and recent enough compiler)'))
# Build dependencies
depends_on('autoconf@2.52:', type='build')
@@ -120,6 +127,9 @@ class Libint(AutotoolsPackage):
if '@2.6.0:' in self.spec:
config_args += ['--with-libint-exportdir=generated']
+ config_args += self.enable_or_disable(
+ 'debug', activation_value=lambda x: 'opt')
+ config_args += self.enable_or_disable('fma')
tune_value = self.spec.variants['tune'].value
if tune_value.startswith('cp2k'):
@@ -168,30 +178,41 @@ class Libint(AutotoolsPackage):
return []
@when('@2.6.0:')
- def install(self, spec, prefix):
+ def build(self, spec, prefix):
"""
Starting from libint 2.6.0 we're using the 2-stage build
to get support for the Fortran bindings, required by some
packages (CP2K notably).
"""
+ super(Libint, self).build(spec, prefix)
+
# upstream says that using configure/make for the generated code
# is deprecated and one should use CMake, but with the currently
# recent 2.7.0.b1 it still doesn't work
with working_dir(os.path.join(self.build_directory, 'generated')):
# straight from the AutotoolsPackage class:
- options = [
+ config_args = [
'--prefix={0}'.format(prefix),
'--enable-shared',
'--with-cxx-optflags={0}'.format(self.optflags),
]
-
- if '+fortran' in spec:
- options += ['--enable-fortran']
+ config_args += self.enable_or_disable(
+ 'debug', activation_value=lambda x: 'opt')
+ config_args += self.enable_or_disable('fortran')
configure = Executable('./configure')
- configure(*options)
+ configure(*config_args)
make()
+
+ @when('@2.6.0:')
+ def check(self):
+ with working_dir(os.path.join(self.build_directory, 'generated')):
+ make('check')
+
+ @when('@2.6.0:')
+ def install(self, spec, prefix):
+ with working_dir(os.path.join(self.build_directory, 'generated')):
make('install')
def patch(self):