Add music package (#30147)
This commit is contained in:
parent
3835ac0c41
commit
8de726336f
40
var/spack/repos/builtin/packages/music/package.py
Normal file
40
var/spack/repos/builtin/packages/music/package.py
Normal file
@ -0,0 +1,40 @@
|
||||
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import os
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class Music(CMakePackage):
|
||||
"""MUSIC (Multi-Scale Initial Conditions for Cosmological Simulations) introduced in [Hahn and Abel][1]
|
||||
|
||||
[1]: https://arxiv.org/abs/1103.6031
|
||||
"""
|
||||
|
||||
homepage = "https://www-n.oca.eu/ohahn/MUSIC/"
|
||||
git = "https://bitbucket.org/ohahn/music.git"
|
||||
|
||||
maintainers = ["charmoniumQ"]
|
||||
|
||||
version("2021-12-01", commit="6747c54f3b73ec36719c265fd96362849a83cb45")
|
||||
|
||||
variant("hdf5", default=False, description="Compile with HDF5. Some MUSIC output plug-ins---such as ENZO, Arepo and the MUSIC generic format---require HDF5.")
|
||||
variant("single_prec", default=False, description="Enable single-precision")
|
||||
|
||||
depends_on("fftw@3:")
|
||||
depends_on("gsl")
|
||||
depends_on("hdf5", when="+hdf5")
|
||||
|
||||
def cmake_args(self):
|
||||
return [
|
||||
self.define_from_variant("MUSIC_ENABLE_SINGLE_PRECISION", "single_prec")
|
||||
]
|
||||
|
||||
def install(self, spec, prefix):
|
||||
music_exe = os.path.join(self.build_directory, "MUSIC")
|
||||
set_executable(music_exe)
|
||||
mkdirp(prefix.bin)
|
||||
install(music_exe, prefix.bin)
|
Loading…
Reference in New Issue
Block a user