diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/lammps/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/lammps/package.py | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/var/spack/repos/builtin/packages/lammps/package.py b/var/spack/repos/builtin/packages/lammps/package.py index 7eeea42773..5743d39189 100644 --- a/var/spack/repos/builtin/packages/lammps/package.py +++ b/var/spack/repos/builtin/packages/lammps/package.py @@ -1,27 +1,8 @@ -############################################################################## -# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. +# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. # -# 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. -# 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 -############################################################################## +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + from spack import * import datetime as dt @@ -35,10 +16,17 @@ class Lammps(CMakePackage): """ homepage = "http://lammps.sandia.gov/" url = "https://github.com/lammps/lammps/archive/patch_1Sep2017.tar.gz" + git = "https://github.com/lammps/lammps.git" + + tags = ['ecp', 'ecp-apps'] + version('develop', branch='master') + version('20180822', sha256='9f8942ca3f8e81377ae88ccfd075da4e27d0dd677526085e1a807777c8324074') + version('20180629', '6d5941863ee25ad2227ff3b7577d5e7c') + version('20180316', '25bad35679583e0dd8cb8753665bb84b') + version('20180222', '4d0513e3183bd57721814d217fdaf957') version('20170922', '4306071f919ec7e759bda195c26cfd9a') version('20170901', '767e7f07289663f033474dfe974974e7') - version('develop', git='https://github.com/lammps/lammps', branch='master') def url_for_version(self, version): vdate = dt.datetime.strptime(str(version), "%Y%m%d") @@ -68,7 +56,9 @@ class Lammps(CMakePackage): depends_on('netcdf+mpi', when='+user-netcdf') depends_on('blas', when='+user-atc') depends_on('lapack', when='+user-atc') - depends_on('latte', when='+latte') + depends_on('latte@1.0.1', when='@:20180222+latte') + depends_on('latte@1.1.1:', when='@20180316:20180628+latte') + depends_on('latte@1.2.1:', when='@20180629:+latte') depends_on('blas', when='+latte') depends_on('lapack', when='+latte') depends_on('python', when='+python') @@ -76,7 +66,7 @@ class Lammps(CMakePackage): depends_on('mpi', when='+user-h5md') depends_on('hdf5', when='+user-h5md') - conflicts('+body', when='+poems') + conflicts('+body', when='+poems@:20180628') conflicts('+latte', when='@:20170921') conflicts('+python', when='~lib') conflicts('+qeq', when='~manybody') @@ -93,15 +83,25 @@ class Lammps(CMakePackage): def cmake_args(self): spec = self.spec + mpi_prefix = 'ENABLE' + pkg_prefix = 'ENABLE' + if spec.satisfies('@20180629:'): + mpi_prefix = 'BUILD' + pkg_prefix = 'PKG' + args = [ '-DBUILD_SHARED_LIBS={0}'.format( 'ON' if '+lib' in spec else 'OFF'), - '-DENABLE_MPI={0}'.format( + '-D{0}_MPI={1}'.format( + mpi_prefix, 'ON' if '+mpi' in spec else 'OFF') ] + if spec.satisfies('@20180629:+lib'): + args.append('-DBUILD_LIB=ON') + for pkg in self.supported_packages: - opt = '-DENABLE_{0}'.format(pkg.upper()) + opt = '-D{0}_{1}'.format(pkg_prefix, pkg.upper()) if '+{0}'.format(pkg) in spec: args.append('{0}=ON'.format(opt)) else: |