diff options
author | Erik <epalmer@lbl.gov> | 2022-06-06 08:01:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-06 14:01:57 +0200 |
commit | 73ce789390619cf46bc1508fe462a67491230e75 (patch) | |
tree | b8febd91bd7dae1b0433190da6cde7aca141a92d | |
parent | e4f3cfcc3a985a24541c66988675c1423023ddec (diff) | |
download | spack-73ce789390619cf46bc1508fe462a67491230e75.tar.gz spack-73ce789390619cf46bc1508fe462a67491230e75.tar.bz2 spack-73ce789390619cf46bc1508fe462a67491230e75.tar.xz spack-73ce789390619cf46bc1508fe462a67491230e75.zip |
amrvis: add configuration file and default color palette (#30942)
-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) |