aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/netcdf.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/Library/Formula/netcdf.rb b/Library/Formula/netcdf.rb
index 9847a2c13..2aab51a4e 100644
--- a/Library/Formula/netcdf.rb
+++ b/Library/Formula/netcdf.rb
@@ -6,6 +6,12 @@ class NetcdfCXX < Formula
sha1 '59628c9f06c211a47517fc00d8b068da159ffa9d'
end
+class NetcdfCXX_compat < Formula
+ homepage 'http://www.unidata.ucar.edu/software/netcdf'
+ url 'http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-cxx-4.2.tar.gz'
+ sha1 'bab9b2d873acdddbdbf07ab35481cd0267a3363b'
+end
+
class NetcdfFortran < Formula
homepage 'http://www.unidata.ucar.edu/software/netcdf'
url 'http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-fortran-4.2.tar.gz'
@@ -19,8 +25,9 @@ class Netcdf < Formula
depends_on 'hdf5'
- option 'enable-fortran', 'Compile Fortran Bindings'
+ option 'enable-fortran', 'Compile Fortran bindings'
option 'disable-cxx', "Don't compile C++ bindings"
+ option 'enable-cxx-compat', 'Compile C++ bindings for compatibility'
def install
if build.include? 'enable-fortran'
@@ -56,6 +63,11 @@ class Netcdf < Formula
system 'make install'
end unless build.include? 'disable-cxx'
+ NetcdfCXX_compat.new.brew do
+ system './configure', *common_args
+ system 'make install'
+ end if build.include? 'enable-cxx-compat'
+
NetcdfFortran.new.brew do
system './configure', *common_args
system 'make install'