From c02f6da22f19b8e3ec07fa4528d75f8f2f562d62 Mon Sep 17 00:00:00 2001 From: Charlie Sharpsteen Date: Sat, 18 Aug 2012 15:08:19 -0700 Subject: netcdf: Update to 4.2.1.1 Also, use the new options DSL. --- Library/Formula/netcdf.rb | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/netcdf.rb b/Library/Formula/netcdf.rb index 01a537700..9847a2c13 100644 --- a/Library/Formula/netcdf.rb +++ b/Library/Formula/netcdf.rb @@ -1,13 +1,5 @@ require 'formula' -def fortran? - ARGV.include? '--enable-fortran' -end - -def no_cxx? - ARGV.include? '--disable-cxx' -end - class NetcdfCXX < Formula homepage 'http://www.unidata.ucar.edu/software/netcdf' url 'http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-cxx4-4.2.tar.gz' @@ -22,20 +14,16 @@ end class Netcdf < Formula homepage 'http://www.unidata.ucar.edu/software/netcdf' - url 'http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-4.2.1.tar.gz' - sha1 'dfb6b10ef8dd20e785efa5e29b448383090f144d' + url 'http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-4.2.1.1.tar.gz' + sha1 '76631cb4e6b767c224338415cf6e5f5ff9bd1238' depends_on 'hdf5' - def options - [ - ['--enable-fortran', 'Compile Fortran bindings'], - ['--disable-cxx', "Don't compile C++ bindings"] - ] - end + option 'enable-fortran', 'Compile Fortran Bindings' + option 'disable-cxx', "Don't compile C++ bindings" def install - if fortran? + if build.include? 'enable-fortran' ENV.fortran # fix for ifort not accepting the --force-load argument, causing # the library libnetcdff.dylib to be missing all the f90 symbols. @@ -66,11 +54,11 @@ class Netcdf < Formula NetcdfCXX.new.brew do system './configure', *common_args system 'make install' - end unless no_cxx? + end unless build.include? 'disable-cxx' NetcdfFortran.new.brew do system './configure', *common_args system 'make install' - end if fortran? + end if build.include? 'enable-fortran' end end -- cgit v1.2.3