homebrew-core/Formula/suite-sparse.rb
Elliot Saba 5a0440df05 suite-sparse 4.0.2
Closes Homebrew/homebrew#14038.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-08-28 13:13:27 -07:00

38 lines
1.1 KiB
Ruby

require 'formula'
class SuiteSparse < Formula
homepage 'http://www.cise.ufl.edu/research/sparse/SuiteSparse'
url 'http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-4.0.2.tar.gz'
sha1 '46b24a28eef4b040ea5a02d2c43e82e28b7d6195'
option "with-metis", "Compile in metis libraries"
depends_on "tbb"
depends_on "metis" if build.include? 'with-metis'
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-metis'
s.remove_make_var! "METIS_PATH"
s.change_make_var! "METIS", Formula.factory("metis").lib + "libmetis.a"
end
s.change_make_var! "INSTALL_LIB", lib
s.change_make_var! "INSTALL_INCLUDE", include
end
system "make library"
lib.mkpath
include.mkpath
system "make install"
end
end