suite-sparse: migrate from homebrew/science

Closes #15852.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
FX Coudert 2017-07-22 01:39:52 +02:00
parent b165dab17c
commit 1b09b47adb

26
Formula/suite-sparse.rb Normal file
View file

@ -0,0 +1,26 @@
class SuiteSparse < Formula
desc "Suite of Sparse Matrix Software"
homepage "http://faculty.cse.tamu.edu/davis/suitesparse.html"
url "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.5.5.tar.gz"
sha256 "b9a98de0ddafe7659adffad8a58ca3911c1afa8b509355e7aa58b02feb35d9b6"
depends_on "metis"
def install
args = [
"INSTALL=#{prefix}",
"BLAS=-framework Accelerate", "LAPACK=$(BLAS)",
"MY_METIS_LIB=-L#{Formula["metis"].opt_lib} -lmetis",
"MY_METIS_INC=#{Formula["metis"].opt_include}"
]
system "make", "library", *args
system "make", "install", *args
pkgshare.install "KLU/Demo/klu_simple.c"
end
test do
system ENV.cc, "-o", "test", pkgshare/"klu_simple.c",
"-L#{lib}", "-lsuitesparseconfig", "-lklu"
system "./test"
end
end