aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorCharlie Sharpsteen2012-08-18 15:08:19 -0700
committerCharlie Sharpsteen2012-08-18 15:08:19 -0700
commitc02f6da22f19b8e3ec07fa4528d75f8f2f562d62 (patch)
treed61b577ede1b98ea2b8eb4c70a2440d70c368139 /Library
parentca24ee0ef248ab86538b5d33c7ba0aef69053657 (diff)
downloadhomebrew-c02f6da22f19b8e3ec07fa4528d75f8f2f562d62.tar.bz2
netcdf: Update to 4.2.1.1
Also, use the new options DSL.
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/netcdf.rb26
1 files changed, 7 insertions, 19 deletions
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