aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorLi Dong2012-10-03 09:52:05 +0800
committerAdam Vandenberg2012-10-03 06:48:44 -0700
commit752afd13a0063d1a3fc2b6b233228c20c2d96781 (patch)
tree0d000b13d8b2749f51529d33fa0db2a1d4a77c34 /Library/Formula
parent21837073aeaf3354f5b1159f210b13ed31d7e48d (diff)
downloadhomebrew-752afd13a0063d1a3fc2b6b233228c20c2d96781.tar.bz2
netCDF: option for C++ bindings
Closes #15264. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-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'