summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Cortial <101571984+jcortial-safran@users.noreply.github.com>2024-03-29 18:27:33 +0100
committerGitHub <noreply@github.com>2024-03-29 18:27:33 +0100
commit8bd6283b52f1ddb88710be220bdfaf8b83947507 (patch)
tree02154b39a62ade509890a74b453de5e6dae6fde8
parent179e4f3ad138c664dd0387e2998d87895e744518 (diff)
downloadspack-8bd6283b52f1ddb88710be220bdfaf8b83947507.tar.gz
spack-8bd6283b52f1ddb88710be220bdfaf8b83947507.tar.bz2
spack-8bd6283b52f1ddb88710be220bdfaf8b83947507.tar.xz
spack-8bd6283b52f1ddb88710be220bdfaf8b83947507.zip
med: add v4.1.1, and v5.0.0, update package recipe (#43409)
-rw-r--r--var/spack/repos/builtin/packages/med/package.py57
1 files changed, 43 insertions, 14 deletions
diff --git a/var/spack/repos/builtin/packages/med/package.py b/var/spack/repos/builtin/packages/med/package.py
index 1d8aab4f53..48cd8a82a3 100644
--- a/var/spack/repos/builtin/packages/med/package.py
+++ b/var/spack/repos/builtin/packages/med/package.py
@@ -16,34 +16,63 @@ class Med(CMakePackage):
license("LGPL-3.0-only")
- # 4.1.0 does not compile in static mode
- version("4.1.0", sha256="847db5d6fbc9ce6924cb4aea86362812c9a5ef6b9684377e4dd6879627651fce")
+ version(
+ "5.0.0",
+ sha256="267e76d0c67ec51c10e3199484ec1508baa8d5ed845c628adf660529dce7a3d4",
+ url="https://files.salome-platform.org/Salome/medfile/med-5.0.0.tar.bz2",
+ )
+ version(
+ "4.1.1",
+ sha256="a082b705d1aafe95d3a231d12c57f0b71df554c253e190acca8d26fc775fb1e6",
+ url="https://files.salome-platform.org/Salome/medfile/med-4.1.1.tar.gz",
+ )
+ # Older versions are no more available from the official provider
+ version(
+ "4.1.0",
+ sha256="847db5d6fbc9ce6924cb4aea86362812c9a5ef6b9684377e4dd6879627651fce",
+ deprecated=True,
+ )
version(
"4.0.0",
sha256="a474e90b5882ce69c5e9f66f6359c53b8b73eb448c5f631fa96e8cd2c14df004",
- preferred=True,
+ deprecated=True,
+ )
+ version(
+ "3.2.0",
+ sha256="d52e9a1bdd10f31aa154c34a5799b48d4266dc6b4a5ee05a9ceda525f2c6c138",
+ deprecated=True,
)
- version("3.2.0", sha256="d52e9a1bdd10f31aa154c34a5799b48d4266dc6b4a5ee05a9ceda525f2c6c138")
variant("api23", default=True, description="Enable API2.3")
variant("mpi", default=True, description="Enable MPI")
variant("shared", default=False, description="Builds a shared version of the library")
variant("fortran", default=False, description="Enable Fortran support")
+ variant("doc", default=False, description="Install documentation")
+ variant("python", default=False, description="Build Python bindings")
+
+ depends_on("hdf5@:1.8.22", when="@3.2.0")
+ depends_on("hdf5@1.10.2:1.10.7", when="@4")
+ depends_on("hdf5@1.12.1:1.12", when="@5:")
+ depends_on("hdf5~mpi", when="~mpi")
+ depends_on("hdf5+mpi", when="+mpi")
depends_on("mpi", when="+mpi")
- depends_on("hdf5@:1.8.22+mpi", when="@3.2.0+mpi")
- depends_on("hdf5@1.10.2:1.10.7+mpi", when="@4.0.0:+mpi")
- depends_on("hdf5@:1.8.22~mpi", when="@3.2.0~mpi")
- depends_on("hdf5@1.10.2:1.10.7~mpi", when="@4.0.0:~mpi")
- # the "TARGET hdf5" patch below only works with HDF5 shared library builds
- depends_on("hdf5+shared", when="@4.0.0:4.1.99")
+
+ depends_on("doxygen", type="build", when="+doc")
+
+ depends_on("swig", type="build", when="+python")
+ depends_on("python", when="+python")
+ conflicts("~shared", when="+python", msg="Python bindings require shared libraries")
conflicts("@4.1.0", when="~shared", msg="Link error when static")
# C++11 requires a space between literal and identifier
patch("add_space.patch", when="@3.2.0")
- # fix problem where CMake "could not find TARGET hdf5"
- patch("med-4.1.0-hdf5-target.patch", when="@4.0.0:4.1.99")
+
+ # Fix problem where CMake "could not find TARGET hdf5"
+ # The patch only works with HDF5 shared library builds
+ patch("med-4.1.0-hdf5-target.patch", when="@4.0.0:4.1.0")
+ depends_on("hdf5+shared", when="@4.0.0:4.1.0")
def patch(self):
# resembles FindSalomeHDF5.patch as in salome-configuration
@@ -61,8 +90,8 @@ class Med(CMakePackage):
options = [
self.define("HDF5_ROOT_DIR", spec["hdf5"].prefix),
self.define("MEDFILE_BUILD_TESTS", self.run_tests),
- self.define("MEDFILE_BUILD_PYTHON", False),
- self.define("MEDFILE_INSTALL_DOC", False),
+ self.define_from_variant("MEDFILE_BUILD_PYTHON", "python"),
+ self.define_from_variant("MEDFILE_INSTALL_DOC", "doc"),
]
if "~fortran" in spec:
options.append("-DCMAKE_Fortran_COMPILER=")