summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/grackle/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/grackle/package.py')
-rw-r--r--var/spack/repos/builtin/packages/grackle/package.py40
1 files changed, 13 insertions, 27 deletions
diff --git a/var/spack/repos/builtin/packages/grackle/package.py b/var/spack/repos/builtin/packages/grackle/package.py
index 06689a3c4c..6163f72bbc 100644
--- a/var/spack/repos/builtin/packages/grackle/package.py
+++ b/var/spack/repos/builtin/packages/grackle/package.py
@@ -1,29 +1,9 @@
-##############################################################################
-# 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)
+
import os.path
-import shutil
import inspect
from spack import *
@@ -35,12 +15,16 @@ class Grackle(Package):
generalized and trimmed down version of the chemistry network of the Enzo
simulation code
"""
- homepage = 'http://grackle.readthedocs.io/en/grackle-2.2/'
- url = 'https://bitbucket.org/grackle/grackle/get/grackle-2.0.1.tar.bz2'
+ homepage = 'http://grackle.readthedocs.io/en/grackle-3.1/'
+ url = 'https://bitbucket.org/grackle/grackle/get/grackle-3.1.tar.bz2'
+ version('3.1', 'cee7799dc505010e2e875950561bbbe1')
+ version('3.0', 'dc85e664da7e70b65b3ef7164477a959')
version('2.2', 'ec49ed1db5a42db21f478285150c2ba3')
version('2.0.1', 'a9624ad13a60c592c1a0a4ea8e1ae86d')
+ variant('float', default=False, description='Build with float')
+
depends_on('libtool', when='@2.2')
depends_on('mpi')
@@ -74,7 +58,7 @@ class Grackle(Package):
'clib',
'Make.mach.{0}'.format(grackle_architecture)
)
- shutil.copy(template, makefile)
+ copy(template, makefile)
for key, value in substitutions.items():
filter_file(key, value, makefile)
@@ -83,6 +67,8 @@ class Grackle(Package):
make('clean')
make('machine-{0}'.format(grackle_architecture))
make('opt-high')
+ if spec.satisfies("+float"):
+ make('precision-32')
make('show-config')
make()
mkdirp(prefix.lib)