97 lines
3.7 KiB
Python
97 lines
3.7 KiB
Python
![]() |
##############################################################################
|
||
|
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||
|
# Produced at the Lawrence Livermore National Laboratory.
|
||
|
#
|
||
|
# This file is part of Spack.
|
||
|
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||
|
# LLNL-CODE-647188
|
||
|
#
|
||
|
# For details, see https://github.com/llnl/spack
|
||
|
# Please also see the LICENSE file for our notice and the LGPL.
|
||
|
#
|
||
|
# This program is free software; you can redistribute it and/or modify
|
||
|
# it under the terms of the GNU Lesser General Public License (as
|
||
|
# published by the Free Software Foundation) version 2.1, February 1999.
|
||
|
#
|
||
|
# This program is distributed in the hope that it will be useful, but
|
||
|
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||
|
# conditions of the GNU Lesser General Public License for more details.
|
||
|
#
|
||
|
# You should have received a copy of the GNU Lesser General Public
|
||
|
# License along with this program; if not, write to the Free Software
|
||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||
|
##############################################################################
|
||
|
from spack import *
|
||
|
|
||
|
|
||
|
class Meep(Package):
|
||
|
"""Meep (or MEEP) is a free finite-difference time-domain (FDTD) simulation
|
||
|
software package developed at MIT to model electromagnetic systems."""
|
||
|
|
||
|
homepage = "http://ab-initio.mit.edu/wiki/index.php/Meep"
|
||
|
|
||
|
version('1.3', '18a5b9e18008627a0411087e0bb60db5')
|
||
|
version('1.1.1', '415e0cd312b6caa22b5dd612490e1ccf')
|
||
|
|
||
|
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')
|
||
|
|
||
|
# Recommended dependencies
|
||
|
depends_on('blas', when='+blas')
|
||
|
depends_on('lapack', when='+lapack')
|
||
|
depends_on('harminv', when='+harminv')
|
||
|
depends_on('guile', when='+guile')
|
||
|
depends_on('libctl@3.2:', when='+libctl')
|
||
|
depends_on('mpi', when='+mpi')
|
||
|
depends_on('hdf5', when='+hdf5')
|
||
|
|
||
|
def url_for_version(self, version):
|
||
|
base_url = "http://ab-initio.mit.edu/meep"
|
||
|
if version == Version('1.3'):
|
||
|
return "{0}/meep-{1}.tar.gz".format(base_url, version)
|
||
|
else:
|
||
|
return "{0}/old/meep-{1}.tar.gz".format(base_url, version)
|
||
|
|
||
|
def install(self, spec, prefix):
|
||
|
config_args = ['--prefix={0}'.format(prefix)]
|
||
|
|
||
|
if '+blas' in spec:
|
||
|
config_args.append('--with-blas={0}'.format(
|
||
|
spec['blas'].prefix.lib))
|
||
|
else:
|
||
|
config_args.append('--without-blas')
|
||
|
|
||
|
if '+lapack' in spec:
|
||
|
config_args.append('--with-lapack={0}'.format(
|
||
|
spec['lapack'].prefix.lib))
|
||
|
else:
|
||
|
config_args.append('--without-lapack')
|
||
|
|
||
|
if '+libctl' in spec:
|
||
|
config_args.append('--with-libctl={0}'.format(
|
||
|
spec['libctl'].prefix))
|
||
|
else:
|
||
|
config_args.append('--without-libctl')
|
||
|
|
||
|
if '+mpi' in spec:
|
||
|
config_args.append('--with-mpi')
|
||
|
else:
|
||
|
config_args.append('--without-mpi')
|
||
|
|
||
|
if '+hdf5' in spec:
|
||
|
config_args.append('--with-hdf5')
|
||
|
else:
|
||
|
config_args.append('--without-hdf5')
|
||
|
|
||
|
configure(*config_args)
|
||
|
|
||
|
make()
|
||
|
make('check')
|
||
|
make('install')
|