summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-03-20 03:37:30 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-03-20 03:37:30 -0700
commitc0f03506345199c71cc38f5fece3181ba32adad8 (patch)
treee6af5cca8c1df9cc2c80f36020e625edca369d8b
parent6251c97cd5011f71f31587fff6648885fe3dfb2b (diff)
parent620c120503c8c23d10feb14e14d37dfc36f4befb (diff)
downloadspack-c0f03506345199c71cc38f5fece3181ba32adad8.tar.gz
spack-c0f03506345199c71cc38f5fece3181ba32adad8.tar.bz2
spack-c0f03506345199c71cc38f5fece3181ba32adad8.tar.xz
spack-c0f03506345199c71cc38f5fece3181ba32adad8.zip
Merge pull request #583 from davydden/openblas_osx
fix openblas suffix for OS-X
-rw-r--r--var/spack/repos/builtin/packages/openblas/package.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py
index e16d3fe89c..781a1e2ec8 100644
--- a/var/spack/repos/builtin/packages/openblas/package.py
+++ b/var/spack/repos/builtin/packages/openblas/package.py
@@ -1,4 +1,5 @@
from spack import *
+import sys
class Openblas(Package):
"""OpenBLAS: An optimized BLAS library"""
@@ -16,13 +17,14 @@ class Openblas(Package):
make('libs', 'netlib', 'shared', 'CC=cc', 'FC=f77')
make('install', "PREFIX='%s'" % prefix)
+ lib_dsuffix = 'dylib' if sys.platform == 'darwin' else 'so'
# Blas virtual package should provide blas.a and libblas.a
with working_dir(prefix.lib):
symlink('libopenblas.a', 'blas.a')
symlink('libopenblas.a', 'libblas.a')
- symlink('libopenblas.so', 'libblas.so')
+ symlink('libopenblas.%s' % lib_dsuffix, 'libblas.%s' % lib_dsuffix)
# Lapack virtual package should provide liblapack.a
with working_dir(prefix.lib):
symlink('libopenblas.a', 'liblapack.a')
- symlink('libopenblas.so', 'liblapack.so')
+ symlink('libopenblas.%s' % lib_dsuffix, 'liblapack.%s' % lib_dsuffix)