From f78c6e498f2f1049e6fc875a11390ee6deb1faec Mon Sep 17 00:00:00 2001 From: Charlie Sharpsteen Date: Wed, 23 May 2012 13:27:22 -0700 Subject: HDF5: Update to 1.8.9 Also clean up arguments and options. --- Library/Formula/hdf5.rb | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'Library') diff --git a/Library/Formula/hdf5.rb b/Library/Formula/hdf5.rb index 131338ab5..2c1ddbb67 100644 --- a/Library/Formula/hdf5.rb +++ b/Library/Formula/hdf5.rb @@ -1,23 +1,23 @@ require 'formula' -def fortran? - ARGV.include? '--enable-fortran' -end - def threadsafe? ARGV.include? '--enable-threadsafe' end +def fortran? + ARGV.include? '--enable-fortran' and not threadsafe? +end + class Hdf5 < Formula - url 'http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.8/src/hdf5-1.8.8.tar.bz2' homepage 'http://www.hdfgroup.org/HDF5' - sha1 '1bc16883ecd631840b70857bea637a06eb0155da' + url 'http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.9/src/hdf5-1.8.9.tar.bz2' + sha1 '7d5e5e8caa5970c65e70a5b4ad6787efe0bf70bb' depends_on 'szip' def options [ - ['--enable-fortran', 'Compile Fortran bindings at the expense of having shared libraries'], + ['--enable-fortran', 'Compile Fortran bindings.'], ['--enable-threadsafe', 'Trade performance and C++ or Fortran support for thread safety'] ] end @@ -25,18 +25,23 @@ class Hdf5 < Formula def install ENV.fortran if fortran? - args = [ - "--prefix=#{prefix}", - '--disable-debug', - '--disable-dependency-tracking', - '--enable-production', - '--with-zlib=yes', - '--with-szlib=yes', - '--enable-filters=all' + 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 ] - args.concat ['--with-pthread=/usr', '--enable-threadsafe'] if threadsafe? - args << '--enable-cxx' unless threadsafe? - args << '--enable-fortran' if fortran? and not threadsafe? + if threadsafe? + args.concat %w[--with-pthread=/usr --enable-threadsafe] + else + args << '--enable-cxx' + args << '--enable-fortran' if fortran? + end system "./configure", *args system "make install" -- cgit v1.2.3