aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/hdf5.rb
diff options
context:
space:
mode:
authorCharlie Sharpsteen2012-05-23 13:27:22 -0700
committerCharlie Sharpsteen2012-05-23 13:28:12 -0700
commitf78c6e498f2f1049e6fc875a11390ee6deb1faec (patch)
treedef67eefe8d3e768e17448e745026b369b9fc977 /Library/Formula/hdf5.rb
parent51c847587d368a5136802fac9e206ee6a639910e (diff)
downloadhomebrew-f78c6e498f2f1049e6fc875a11390ee6deb1faec.tar.bz2
HDF5: Update to 1.8.9
Also clean up arguments and options.
Diffstat (limited to 'Library/Formula/hdf5.rb')
-rw-r--r--Library/Formula/hdf5.rb41
1 files changed, 23 insertions, 18 deletions
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"