Working ARPACK package.

This commit is contained in:
Todd Gamblin 2015-06-06 14:57:52 -07:00
parent 03780ea105
commit b9746de52e

View file

@ -1,4 +1,6 @@
from spack import * from spack import *
import os
import shutil
class Arpack(Package): class Arpack(Package):
"""A collection of Fortran77 subroutines designed to solve large scale """A collection of Fortran77 subroutines designed to solve large scale
@ -14,15 +16,16 @@ class Arpack(Package):
def patch(self): def patch(self):
# Filter the cray makefile to make a spack one. # Filter the cray makefile to make a spack one.
move('ARMAKES/ARmake.CRAY', 'ARmake.inc') shutil.move('ARMAKES/ARmake.CRAY', 'ARmake.inc')
makefile = FileFilter('ARmake.inc') makefile = FileFilter('ARmake.inc')
# Be sure to use Spack F77 wrapper # Be sure to use Spack F77 wrapper
makefile.filter('^FC.*', 'FC = f77') makefile.filter('^FC.*', 'FC = f77')
makefile.filter('^FFLAGS.*', 'FFLAGS = -O2 -g')
# Set up some variables. # Set up some variables.
makefile.filter('^PLAT.*', 'PLAT = ') makefile.filter('^PLAT.*', 'PLAT = ')
makefile.filter('^home =.*', 'home = %s' % pwd()) makefile.filter('^home.*', 'home = %s' % os.getcwd())
makefile.filter('^BLASdir.*', 'BLASdir = %s' % self.spec['blas'].prefix) makefile.filter('^BLASdir.*', 'BLASdir = %s' % self.spec['blas'].prefix)
makefile.filter('^LAPACKdir.*', 'LAPACKdir = %s' % self.spec['lapack'].prefix) makefile.filter('^LAPACKdir.*', 'LAPACKdir = %s' % self.spec['lapack'].prefix)
@ -31,5 +34,6 @@ def patch(self):
def install(self, spec, prefix): def install(self, spec, prefix):
mkdirp(self.prefix.lib)
with working_dir('SRC'): with working_dir('SRC'):
make('all') make('all')