From 9b654fe60c1b3037a7ee5d52869a70d70e9ee390 Mon Sep 17 00:00:00 2001 From: Nikolay Simakov Date: Fri, 28 Aug 2020 15:29:53 -0400 Subject: namd: added patching charmrun location, as it stored in prefix.bin (#18355) --- var/spack/repos/builtin/packages/namd/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/namd/package.py b/var/spack/repos/builtin/packages/namd/package.py index 19863becbe..f6a883cc24 100644 --- a/var/spack/repos/builtin/packages/namd/package.py +++ b/var/spack/repos/builtin/packages/namd/package.py @@ -142,6 +142,15 @@ class Namd(MakefilePackage): config(self.build_directory, *opts) + # patch Make.config if needed + # spack install charmpp straight to prefix + # (not to $(CHARMBASE)/$(CHARMARCH)) + if not os.path.exists(join_path( + self.spec['charmpp'].prefix, self.spec['charmpp'].charmarch)): + filter_file(r"^CHARM = \$\(CHARMBASE\)/\$\(CHARMARCH\)", + "CHARM = $(CHARMBASE)", + join_path(self.build_directory, "Make.config")) + def install(self, spec, prefix): with working_dir(self.build_directory): mkdirp(prefix.bin) -- cgit v1.2.3-70-g09d2