costo: new package and to fix the build, add pkgconfig dep to vtk (#47121)

Co-authored-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
This commit is contained in:
teddy 2024-11-12 17:04:20 +01:00 committed by GitHub
parent 99fd37931c
commit e083acdc5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 52 additions and 2 deletions

View File

@ -0,0 +1,49 @@
# Copyright 2013-2024 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 Costo(CMakePackage):
"""costo stand for COSimulation TOols.
Its a layer above MPI to share data between meshes.
"""
homepage = "https://gitlab.com/Te_ch/costo"
git = "https://gitlab.com/Te_ch/costo.git"
maintainers("tech-91")
license("LGPL-3.0-or-later")
version("0.0.5", tag="v0.0.5", preferred=True)
version("develop", branch="devel")
version("main", branch="main", deprecated=True)
variant("shared", default=True, description="Build shared library")
variant("tests", default=False, description="Enable testing")
depends_on("mpi", type=all)
depends_on("python@3.10:", type=all)
depends_on("py-non-regression-test-tools", type="build")
depends_on("py-pyvista", type=("build", "run"))
depends_on("py-numpy", type=("build", "link", "run"))
depends_on("py-mpi4py", type=("build", "run"))
depends_on("py-scipy", type=("build", "run"))
depends_on("py-mgmetis", type=("build", "run"))
depends_on("py-colorama", type=("build", "run"))
depends_on("py-pip", type="build")
def cmake_args(self):
args = [
# self.define("COSTO_ENABLE_TESTS", "OFF"),
self.define("COSTO_ENABLE_PYTHON_BINDINGS", "OFF"),
self.define("WITH_PYTHON_MODULE", "ON"),
self.define_from_variant("WITH_SHARED_LIBS", "shared"),
self.define_from_variant("WITH_TESTS", "tests"),
]
return args

View File

@ -54,8 +54,9 @@ class Vtk(CMakePackage):
version("6.3.0", sha256="92a493354c5fa66bea73b5fc014154af5d9f3f6cee8d20a826f4cd5d4b0e8a5e")
version("6.1.0", sha256="bd7df10a479606d529a8b71f466c44a2bdd11fd534c62ce0aa44fad91883fa34")
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("pkgconfig", type="build", when="platform=linux")
# VTK7 defaults to OpenGL2 rendering backend
variant("opengl2", default=True, description="Enable OpenGL2 backend")