Files
spack/var/spack/repos/builtin/packages/meep/package.py

105 lines
4.1 KiB
Python
Raw Normal View History

2016-07-01 16:30:11 -05:00
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
2016-07-01 16:30:11 -05:00
# 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/spack/spack
# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
2016-07-01 16:30:11 -05:00
#
# 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(AutotoolsPackage):
2016-07-01 16:30:11 -05:00
"""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"
Overhaul Spack's URL parsing (#2972) * Remove fake URLs from Spack * Ignore long lines for URLs that start with ftp: * Preliminary changes to version regexes * New redesign of version regexes * Allow letters in version-only * Fix detection of versions that end in Final * Rearrange a few regexes and add examples * Add tests for common download repositories * Add test cases for common tarball naming schemes * Finalize version regexes * spack url test -> spack url summary * Clean up comments * Rearrange suffix checks * Use query strings for name detection * Remove no longer necessary url_for_version functions * Strip off extraneous information after package name * Add one more test * Dot in square brackets does not need to be escaped * Move renaming outside of parse_name_offset * Fix versions for a couple more packages * Fix flake8 and doc tests * Correctly parse Python, Lua, and Bio++ package names * Use effective URLs for mfem * Add checksummed version to mitos * Remove url_for_version from STAR-CCM+ package * Revert changes to version numbers with underscores and dashes * Fix name detection for tbb * Correctly parse Ruby gems * Reverted mfem back to shortened URLs. * Updated instructions for better security * Remove preferred=True from newest version * Add tests for new `spack url list` flags * Add tests for strip_name_suffixes * Add unit tests for version separators * Fix bugs related to parseable name but in parseable version * Remove dead code, update docstring * Ignore 'binary' at end of version string * Remove platform from version * Flip libedit version numbers * Re-support weird NCO alpha/beta versions * Rebase and remove one new fake URL * Add / to beginning of regex to avoid picking up similarly named packages * Ignore weird tar versions * Fix bug in url parse --spider when no versions found * Less strict version matching for spack versions * Don't rename Python packages * Be a little more selective, version must begin with a digit * Re-add fake URLs * Fix up several other packages * Ignore more file endings * Add parsing support for Miniconda * Update tab completion * XFAILS are now PASSES for 2 web tests
2017-04-03 17:34:16 -05:00
url = "http://ab-initio.mit.edu/meep/meep-1.3.tar.gz"
list_url = "http://ab-initio.mit.edu/meep/old"
2016-07-01 16:30:11 -05:00
version('1.3', '18a5b9e18008627a0411087e0bb60db5')
2016-07-11 11:42:36 -05:00
version('1.2.1', '9be2e743c3a832ae922de9d955d016c5')
2016-07-01 16:30:11 -05:00
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')
variant('gsl', default=True, description='Enable GSL support')
2016-07-01 16:30:11 -05:00
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~mpi', when='+hdf5~mpi')
depends_on('hdf5+mpi', when='+hdf5+mpi')
2016-07-08 12:56:08 -05:00
depends_on('gsl', when='+gsl')
2016-07-01 16:30:11 -05:00
def configure_args(self):
spec = self.spec
2016-07-01 16:30:11 -05:00
config_args = [
'--enable-shared'
]
2016-07-01 16:30:11 -05:00
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(
2016-07-14 09:46:09 -05:00
join_path(spec['libctl'].prefix.share, 'libctl')))
2016-07-01 16:30:11 -05:00
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')
return config_args
2016-07-01 16:30:11 -05:00
def check(self):
spec = self.spec
2016-07-08 12:56:08 -05:00
# aniso_disp test fails unless installed with harminv
# near2far test fails unless installed with gsl
if '+harminv' in spec and '+gsl' in spec:
2016-07-08 12:56:08 -05:00
# Most tests fail when run in parallel
# 2D_convergence tests still fails to converge for unknown reasons
make('check', parallel=False)