netcdf - enable fortran support
parent
ef0adb0495
commit
bf4ab26f7e
|
@ -6,43 +6,33 @@ class Netcdf <Formula
|
|||
md5 '79c5ff14c80d5e18dd8f1fceeae1c8e1'
|
||||
|
||||
depends_on 'hdf5'
|
||||
depends_on 'gfortran' if ARGV.include? '--fortran'
|
||||
|
||||
def options
|
||||
[['--fortran', 'Compile with Fortran support']]
|
||||
end
|
||||
|
||||
def install
|
||||
# HDF5 is required to create and access files
|
||||
# in the NetCDF version 4 format.
|
||||
# HDF5 is required to create and access files in the version 4 format
|
||||
hdf5 = Formula.factory('hdf5')
|
||||
|
||||
system "./configure", "--prefix=#{prefix}",
|
||||
"--disable-dependency-tracking",
|
||||
"--with-hdf5=#{hdf5.prefix}",
|
||||
"--enable-netcdf4",
|
||||
"--disable-fortran", # Until issue 72 is resolved.
|
||||
"--enable-shared"
|
||||
args = ["--disable-dependency-tracking",
|
||||
"--prefix=#{prefix}",
|
||||
"--with-hdf5=#{hdf5.prefix}",
|
||||
"--enable-netcdf4",
|
||||
"--enable-shared"]
|
||||
args << "--disable-fortran" unless ARGV.include? '--fortran'
|
||||
|
||||
system "./configure", *args
|
||||
system "make install"
|
||||
end
|
||||
|
||||
def caveats
|
||||
caveats = <<-EOS
|
||||
This brew of NetCDF does not include Fortran support.
|
||||
Fortran support will be added once the following issue
|
||||
is resolved:
|
||||
def caveats; <<-EOS
|
||||
To build with (experimental) fortran support:
|
||||
brew install netcdf --fortran
|
||||
|
||||
http://github.com/mxcl/homebrew/issues/72
|
||||
|
||||
If you have a Fortran compiler and would like to enable
|
||||
NetCDF support for Fortran compilers, execute:
|
||||
|
||||
brew edit netcdf
|
||||
|
||||
Comment out the configure argument disabling Fortran
|
||||
and re-install. You may have to set FCFLAGS and FFLAGS
|
||||
to be consistant with Homebrew's use of C compilers in
|
||||
order for the brew to install correctly.
|
||||
|
||||
Be aware that the Homebrew project may not be able to
|
||||
provide support for any issues that arise during
|
||||
compilation when Fortran is enabled until a Fortran
|
||||
compiler is officially supported.
|
||||
You may have to set FCFLAGS and FFLAGS to be consistant with Homebrew's use
|
||||
of C compilers in order for the brew to install correctly.
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue