2012-08-06 13:54:44 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libmatio < Formula
|
|
|
|
homepage 'http://matio.sourceforge.net'
|
2013-03-11 10:31:29 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/matio/matio/1.5.1/matio-1.5.1.tar.bz2'
|
|
|
|
sha1 '12b8ed59688b2f41903ddc3e7975f21f10fe42bb'
|
2012-08-06 13:54:44 +00:00
|
|
|
|
|
|
|
option 'with-hdf5', 'Enable support for newer MAT files that use the HDF5-format'
|
|
|
|
|
2013-02-01 00:29:11 +00:00
|
|
|
depends_on 'hdf5' => :optional
|
2012-08-06 13:54:44 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
args = %W[
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--with-zlib=/usr
|
|
|
|
--enable-extended-sparse=yes
|
|
|
|
]
|
2013-02-01 00:29:11 +00:00
|
|
|
args << "--with-hdf5=#{HOMEBREW_PREFIX}" if build.with? 'hdf5'
|
2012-08-06 13:54:44 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|