Added heyoka and mppp packages (#41839)

This commit is contained in:
Alex Seaton 2024-01-29 03:03:48 -07:00 committed by GitHub
parent 8e9bce44cc
commit 5b6a289d30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 186 additions and 0 deletions

View File

@ -0,0 +1,75 @@
# Copyright 2013-2023 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)
from spack.package import *
class Heyoka(CMakePackage):
"""heyoka is a C++ library for integration of ODEs via Taylors method"""
homepage = "https://bluescarni.github.io/heyoka"
url = "https://github.com/bluescarni/heyoka/archive/refs/tags/v3.2.0.tar.gz"
# A list of GitHub accounts to notify when the package is updated.
maintainers("bluescarni", "agseaton")
# SPDX identifier of the project's license.
license("MPL-2.0")
version("3.2.0", sha256="37db24fbaf0e65d740ffb20f76ac1c8ab9fbd6893dc87dfd483c965b71dbf465")
version("3.1.0", sha256="7eecab47f44a9fff022cf24f226763dab8b075a9fdaa543a42f64bb2634b3ad8")
version("3.0.0", sha256="03ccb6fb015ad43877781763c0f2f49bd6db64c8b9493174e589c970ef00d7f2")
version("2.0.0", sha256="418ce55557496d3ff1383e8b64663661d9b6a5f39dc7080e401d6537db0c4cd2")
version("1.0.0", sha256="96f2e049e0518c49dbe224fc268ab1ad80abeaa306e2fe7a30e2acffb79c04af")
version("0.21.0", sha256="16d22e99397139d25b2a0c418a654e9cba3684c7eb28933791526bb163f50f27")
version("0.20.1", sha256="7abd68d319dd2740ca8440d41602ceefb45809d6fadbbf31728c5cb003511f8c")
version("0.20.0", sha256="d6b4601ee28fc2dbb84c317bbe2619c776ce448f782c045a801dfa46b0d5e52c")
version("0.19.0", sha256="7a7634379233be778fd6b15090df287787cc429314ec521d0336cdc1ae26642a")
version("0.18.0", sha256="2a14a988d973d9a76424df05d38f89ae64f7a1e1c12131022e338fe2de2dcb94")
# Define variants of the package
variant("mppp", default=False, description="enable features relying on the mp++ library")
variant("sleef", default=False, description="enable features relying on the SLEEF library")
variant("tests", default=False, description="build the test suite")
variant("benchmarks", default=False, description="build the benchmarking suite")
variant("tutorials", default=False, description="build the tutorials")
variant(
"static",
default=False,
description=("build heyoka as a static library, instead of a dynamic library"),
)
# Dependencies
# Build dependencies
depends_on("cmake@3.18:", type="build")
# Required dependencies
depends_on("llvm@13:17")
depends_on("boost@1.69: +serialization")
depends_on("fmt@9:10")
depends_on("spdlog +fmt_external")
depends_on("intel-tbb@2021.4.0:")
# Optional dependencies
depends_on("boost@1.69: +serialization +program_options", when="+benchmarks")
depends_on("mppp@1 +serialization +fmt +mpfr +mpc", when="+mppp")
depends_on("sleef", when="+sleef")
depends_on("xtensor", when="+benchmarks")
depends_on("xtensor-blas", when="+benchmarks")
depends_on("xtensor", when="+tests")
depends_on("xtensor-blas", when="+tests")
def cmake_args(self):
args = [
self.define_from_variant("HEYOKA_WITH_MPPP", "mppp"),
self.define_from_variant("HEYOKA_WITH_SLEEF", "sleef"),
self.define_from_variant("HEYOKA_BUILD_TESTS", "tests"),
self.define_from_variant("HEYOKA_BUILD_BENCHMARKS", "benchmarks"),
self.define_from_variant("HEYOKA_BUILD_TUTORIALS", "tutorials"),
self.define_from_variant("HEYOKA_BUILD_STATIC_LIBRARY", "static"),
self.define_from_variant("HEYOKA_ENABLE_IPO", "ipo"),
]
return args

View File

@ -0,0 +1,111 @@
# Copyright 2013-2023 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)
from spack.package import *
class Mppp(CMakePackage):
"""mp++ is a C++11/14/17/20 library for multiprecision arithmetic"""
# URL for package's homepage.
homepage = "https://bluescarni.github.io/mppp/index.html"
url = "https://github.com/bluescarni/mppp/archive/refs/tags/v1.0.1.tar.gz"
# List of GitHub accounts to notify when the package is updated.
maintainers("bluescarni", "agseaton")
# SPDX identifier of the project's license.
license("MPL-2.0")
version("1.0.1", sha256="90e8758bad2d9ebec04305d9cc394168de7bd563acc290e273dd68467e07de07")
version("1.0.0", sha256="e58b1a5fb8bdf095261eeb0861c3f46f96c71c4b043d19700e73ce3e4e639268")
version("0.27", sha256="a1e04f6605b3242d4361742159cf5ab273162fd7c105c2743a9bebcf44c846c3")
version("0.26", sha256="4dbfa68802d9a1365eda884f085418afc147d01b7a928e8333e4dcc1c3b3ce9e")
version("0.25", sha256="3e6142acd5c6d71405537311b0c800b6fa27a009a46af538ad07b7e6a115f95d")
version("0.24", sha256="c84cbe38545b7f3f20688791e0a7ce4020830ed84ab6a109ab13a208745be9dc")
version("0.23", sha256="76f4ee484afae4dbe00f4b0bf91063e4d5dc3eb2bbf5d34ecf174821965d5910")
version("0.22", sha256="92e34a393c7b6e61daec6a26827a2b73b9b61d961ab37bcabbf051cc7ff19ad2")
version("0.21", sha256="49a05fc6874a800cb42a3ac16eb46a50583f0b59d3b54008c58af766186a8c69")
version("0.20", sha256="c736daeaac30e38e1c09a19d249209ad49f8ec92ab1315a8fb9a47cc1f54e607")
variant(
"mpfr",
default=True,
description=(
"Enable features relying on GNU MPFR library. Used in the"
" implementation of the real class and for providing "
"support for the long double type in integer and "
"rational"
),
)
variant(
"mpc",
default=True,
when="+mpfr",
description=(
"Enable features relying on the GNU MPC library. Used in "
"the implementation of the complex class."
),
)
variant(
"quadmath",
default=False,
description=(
"Enable features relying on the GNU quadmath library. "
"Used in the implementation of the real128 and complex128"
" classes."
),
)
variant(
"serialization",
default=False,
when="@0.22:",
description="Enable support for serialization via the Boost.serialization library",
)
variant(
"fmt",
default=True,
when="@0.27:",
description="Enable support for formatting via the fmt library",
)
variant("tests", default=False, description="Build the test suite")
variant(
"benchmarks",
default=False,
when="+serialization +fmt",
description="Build the benchmarking suite",
)
variant(
"static",
default=False,
description="build mp++ as a static library, instead of a dynamic library",
)
# Dependencies
depends_on("cmake@3.8:", type="build")
# Required dependencies
depends_on("gmp@5:")
# Optional dependencies
depends_on("mpfr@3:", when="+mpfr")
depends_on("mpc", when="+mpc")
depends_on("gcc", when="+quadmath")
depends_on("boost@1.69: +serialization", when="+serialization")
depends_on("fmt@6.2:", when="+fmt")
def cmake_args(self):
args = [
self.define_from_variant("MPPP_WITH_MPFR", "mpfr"),
self.define_from_variant("MPPP_WITH_MPC", "mpc"),
self.define_from_variant("MPPP_WITH_QUADMATH", "quadmath"),
self.define_from_variant("MPPP_WITH_BOOST_S11N", "serialization"),
self.define_from_variant("MPPP_WITH_FMT", "fmt"),
self.define_from_variant("MPPP_BUILD_TESTS", "tests"),
self.define_from_variant("MPPP_BUILD_BENCHMARKS", "benchmarks"),
self.define_from_variant("MPPP_BUILD_STATIC_LIBRARY", "static"),
self.define_from_variant("MPPP_ENABLE_IPO", "ipo"),
]
return args