summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoffrey Oxberry <oxberry1@llnl.gov>2020-11-29 11:04:16 -0800
committerGitHub <noreply@github.com>2020-11-29 20:04:16 +0100
commit073e7569db0631ecfccb2c52cfc0ad83847d62be (patch)
treeb1ea04d34e7bd40d2c81deb7ec218e7837b2d99f
parentb96a251c3de2e9feb23decb29e7820b1e97c3f2a (diff)
downloadspack-073e7569db0631ecfccb2c52cfc0ad83847d62be.tar.gz
spack-073e7569db0631ecfccb2c52cfc0ad83847d62be.tar.bz2
spack-073e7569db0631ecfccb2c52cfc0ad83847d62be.tar.xz
spack-073e7569db0631ecfccb2c52cfc0ad83847d62be.zip
mfem: apply patches from #19452 when mfem@4.1: (#20151)
As part of pull request #19452, a patch method was added to the mfem package to delete byte order marks from 3 mfem source files. These files first appeared in a stable release of mfem as of version 4.1. Consequently, attempts to install mfem 3.4 or mfem 4.0 fail because no files exist at the path arguments of the filter_file commands used to execute this operation. Decorating the patch method so it runs only on mfem versions 4.1 and later resolves the errors that were thrown due to files not found. This commit adds that decorator.
-rw-r--r--var/spack/repos/builtin/packages/mfem/package.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py
index a04c5bb4ce..22b344a28b 100644
--- a/var/spack/repos/builtin/packages/mfem/package.py
+++ b/var/spack/repos/builtin/packages/mfem/package.py
@@ -697,6 +697,9 @@ class Mfem(Package):
if install_em:
install_tree('data', join_path(prefix_share, 'data'))
+ # The files referenced in this patch method do not exist in stable
+ # versions earlier than 4.1.
+ @when('@4.1:')
def patch(self):
# Remove the byte order mark since it messes with some compilers
filter_file(u'\uFEFF', '', 'fem/gslib.hpp')