From 879bdec2850044b9fd180e5220e6632c69dc9b9a Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 18 Aug 2018 11:19:24 -0500 Subject: [PATCH] CBLAS: Don't hardcode BLAS library name (#9017) --- var/spack/repos/builtin/packages/cblas/package.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/cblas/package.py b/var/spack/repos/builtin/packages/cblas/package.py index d5ce17c99d..0917dd70f2 100644 --- a/var/spack/repos/builtin/packages/cblas/package.py +++ b/var/spack/repos/builtin/packages/cblas/package.py @@ -42,10 +42,10 @@ class Cblas(Package): def patch(self): mf = FileFilter('Makefile.in') - mf.filter('^BLLIB =.*', 'BLLIB = %s/libblas.a' % - self.spec['blas'].prefix.lib) + mf.filter('^BLLIB =.*', 'BLLIB = {0}'.format( + ' '.join(self.spec['blas'].libs.libraries))) mf.filter('^CC =.*', 'CC = cc') - mf.filter('^FC =.*', 'FC = f90') + mf.filter('^FC =.*', 'FC = fc') def install(self, spec, prefix): make('all') @@ -53,6 +53,6 @@ def install(self, spec, prefix): mkdirp(prefix.include) # Rename the generated lib file to libcblas.a - install('./lib/cblas_LINUX.a', '%s/libcblas.a' % prefix.lib) - install('./include/cblas.h', '%s' % prefix.include) - install('./include/cblas_f77.h', '%s' % prefix.include) + install('lib/cblas_LINUX.a', prefix.lib.join('libcblas.a')) + install('include/cblas.h', prefix.include) + install('include/cblas_f77.h', prefix.include)