meep: fixed dependencies (#27574)

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This commit is contained in:
Thomas Green 2021-12-16 05:44:26 +00:00 committed by GitHub
parent e99aff93e1
commit 315f01fc96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,14 +24,16 @@ class Meep(AutotoolsPackage):
version('1.1.1', sha256='7a97b5555da1f9ea2ec6eed5c45bd97bcd6ddbd54bdfc181f46c696dffc169f2', version('1.1.1', sha256='7a97b5555da1f9ea2ec6eed5c45bd97bcd6ddbd54bdfc181f46c696dffc169f2',
url='http://ab-initio.mit.edu/meep/old/meep-1.1.1.tar.gz') url='http://ab-initio.mit.edu/meep/old/meep-1.1.1.tar.gz')
variant('blas', default=True, description='Enable BLAS support') variant('blas', default=True, description='Enable BLAS support')
variant('lapack', default=True, description='Enable LAPACK support') variant('lapack', default=True, description='Enable LAPACK support')
variant('harminv', default=True, description='Enable Harminv support') variant('harminv', default=True, description='Enable Harminv support')
variant('guile', default=True, description='Enable Guilde support') variant('guile', default=True, description='Enable Guilde support')
variant('libctl', default=True, description='Enable libctl support') variant('libctl', default=True, description='Enable libctl support')
variant('mpi', default=True, description='Enable MPI support') variant('mpi', default=True, description='Enable MPI support')
variant('hdf5', default=True, description='Enable HDF5 support') variant('hdf5', default=True, description='Enable HDF5 support')
variant('gsl', default=True, description='Enable GSL 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('autoconf', type='build', when='@1.21.0')
depends_on('automake', 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('blas', when='+blas')
depends_on('lapack', when='+lapack') depends_on('lapack', when='+lapack')
depends_on('harminv', when='+harminv') depends_on('harminv', when='+harminv')
depends_on('guile', when='+guile') depends_on('guile@:2', when='@:1.4+guile')
depends_on('libctl', when='+libctl') 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('mpi', when='+mpi')
depends_on('hdf5~mpi', when='+hdf5~mpi') depends_on('hdf5~mpi', when='+hdf5~mpi')
depends_on('hdf5+mpi', when='+hdf5+mpi') depends_on('hdf5+mpi', when='+hdf5+mpi')
depends_on('gsl', when='+gsl') 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): def configure_args(self):
spec = self.spec spec = self.spec
@ -82,6 +91,15 @@ def configure_args(self):
else: else:
config_args.append('--without-hdf5') 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:'): if spec.satisfies('@1.21.0:'):
config_args.append('--enable-maintainer-mode') config_args.append('--enable-maintainer-mode')