diff options
| author | Samuel John | 2012-12-07 00:47:45 +0100 |
|---|---|---|
| committer | Adam Vandenberg | 2013-01-04 09:21:50 -0800 |
| commit | 1d093f49bd5b0cda14d3251b43c56f17ebd0b67b (patch) | |
| tree | e4fc7201c5050dfcfea6c7b956f31972d3c2190c /Library/Formula | |
| parent | ad2d040c9efe26362725994f8d68cbb7c66abd04 (diff) | |
| download | homebrew-1d093f49bd5b0cda14d3251b43c56f17ebd0b67b.tar.bz2 | |
suite-sparse: with-openblas
Closes #16454.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/suite-sparse.rb | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/Library/Formula/suite-sparse.rb b/Library/Formula/suite-sparse.rb index 4cb10683d..b6e064175 100644 --- a/Library/Formula/suite-sparse.rb +++ b/Library/Formula/suite-sparse.rb @@ -5,20 +5,33 @@ class SuiteSparse < Formula url 'http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-4.0.2.tar.gz' sha1 '46b24a28eef4b040ea5a02d2c43e82e28b7d6195' + option "without-tbb", "Do not link with tbb (Threading Building Block)" option "with-metis", "Compile in metis libraries" + option "with-openblas", "Use openblas instead of Apple's Accelerate.framework" - depends_on "tbb" - depends_on "metis" if build.include? 'with-metis' + depends_on "tbb" unless build.include? "without-tbb" + # Metis is optional for now because of + # cholmod_metis.c:164:21: error: use of undeclared identifier 'idxtype' + depends_on "metis" if build.include? "with-metis" + depends_on "homebrew/science/openblas" if build.include? "with-openblas" def install # SuiteSparse doesn't like to build in parallel ENV.j1 inreplace 'SuiteSparse_config/SuiteSparse_config.mk' do |s| - s.change_make_var! "BLAS", "-Wl,-framework -Wl,Accelerate" - s.change_make_var! "LAPACK", "$(BLAS)" - s.change_make_var! "SPQR_CONFIG", "-DHAVE_TBB" - s.change_make_var! "TBB", "-ltbb" + if build.include? 'with-openblas' + s.change_make_var! "BLAS", "-lopenblas" + s.change_make_var! "LAPACK", "$(BLAS)" + else + s.change_make_var! "BLAS", "-Wl,-framework -Wl,Accelerate" + s.change_make_var! "LAPACK", "$(BLAS)" + end + + unless build.include? "without-tbb" + s.change_make_var! "SPQR_CONFIG", "-DHAVE_TBB" + s.change_make_var! "TBB", "-ltbb" + end if build.include? 'with-metis' s.remove_make_var! "METIS_PATH" |
