aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorCharlie Sharpsteen2010-05-08 15:37:34 -0700
committerAdam Vandenberg2010-05-12 07:18:13 -0700
commit411402049d0c2bde48b252b5fd0661fc4cd76308 (patch)
tree8f86d6376bdbb066943778c0b5ec2073eba3ba18 /Library
parentb14e63a506835552d0719c26b09364752ed10c1e (diff)
downloadhomebrew-411402049d0c2bde48b252b5fd0661fc4cd76308.tar.bz2
Updated NetCDF to build shared libs
By default, NetCDF only builds static libs. This leads to some complicated dependencies that must be satisfied by other programs that link against libnetcdf.a: nc-config --libs -L/<brew root>/Cellar/netcdf/4.1.1/lib -lnetcdf -L/<brew root>/Cellar/hdf5/1/lib -lhdf5_hl -lhdf5 -lz -lm -lcurl HDF5 is required to access version 4 of the NetCDF file format. When shared libraries are provided, the linking requirements are greatly simplified: nc-config --libs -L/<brew root>/Cellar/netcdf/4.1.1/lib -lnetcdf This eases the build process for other formulas that depend on NetCDF libraries. The static libraries are still compiled and available for use. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/netcdf.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/Formula/netcdf.rb b/Library/Formula/netcdf.rb
index fb00df046..dcdbba227 100644
--- a/Library/Formula/netcdf.rb
+++ b/Library/Formula/netcdf.rb
@@ -6,16 +6,19 @@ class Netcdf <Formula
md5 '79c5ff14c80d5e18dd8f1fceeae1c8e1'
depends_on 'hdf5'
- depends_on 'szip'
def install
+ # HDF5 is required to create and access files
+ # in the NetCDF version 4 format.
hdf5 = Formula.factory('hdf5')
szip = Formula.factory('szip')
system "./configure", "--prefix=#{prefix}",
"--disable-dependency-tracking",
"--with-szip=#{szip.prefix}",
- "--with-hdf5=#{hdf5.prefix}"
+ "--with-hdf5=#{hdf5.prefix}",
+ "--enable-netcdf4",
+ "--enable-shared"
system "make install"
end
end