diff options
-rw-r--r-- | var/spack/repos/builtin/packages/amrvis/package.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/amrvis/package.py b/var/spack/repos/builtin/packages/amrvis/package.py index f10f5719b0..9b63bbbdbd 100644 --- a/var/spack/repos/builtin/packages/amrvis/package.py +++ b/var/spack/repos/builtin/packages/amrvis/package.py @@ -16,6 +16,8 @@ class Amrvis(MakefilePackage): homepage = "https://github.com/AMReX-Codes/Amrvis" git = "https://github.com/AMReX-Codes/Amrvis.git" + maintainers = ['etpalmer63'] + version('main', tag='main') variant( @@ -158,6 +160,14 @@ class Amrvis(MakefilePackage): '# Spack removed INCLUDE_LOCATIONS and LIBRARY_LOCATIONS' ) + # Rewrite configuration file with location of + # the color palette after install + configfile = FileFilter("amrvis.defaults") + configfile.filter( + r'^palette\s*Palette\s*', + 'palette {0}/etc/Palette\n'.format(prefix) + ) + # Read GNUmakefile into array with open('GNUmakefile', 'r') as file: contents = file.readlines() @@ -194,8 +204,15 @@ class Amrvis(MakefilePackage): env.set('CXX', self.spec['mpi'].mpicxx) env.set('F77', self.spec['mpi'].mpif77) env.set('FC', self.spec['mpi'].mpifc) + # Set CONFIG_FILEPATH so Amrvis can find the configuration + # file, amrvis.defaults. + env.set('CONFIG_FILEPATH', self.spec.prefix.etc) def install(self, spec, prefix): # Install exe manually mkdirp(prefix.bin) install('*.ex', prefix.bin) + # Install configuration file and default color Palette + mkdirp(prefix.etc) + install('amrvis.defaults', prefix.etc) + install('Palette', prefix.etc) |