Skip to content

Commit e6acd11

Browse files
author
steven varga
committed
Merge remote-tracking branch 'origin/40-build-add-spack-package-recipe' into staging
2 parents 702ff0c + c310b23 commit e6acd11

3 files changed

Lines changed: 61 additions & 0 deletions

File tree

spack/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Spack Package for h5cpp-compiler
2+
3+
This directory contains a custom Spack repository with the `h5cpp-compiler` package recipe.
4+
5+
## Adding the repository
6+
7+
```bash
8+
spack repo add /path/to/h5cpp-compiler/spack
9+
```
10+
11+
## Installing the package
12+
13+
```bash
14+
spack install h5cpp-compiler
15+
```
16+
17+
## Notes
18+
19+
- The recipe depends on `llvm +clang` because h5cpp-compiler uses Clang LibTooling.
20+
- CMake 3.14+ and Ninja are required at build time.
21+
- Tests are disabled during the Spack build (`H5CPP_BUILD_TESTS=OFF`).
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
2+
# Spack Project Developers. See the top-level COPYRIGHT file for details.
3+
#
4+
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
5+
6+
from spack.package import *
7+
8+
9+
class H5cppCompiler(CMakePackage):
10+
"""h5cpp-compiler is a CLI build-time tool that uses LLVM/Clang LibTooling
11+
to generate HDF5 C++ bindings from annotated source code.
12+
"""
13+
14+
homepage = "https://github.com/vargalabs/h5cpp-compiler"
15+
git = "https://github.com/vargalabs/h5cpp-compiler.git"
16+
url = "https://github.com/vargalabs/h5cpp-compiler/archive/refs/tags/v1.12.6.tar.gz"
17+
18+
maintainers("steven-varga")
19+
20+
license("MIT", checked_by="steven-varga")
21+
22+
version("1.12.6", sha256="c5f5829cec4908ad93647c17f27d0a82b75a5413fcad8c99232ba2034d0149a2")
23+
version("1.12.5", sha256="f8990bcbfe90a037b66535c36d6e06e7451491c4cdc9c6fae4dfc15d1b3812be")
24+
version("1.12.4", sha256="77461c9a482c5460a246724a479c803b011a6f95b94801493816d2c3ca70c732")
25+
version("1.12.3", sha256="d7eefa490746b361e83df166f50ea9133919224e5e81f893ad4e41176d310371")
26+
27+
depends_on("cmake@3.14:", type="build")
28+
depends_on("ninja", type="build")
29+
30+
# The project targets LLVM 20 and requires the Clang component (LibTooling).
31+
# Spack's llvm package provides clang via the +clang variant.
32+
depends_on("llvm +clang")
33+
34+
def cmake_args(self):
35+
args = [
36+
self.define("H5CPP_BUILD_TESTS", "OFF"),
37+
]
38+
return args

spack/repo.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
repo:
2+
namespace: vargalabs

0 commit comments

Comments
 (0)