This repository has been archived by the owner. It is now read-only.

Add compatible netCDF C++ bindings #15264

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+13 −1
Split
View
@@ -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 @@ def install
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'