aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorCharlie Sharpsteen2011-04-01 12:27:38 -0700
committerAdam Vandenberg2011-04-01 12:59:42 -0700
commit846cc0cba26383f4f92c50577149c28ea81cb43c (patch)
treeb385a945dd7bb54de769c9687dcf561117430947 /Library
parent5b33e079f620ffeb403355e3f1b6ed72d1ff5cba (diff)
downloadhomebrew-846cc0cba26383f4f92c50577149c28ea81cb43c.tar.bz2
Upgrade NetCDF to 4.1.2
Also, fixed Fortran dependency to reflect Homebrew style post-refactor. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/netcdf.rb26
1 files changed, 11 insertions, 15 deletions
diff --git a/Library/Formula/netcdf.rb b/Library/Formula/netcdf.rb
index 3faed5485..987d3a606 100644
--- a/Library/Formula/netcdf.rb
+++ b/Library/Formula/netcdf.rb
@@ -1,38 +1,34 @@
require 'formula'
+def fortran?
+ ARGV.include? '--enable-fortran'
+end
+
class Netcdf < Formula
- url 'http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-4.1.1.tar.gz'
+ url 'http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-4.1.2.tar.gz'
homepage 'http://www.unidata.ucar.edu/software/netcdf/'
- md5 '79c5ff14c80d5e18dd8f1fceeae1c8e1'
+ md5 '4a94ebe2d998d649159aa5665c83fb1a'
depends_on 'hdf5'
- depends_on 'gfortran' if ARGV.include? '--fortran'
def options
- [['--fortran', 'Compile with Fortran support']]
+ [['--enable-fortran', 'Compile Fortran bindings']]
end
def install
+ ENV.fortran if fortran?
+
# HDF5 is required to create and access files in the version 4 format
- hdf5 = Formula.factory('hdf5')
+ hdf5 = Formula.factory 'hdf5'
args = ["--disable-dependency-tracking",
"--prefix=#{prefix}",
"--with-hdf5=#{hdf5.prefix}",
"--enable-netcdf4",
"--enable-shared"]
- args << "--disable-fortran" unless ARGV.include? '--fortran'
+ args << "--disable-fortran" unless fortran?
system "./configure", *args
system "make install"
end
-
- def caveats; <<-EOS
-To build with (experimental) fortran support:
- brew install netcdf --fortran
-
-You may have to set FCFLAGS and FFLAGS to be consistant with Homebrew's use
-of C compilers in order for the brew to install correctly.
- EOS
- end
end