Back-port a patch for filesystem logic in gmx executable. (#35672)

* Backport a patch for relocatable `gmx` executable.

* spack style fixes
This commit is contained in:
M. Eric Irrgang 2023-03-01 00:18:00 +03:00 committed by GitHub
parent 043a80ff9e
commit b109e16fba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -273,6 +273,15 @@ def patch(self):
"#include <queue>\n#include <limits>",
"src/gromacs/modularsimulator/modularsimulator.h",
)
# Ref: https://gitlab.com/gromacs/gromacs/-/merge_requests/3504
if self.spec.satisfies("@2023"):
filter_file(
" if (std::filesystem::equivalent(searchPath, buildBinPath))",
" if (std::error_code c; std::filesystem::equivalent(searchPath,"
" buildBinPath, c))",
"src/gromacs/commandline/cmdlineprogramcontext.cpp",
string=True,
)
if "+plumed" in self.spec:
self.spec["plumed"].package.apply_patch(self)