homebrew-core/Formula/hdf5.rb

50 lines
1.1 KiB
Ruby
Raw Normal View History

2010-02-11 18:01:59 +00:00
require 'formula'
def threadsafe?
ARGV.include? '--enable-threadsafe'
end
def fortran?
ARGV.include? '--enable-fortran' and not threadsafe?
end
2011-03-10 05:11:03 +00:00
class Hdf5 < Formula
2011-12-14 00:59:23 +00:00
homepage 'http://www.hdfgroup.org/HDF5'
url 'http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.9/src/hdf5-1.8.9.tar.bz2'
sha1 '7d5e5e8caa5970c65e70a5b4ad6787efe0bf70bb'
2010-02-11 18:01:59 +00:00
depends_on 'szip'
def options
[
['--enable-fortran', 'Compile Fortran bindings.'],
['--enable-threadsafe', 'Trade performance and C++ or Fortran support for thread safety']
]
end
2010-02-11 18:01:59 +00:00
def install
ENV.fortran if fortran?
args = %W[
--prefix=#{prefix}
--enable-production
--enable-debug=no
--disable-dependency-tracking
--with-zlib=/usr
--with-szlib=#{HOMEBREW_PREFIX}
--enable-filters=all
--enable-static=yes
--enable-shared=yes
]
if threadsafe?
args.concat %w[--with-pthread=/usr --enable-threadsafe]
else
args << '--enable-cxx'
args << '--enable-fortran' if fortran?
end
system "./configure", *args
2010-02-11 18:01:59 +00:00
system "make install"
end
end