From e0e6133444dcc4724e16065aab4ffcf2d700cf7a Mon Sep 17 00:00:00 2001 From: Martin Pokorny Date: Wed, 7 Jun 2023 15:12:08 -0600 Subject: casacore: add v3.5.0 (#37806) --- .../repos/builtin/packages/casacore/package.py | 42 +++++++++++----------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/var/spack/repos/builtin/packages/casacore/package.py b/var/spack/repos/builtin/packages/casacore/package.py index 7fe08db297..731288afd7 100644 --- a/var/spack/repos/builtin/packages/casacore/package.py +++ b/var/spack/repos/builtin/packages/casacore/package.py @@ -6,17 +6,17 @@ import os from spack.package import * -from spack.pkg.builtin.boost import Boost class Casacore(CMakePackage): """A suite of c++ libraries for radio astronomy data processing.""" homepage = "https://github.com/casacore/casacore" - url = "https://github.com/casacore/casacore/archive/v2.4.1.tar.gz" + url = "https://github.com/casacore/casacore/archive/refs/tags/v3.5.0.tar.gz" maintainers("mpokorny") + version("3.5.0", sha256="63f1c8eff932b0fcbd38c598a5811e6e5397b72835b637d6f426105a183b3f91") version("3.4.0", sha256="31f02ad2e26f29bab4a47a2a69e049d7bc511084a0b8263360e6157356f92ae1") version("3.3.0", sha256="3a714644b908ef6e81489b792cc9b80f6d8267a275e15d38a42a6a5137d39d3d") version("3.2.0", sha256="ae5d3786cb6dfdd7ebc5eecc0c724ff02bbf6929720bc23be43a027978e79a5f") @@ -28,15 +28,17 @@ class Casacore(CMakePackage): depends_on("cmake@3.7.1:", type="build") - variant("openmp", default=False, description="Build OpenMP support") - variant("shared", default=True, description="Build shared libraries") - variant("readline", default=True, description="Build readline support") - # see note below about the reason for disabling the "sofa" variant - # variant('sofa', default=False, description='Build SOFA support') variant("adios2", default=False, description="Build ADIOS2 support") + variant("dysco", default=True, when="@3.5.0:", description="Build Dysco storage manager") variant("fftpack", default=False, description="Build FFTPack") variant("hdf5", default=False, description="Build HDF5 support") + variant("mpi", default=False, description="Use MPI for parallel I/O") + variant("openmp", default=False, description="Build OpenMP support") variant("python", default=False, description="Build python support") + variant("readline", default=True, description="Build readline support") + variant("shared", default=True, description="Build shared libraries") + variant("tablelocking", default=True, description="Enable table locking") + variant("threads", default=True, description="Use mutex thread synchronization") # Force dependency on readline in v3.2 and earlier. Although the # presence of readline is tested in CMakeLists.txt, and casacore @@ -53,33 +55,34 @@ class Casacore(CMakePackage): depends_on("wcslib@4.20:+cfitsio") depends_on("fftw@3.0.0: precision=float,double", when="@3.4.0:") depends_on("fftw@3.0.0: precision=float,double", when="~fftpack") - # SOFA dependency suffers the same problem in CMakeLists.txt as readline; - # force a dependency when building unit tests depends_on("sofa-c", type="test") depends_on("hdf5", when="+hdf5") depends_on("adios2+mpi", when="+adios2") - depends_on("mpi", when="+adios2") + depends_on("mpi", when="+mpi") depends_on("python@2.6:", when="+python") - depends_on("boost+python", when="+python") - - # TODO: replace this with an explicit list of components of Boost, - # for instance depends_on('boost +filesystem') - # See https://github.com/spack/spack/pull/22303 for reference - depends_on(Boost.with_default_variants, when="+python") + depends_on("boost +python", when="+python") + depends_on("boost +system +filesystem", when="+dysco") depends_on("py-numpy", when="+python") + depends_on("gsl", when="+dysco") + + conflicts("~mpi", when="+adios2") + conflicts("+tablelocking", when="+mpi") + conflicts("~threads", when="+openmp") def cmake_args(self): args = [] spec = self.spec + args.append(self.define_from_variant("BUILD_DYSCO", "dysco")) + args.append(self.define_from_variant("ENABLE_TABLELOCKING", "tablelocking")) args.append(self.define_from_variant("ENABLE_SHARED", "shared")) + args.append(self.define_from_variant("USE_THREADS", "threads")) args.append(self.define_from_variant("USE_OPENMP", "openmp")) args.append(self.define_from_variant("USE_READLINE", "readline")) args.append(self.define_from_variant("USE_HDF5", "hdf5")) args.append(self.define_from_variant("USE_ADIOS2", "adios2")) - args.append(self.define_from_variant("USE_MPI", "adios2")) - if spec.satisfies("+adios2"): - args.append(self.define("ENABLE_TABLELOCKING", False)) + args.append(self.define_from_variant("USE_MPI", "mpi")) + args.append("-DPORTABLE=ON") # let Spack determine arch build flags # fftw3 is required by casacore starting with v3.4.0, but the # old fftpack is still available. For v3.4.0 and later, we @@ -89,7 +92,6 @@ class Casacore(CMakePackage): if spec.satisfies("@3.4.0:"): if spec.satisfies("+fftpack"): args.append("-DBUILD_FFTPACK_DEPRECATED=YES") - args.append(self.define("USE_FFTW3", True)) else: args.append(self.define("USE_FFTW3", spec.satisfies("~fftpack"))) -- cgit v1.2.3-70-g09d2