'Make adjustments to the OpenFOAM configuration files in their various
locations: etc/bashrc, etc/config.sh/FEATURE and customizations that
don\'t properly fit get placed in the etc/prefs.sh file (similiarly for
csh).'

def configure(self, spec, prefix):

    self.etc_prefs = {'000': {'compilerInstall': 'System'}, '001': {}, 'cmake': {'CMAKE_DIR': spec['cmake'].prefix, 'CMAKE_BIN_DIR': spec['cmake'].prefix.bin}, 'python': {'PYTHON_DIR': spec['python'].home, 'PYTHON_BIN_DIR': spec['python'].home.bin}, 'flex': {'FLEX_SYSTEM': 1, 'FLEX_DIR': spec['flex'].prefix}, 'bison': {'BISON_SYSTEM': 1, 'BISON_DIR': spec['flex'].prefix}, 'zlib': {'ZLIB_SYSTEM': 1, 'ZLIB_DIR': spec['zlib'].prefix}}
    self.etc_prefs['001'].update(self.foam_arch.foam_dict())
    if (('+scotch' in spec) or ('+ptscotch' in spec)):
        pkg = spec['scotch'].prefix
        self.etc_prefs['scotch'] = {'SCOTCH_SYSTEM': 1, 'SCOTCH_DIR': pkg, 'SCOTCH_BIN_DIR': pkg.bin, 'SCOTCH_LIB_DIR': pkg.lib, 'SCOTCH_INCLUDE_DIR': pkg.include}
    if ('+metis' in spec):
        pkg = spec['metis'].prefix
        self.etc_prefs['metis'] = {'METIS_SYSTEM': 1, 'METIS_DIR': pkg, 'METIS_BIN_DIR': pkg.bin, 'METIS_LIB_DIR': pkg.lib, 'METIS_INCLUDE_DIR': pkg.include}
    if ('+parmetis' in spec):
        pkg = spec['parmetis'].prefix
        self.etc_prefs['parametis'] = {'PARMETIS_SYSTEM': 1, 'PARMETIS_DIR': pkg, 'PARMETIS_BIN_DIR': pkg.bin, 'PARMETIS_LIB_DIR': pkg.lib, 'PARMETIS_INCLUDE_DIR': pkg.include}
    if ('+parmgridgen' in spec):
        pkg = spec['parmgridgen'].prefix
        self.etc_prefs['parmgridgen'] = {'PARMGRIDGEN_SYSTEM': 1, 'PARMGRIDGEN_DIR': pkg, 'PARMGRIDGEN_BIN_DIR': pkg.bin, 'PARMGRIDGEN_LIB_DIR': pkg.lib, 'PARMGRIDGEN_INCLUDE_DIR': pkg.include}
    if ('+paraview' in self.spec):
        self.etc_prefs['paraview'] = {'PARAVIEW_SYSTEM': 1, 'PARAVIEW_DIR': spec['paraview'].prefix, 'PARAVIEW_BIN_DIR': spec['paraview'].prefix.bin}
        self.etc_prefs['qt'] = {'QT_SYSTEM': 1, 'QT_DIR': spec['qt'].prefix, 'QT_BIN_DIR': spec['qt'].prefix.bin}
    write_environ(self.etc_prefs, posix=join_path('etc', 'prefs.sh'), cshell=join_path('etc', 'prefs.csh'))
