Skip to content

Commit e46659b

Browse files
committed
Remove problematic patch and add Cantera dependency to Spack package
- Delete fix-chemistry-disabled.patch that was causing Fortran compilation errors - Add py-cantera@3: as a build dependency for future chemistry support - Update CI workflow to remove patch file copying - Update SPACK.md documentation to reflect changes
1 parent d00c3d5 commit e46659b

File tree

4 files changed

+5
-32
lines changed

4 files changed

+5
-32
lines changed

.github/workflows/spack.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ jobs:
4040
# Find the actual builtin repo location
4141
BUILTIN_REPO=$(spack repo list | grep builtin | awk '{print $NF}')
4242
echo "Builtin repo location: $BUILTIN_REPO"
43-
# Copy package and patch files to the builtin repo
43+
# Copy package file to the builtin repo
4444
mkdir -p "$BUILTIN_REPO/packages/mfc"
4545
cp packaging/spack/package.py "$BUILTIN_REPO/packages/mfc/"
46-
cp packaging/spack/*.patch "$BUILTIN_REPO/packages/mfc/" 2>/dev/null || true
4746
# Verify package is visible
4847
spack list mfc
4948
# Show package info to confirm it loads
@@ -93,10 +92,9 @@ jobs:
9392
# Find the actual builtin repo location
9493
BUILTIN_REPO=$(spack repo list | grep builtin | awk '{print $NF}')
9594
echo "Builtin repo location: $BUILTIN_REPO"
96-
# Copy package and patch files to the builtin repo
95+
# Copy package file to the builtin repo
9796
mkdir -p "$BUILTIN_REPO/packages/mfc"
9897
cp packaging/spack/package.py "$BUILTIN_REPO/packages/mfc/"
99-
cp packaging/spack/*.patch "$BUILTIN_REPO/packages/mfc/" 2>/dev/null || true
10098
# Verify package is visible
10199
spack list mfc
102100
# Show package info to confirm it loads
@@ -174,10 +172,9 @@ jobs:
174172
# Find the actual builtin repo location
175173
BUILTIN_REPO=$(spack repo list | grep builtin | awk '{print $NF}')
176174
echo "Builtin repo location: $BUILTIN_REPO"
177-
# Copy package and patch files to the builtin repo
175+
# Copy package file to the builtin repo
178176
mkdir -p "$BUILTIN_REPO/packages/mfc"
179177
cp packaging/spack/package.py "$BUILTIN_REPO/packages/mfc/"
180-
cp packaging/spack/*.patch "$BUILTIN_REPO/packages/mfc/" 2>/dev/null || true
181178
# Verify package is visible
182179
spack list mfc
183180

packaging/spack/SPACK.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ Build-time dependencies (required during compilation):
9494
- [email protected] or newer - Build system
9595
- py-fypp - Fortran preprocessor
9696
- [email protected] or newer - Build scripts
97+
- [email protected] or newer - Chemistry library (for future chemistry support)
9798

9899
Runtime dependencies (always required):
99100
- [email protected] or newer - Fast Fourier Transform library
@@ -146,11 +147,6 @@ The package configures the build environment:
146147
- Sets up compiler wrappers for MPI when enabled
147148
- Configures GPU toolchains when GPU variants are selected
148149

149-
### Patches
150-
151-
The package includes patches to fix build issues:
152-
- `fix-chemistry-disabled.patch`: Fixes CMake-only builds by providing a stub `num_species` parameter when chemistry support is disabled (default for CMake builds). This allows `m_derived_types` to compile without requiring the generated `m_thermochem` module.
153-
154150
### CMake Integration
155151

156152
Spack automatically handles CMake configuration:

packaging/spack/fix-chemistry-disabled.patch

Lines changed: 0 additions & 18 deletions
This file was deleted.

packaging/spack/package.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ class Mfc(CMakePackage):
2525
version("master", branch="master")
2626
version("5.1.0", sha256="4684bee6a529287f243f8929fb7edb0dfebbb04df7c1806459761c9a6c9261cf")
2727

28-
# Patches
29-
patch("fix-chemistry-disabled.patch", when="@5.1.0,master")
30-
3128
# Build options
3229
variant("mpi", default=True, description="Build with MPI support")
3330
variant("openacc", default=False, description="Build with OpenACC GPU support")
@@ -44,6 +41,7 @@ class Mfc(CMakePackage):
4441
depends_on("[email protected]:", type="build")
4542
depends_on("py-fypp", type="build")
4643
depends_on("python@3:", type="build")
44+
depends_on("py-cantera@3:", type="build")
4745

4846
# Runtime dependencies
4947
depends_on("fftw@3:", when="~mpi")

0 commit comments

Comments
 (0)