From 315f01fc96637723e99b0cb698fa7e8e34716bd3 Mon Sep 17 00:00:00 2001 From: Thomas Green Date: Thu, 16 Dec 2021 05:44:26 +0000 Subject: [PATCH] meep: fixed dependencies (#27574) Co-authored-by: Massimiliano Culpo --- .../repos/builtin/packages/meep/package.py | 38 ++++++++++++++----- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/meep/package.py b/var/spack/repos/builtin/packages/meep/package.py index 8a923db56a..9710da837d 100644 --- a/var/spack/repos/builtin/packages/meep/package.py +++ b/var/spack/repos/builtin/packages/meep/package.py @@ -24,14 +24,16 @@ class Meep(AutotoolsPackage): version('1.1.1', sha256='7a97b5555da1f9ea2ec6eed5c45bd97bcd6ddbd54bdfc181f46c696dffc169f2', url='http://ab-initio.mit.edu/meep/old/meep-1.1.1.tar.gz') - variant('blas', default=True, description='Enable BLAS support') - variant('lapack', default=True, description='Enable LAPACK support') - variant('harminv', default=True, description='Enable Harminv support') - variant('guile', default=True, description='Enable Guilde support') - variant('libctl', default=True, description='Enable libctl support') - variant('mpi', default=True, description='Enable MPI support') - variant('hdf5', default=True, description='Enable HDF5 support') - variant('gsl', default=True, description='Enable GSL support') + variant('blas', default=True, description='Enable BLAS support') + variant('lapack', default=True, description='Enable LAPACK support') + variant('harminv', default=True, description='Enable Harminv support') + variant('guile', default=True, description='Enable Guilde support') + variant('libctl', default=True, description='Enable libctl support') + variant('mpi', default=True, description='Enable MPI support') + variant('hdf5', default=True, description='Enable HDF5 support') + variant('gsl', default=True, description='Enable GSL support') + variant('python', default=True, description='Enable Python support') + variant('single', default=False, description='Enable Single Precision') depends_on('autoconf', type='build', when='@1.21.0') depends_on('automake', type='build', when='@1.21.0') @@ -40,12 +42,19 @@ class Meep(AutotoolsPackage): depends_on('blas', when='+blas') depends_on('lapack', when='+lapack') depends_on('harminv', when='+harminv') - depends_on('guile', when='+guile') - depends_on('libctl', when='+libctl') + depends_on('guile@:2', when='@:1.4+guile') + depends_on('guile@2:', when='@1.4:+guile') + depends_on('libctl@3.2', when='@:1.3+libctl') + depends_on('libctl@4:', when='+libctl') depends_on('mpi', when='+mpi') depends_on('hdf5~mpi', when='+hdf5~mpi') depends_on('hdf5+mpi', when='+hdf5+mpi') depends_on('gsl', when='+gsl') + with when('+python'): + depends_on('python') + depends_on('py-numpy') + depends_on('swig') + depends_on('py-mpi4py', when='+mpi') def configure_args(self): spec = self.spec @@ -82,6 +91,15 @@ def configure_args(self): else: config_args.append('--without-hdf5') + if '+python' in spec: + config_args.append('--with-python') + else: + config_args.append('--without-python') + config_args.append('--without-scheme') + + if '+single' in spec: + config_args.append('--enable-single') + if spec.satisfies('@1.21.0:'): config_args.append('--enable-maintainer-mode')