From 8de726336f5b827b31e84b48b09955a99502a463 Mon Sep 17 00:00:00 2001 From: Sam Grayson Date: Mon, 18 Apr 2022 20:51:13 -0500 Subject: Add music package (#30147) --- var/spack/repos/builtin/packages/music/package.py | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 var/spack/repos/builtin/packages/music/package.py diff --git a/var/spack/repos/builtin/packages/music/package.py b/var/spack/repos/builtin/packages/music/package.py new file mode 100644 index 0000000000..e483d279b9 --- /dev/null +++ b/var/spack/repos/builtin/packages/music/package.py @@ -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) -- cgit v1.2.3-70-g09d2