aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/suite-sparse.rb
diff options
context:
space:
mode:
authorElliot Saba2012-08-22 15:11:30 -0700
committerAdam Vandenberg2012-08-28 13:13:27 -0700
commitc223692741cd3f5e983e55cd1502aeb2af641ab7 (patch)
tree45df8319c801e9f34dbf5d910c625ec9064407bd /Library/Formula/suite-sparse.rb
parentb63e0637fe9723fd5bf360c2e46bc951d5ebe034 (diff)
downloadhomebrew-c223692741cd3f5e983e55cd1502aeb2af641ab7.tar.bz2
suite-sparse 4.0.2
Closes #14038. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/suite-sparse.rb')
-rw-r--r--Library/Formula/suite-sparse.rb32
1 files changed, 11 insertions, 21 deletions
diff --git a/Library/Formula/suite-sparse.rb b/Library/Formula/suite-sparse.rb
index bd08d43a3..4cb10683d 100644
--- a/Library/Formula/suite-sparse.rb
+++ b/Library/Formula/suite-sparse.rb
@@ -2,38 +2,29 @@ require 'formula'
class SuiteSparse < Formula
homepage 'http://www.cise.ufl.edu/research/sparse/SuiteSparse'
- url 'http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-3.7.0.tar.gz'
- md5 'ecb1d1cc1101cf31f077bab46678e791'
+ 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 "metis"
depends_on "tbb"
+ depends_on "metis" if build.include? 'with-metis'
def install
# SuiteSparse doesn't like to build in parallel
ENV.j1
- # So, SuiteSparse was written by a scientific researcher. This
- # tends to result in makefile-based build systems that are completely
- # ignorant of the existence of things such as CPPFLAGS and LDFLAGS.
- # SuiteSparse Does The Right Thing™ when homebrew is in /usr/local
- # but if it is not, we have to piggyback some stuff in on CFLAGS.
- unless HOMEBREW_PREFIX.to_s == '/usr/local'
- ENV['CFLAGS'] += " -isystem #{HOMEBREW_PREFIX}/include -L#{HOMEBREW_PREFIX}/lib"
- end
-
- # Some of the suite-sparse libraries use Metis
- metis = Formula.factory("metis")
-
- inreplace 'UFconfig/UFconfig.mk' do |s|
- # Libraries
+ inreplace 'SuiteSparse_config/SuiteSparse_config.mk' do |s|
s.change_make_var! "BLAS", "-Wl,-framework -Wl,Accelerate"
s.change_make_var! "LAPACK", "$(BLAS)"
- s.remove_make_var! "METIS_PATH"
- s.change_make_var! "METIS", metis.lib + 'libmetis.a'
s.change_make_var! "SPQR_CONFIG", "-DHAVE_TBB"
s.change_make_var! "TBB", "-ltbb"
- # Installation
+ 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
@@ -45,4 +36,3 @@ class SuiteSparse < Formula
system "make install"
end
end
-