'Adjust OpenFOAM build for spack.
Where needed, apply filter as an alternative to normal patching.'

def patch(self):

    self.rename_source()
    add_extra_files(self, self.common, self.assets)
    edits = {'WM_THIRD_PARTY_DIR': '$WM_PROJECT_DIR/ThirdParty    #SPACK:    No    separate    third-party', 'WM_VERSION': self.version, 'FOAMY_HEX_MESH': ''}
    rewrite_environ_files(edits, posix=join_path('etc', 'bashrc'), cshell=join_path('etc', 'cshrc'))
