Skip to content
This repository
Browse code

netCDF: option for C++ bindings

Closes #15264.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
  • Loading branch information...
commit 752afd13a0063d1a3fc2b6b233228c20c2d96781 1 parent 2183707
Li Dong authored October 03, 2012 adamv committed October 03, 2012

Showing 1 changed file with 13 additions and 1 deletion. Show diff stats Hide diff stats

  1. 14  Library/Formula/netcdf.rb
14  Library/Formula/netcdf.rb
@@ -6,6 +6,12 @@ class NetcdfCXX < Formula
6 6
   sha1 '59628c9f06c211a47517fc00d8b068da159ffa9d'
7 7
 end
8 8
 
  9
+class NetcdfCXX_compat < Formula
  10
+  homepage 'http://www.unidata.ucar.edu/software/netcdf'
  11
+  url 'http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-cxx-4.2.tar.gz'
  12
+  sha1 'bab9b2d873acdddbdbf07ab35481cd0267a3363b'
  13
+end
  14
+
9 15
 class NetcdfFortran < Formula
10 16
   homepage 'http://www.unidata.ucar.edu/software/netcdf'
11 17
   url 'http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-fortran-4.2.tar.gz'
@@ -19,8 +25,9 @@ class Netcdf < Formula
19 25
 
20 26
   depends_on 'hdf5'
21 27
 
22  
-  option 'enable-fortran', 'Compile Fortran Bindings'
  28
+  option 'enable-fortran', 'Compile Fortran bindings'
23 29
   option 'disable-cxx', "Don't compile C++ bindings"
  30
+  option 'enable-cxx-compat', 'Compile C++ bindings for compatibility'
24 31
 
25 32
   def install
26 33
     if build.include? 'enable-fortran'
@@ -56,6 +63,11 @@ def install
56 63
       system 'make install'
57 64
     end unless build.include? 'disable-cxx'
58 65
 
  66
+    NetcdfCXX_compat.new.brew do
  67
+      system './configure', *common_args
  68
+      system 'make install'
  69
+    end if build.include? 'enable-cxx-compat'
  70
+
59 71
     NetcdfFortran.new.brew do
60 72
       system './configure', *common_args
61 73
       system 'make install'

0 notes on commit 752afd1

Please sign in to comment.
Something went wrong with that request. Please try again.