diff options
| author | Adam Vandenberg | 2012-09-05 20:55:46 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-09-05 20:55:46 -0700 |
| commit | 7b620f0d49cce6ab0b140264d99f1a1b1cc4eea3 (patch) | |
| tree | a5a6cb13858c2dd2dfeebe3c90c4eedac52f4a74 /Library | |
| parent | be44fc999481647bd7e146dd5c623a93f508b829 (diff) | |
| download | homebrew-7b620f0d49cce6ab0b140264d99f1a1b1cc4eea3.tar.bz2 | |
hdf5: use new dsl
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/hdf5.rb | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/Library/Formula/hdf5.rb b/Library/Formula/hdf5.rb index 2c1ddbb67..ae65ad53a 100644 --- a/Library/Formula/hdf5.rb +++ b/Library/Formula/hdf5.rb @@ -1,13 +1,5 @@ require 'formula' -def threadsafe? - ARGV.include? '--enable-threadsafe' -end - -def fortran? - ARGV.include? '--enable-fortran' and not threadsafe? -end - class Hdf5 < Formula 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' @@ -15,16 +7,11 @@ class Hdf5 < Formula depends_on 'szip' - def options - [ - ['--enable-fortran', 'Compile Fortran bindings.'], - ['--enable-threadsafe', 'Trade performance and C++ or Fortran support for thread safety'] - ] - end + # TODO - warn that these options conflict + option 'enable-fortran', 'Compile Fortran bindings' + option 'enable-threadsafe', 'Trade performance and C++ or Fortran support for thread safety' def install - ENV.fortran if fortran? - args = %W[ --prefix=#{prefix} --enable-production @@ -36,11 +23,15 @@ class Hdf5 < Formula --enable-static=yes --enable-shared=yes ] - if threadsafe? + + if build.include? 'enable-threadsafe' args.concat %w[--with-pthread=/usr --enable-threadsafe] else args << '--enable-cxx' - args << '--enable-fortran' if fortran? + if build.include? 'enable-fortran' + args << '--enable-fortran' + ENV.fortran + end end system "./configure", *args |
