diff options
| author | Adam Vandenberg | 2013-06-23 20:29:13 -0700 | 
|---|---|---|
| committer | Adam Vandenberg | 2013-06-24 07:38:09 -0700 | 
| commit | 3813c7ca60cba0d44d3830cdd9b1d31e552e9d5c (patch) | |
| tree | d0f002ed46c2fc249827768f5ec1be4a2a8167f7 | |
| parent | 8806220848018668f66de312cede721437bf21c7 (diff) | |
| download | homebrew-3813c7ca60cba0d44d3830cdd9b1d31e552e9d5c.tar.bz2 | |
Use :fortran
Closes #20731.
Closes #13621.
| -rw-r--r-- | Library/Formula/dotwrp.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/fftw.rb | 8 | ||||
| -rw-r--r-- | Library/Formula/gfortran.rb | 12 | ||||
| -rw-r--r-- | Library/Formula/grib-api.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/hdf5.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/ipopt.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/jags.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/libgetdata.rb | 3 | ||||
| -rw-r--r-- | Library/Formula/mpich2.rb | 8 | ||||
| -rw-r--r-- | Library/Formula/netcdf.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/open-mpi.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/pgplot.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/qd.rb | 3 | ||||
| -rw-r--r-- | Library/Formula/qrupdate.rb | 5 | ||||
| -rw-r--r-- | Library/Formula/r.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/salt.rb | 3 | ||||
| -rw-r--r-- | Library/Formula/slicot.rb | 4 | 
17 files changed, 31 insertions, 39 deletions
| diff --git a/Library/Formula/dotwrp.rb b/Library/Formula/dotwrp.rb index 9167358ad..6f2960705 100644 --- a/Library/Formula/dotwrp.rb +++ b/Library/Formula/dotwrp.rb @@ -7,9 +7,9 @@ class Dotwrp < Formula    head 'https://github.com/tenomoto/dotwrp.git' -  def install -    ENV.fortran +  depends_on :fortran +  def install      # note: fno-underscoring is vital to override the symbols in Accelerate      system "#{ENV["FC"]} #{ENV["FFLAGS"]} -fno-underscoring -c dotwrp.f90"      system "ar -cru libdotwrp.a dotwrp.o" diff --git a/Library/Formula/fftw.rb b/Library/Formula/fftw.rb index 87e9b5fd3..15b63c0f4 100644 --- a/Library/Formula/fftw.rb +++ b/Library/Formula/fftw.rb @@ -7,6 +7,8 @@ class Fftw < Formula    option "with-fortran", "Enable Fortran bindings" +  depends_on :fortran if build.include? "with-fortran" +    def install      args = ["--enable-shared",              "--disable-debug", @@ -14,11 +16,7 @@ class Fftw < Formula              "--enable-threads",              "--disable-dependency-tracking"] -    if build.include? "with-fortran" -      ENV.fortran -    else -      args << "--disable-fortran" -    end +    args << "--disable-fortran" unless build.include? "with-fortran"      # single precision      # enable-sse only works with single diff --git a/Library/Formula/gfortran.rb b/Library/Formula/gfortran.rb index c3718a496..e53c4b78e 100644 --- a/Library/Formula/gfortran.rb +++ b/Library/Formula/gfortran.rb @@ -107,16 +107,8 @@ class Gfortran < Formula    end    def caveats; <<-EOS.undent -    Brews that require a Fortran compiler should not use: -      depends_on 'gfortran' - -    The preferred method of declaring Fortran support is to use: -      def install -        ... -        ENV.fortran -        ... -      end - +    Brews that require a Fortran compiler should use: +      depends_on :fortran      EOS    end  end diff --git a/Library/Formula/grib-api.rb b/Library/Formula/grib-api.rb index cc4958970..f8e39f12e 100644 --- a/Library/Formula/grib-api.rb +++ b/Library/Formula/grib-api.rb @@ -5,6 +5,7 @@ class GribApi < Formula    url 'https://software.ecmwf.int/wiki/download/attachments/3473437/grib_api-1.9.18.tar.gz'    sha1 '87616917a6978a56ae4fe173a3e6e3828b0ebfba' +  depends_on :fortran    depends_on 'jasper' => :recommended    depends_on 'openjpeg' => :optional @@ -17,7 +18,6 @@ class GribApi < Formula    def install      ENV.deparallelize      ENV.no_optimization -    ENV.fortran      system "./configure", "--prefix=#{prefix}"      system "make" diff --git a/Library/Formula/hdf5.rb b/Library/Formula/hdf5.rb index 669036dae..64f55bbfa 100644 --- a/Library/Formula/hdf5.rb +++ b/Library/Formula/hdf5.rb @@ -13,6 +13,7 @@ class Hdf5 < Formula    option 'enable-parallel', 'Compile parallel bindings'    option 'enable-fortran2003', 'Compile Fortran 2003 bindings. Requires enable-fortran.' +  depends_on :fortran if build.include? 'enable-fortran' or build.include? 'enable-fortran2003'    depends_on 'szip'    depends_on MPIDependency.new(:cc, :cxx, :f90) if build.include? "enable-parallel" @@ -39,7 +40,6 @@ class Hdf5 < Formula        end        if build.include? 'enable-fortran' or build.include? 'enable-fortran2003'          args << '--enable-fortran' -        ENV.fortran          args << '--enable-fortran2003' if build.include? 'enable-fortran2003'        end      end diff --git a/Library/Formula/ipopt.rb b/Library/Formula/ipopt.rb index a98f41c36..f7f46afd6 100644 --- a/Library/Formula/ipopt.rb +++ b/Library/Formula/ipopt.rb @@ -6,9 +6,9 @@ class Ipopt < Formula    sha1 '3dec7e71f93756865cc83275f7ddb22e1dc5edcc'    depends_on 'pkg-config' => :build +  depends_on :fortran    def install -    ENV.fortran      system "./configure", "--disable-debug", "--disable-dependency-tracking",                            "--prefix=#{prefix}"      system "make" diff --git a/Library/Formula/jags.rb b/Library/Formula/jags.rb index 91f9cae23..e2a55adf4 100644 --- a/Library/Formula/jags.rb +++ b/Library/Formula/jags.rb @@ -5,9 +5,9 @@ class Jags < Formula    url 'http://sourceforge.net/projects/mcmc-jags/files/JAGS/3.x/Source/JAGS-3.3.0.tar.gz'    sha1 '79a50baaf1e2b2e7673d477e830963b49aad2a6c' -  def install -    ENV.fortran +  depends_on :fortran +  def install      system "./configure", "--disable-dependency-tracking",                            "--prefix=#{prefix}"      system "make install" diff --git a/Library/Formula/libgetdata.rb b/Library/Formula/libgetdata.rb index 477d7de02..9365a68eb 100644 --- a/Library/Formula/libgetdata.rb +++ b/Library/Formula/libgetdata.rb @@ -10,11 +10,12 @@ class Libgetdata < Formula    option 'lzma', 'Build with LZMA compression support'    option 'zzip', 'Build with zzip compression support' +  depends_on :fortran if build.with? 'fortran'    depends_on 'xz' if build.include? 'lzma'    depends_on 'libzzip' if build.include? 'zzip' +    def install -    ENV.fortran if build.with? 'fortran'      args = %W[        --disable-dependency-tracking        --prefix=#{prefix} diff --git a/Library/Formula/mpich2.rb b/Library/Formula/mpich2.rb index 5179ba40e..038898863 100644 --- a/Library/Formula/mpich2.rb +++ b/Library/Formula/mpich2.rb @@ -9,6 +9,9 @@ class Mpich2 < Formula    head 'git://git.mpich.org/mpich.git' +  option 'disable-fortran', "Do not attempt to build Fortran bindings" +  option 'enable-shared', "Build shared libraries" +    # the HEAD version requires the autotools to be installed    # (autoconf>=2.67, automake>=1.12.3, libtool>=2.4)    if build.head? @@ -16,8 +19,7 @@ class Mpich2 < Formula      depends_on 'libtool'  => :build    end -  option 'disable-fortran', "Do not attempt to build Fortran bindings" -  option 'enable-shared', "Build shared libraries" +  depends_on :fortran unless build.include? 'disable-fortran'    conflicts_with 'open-mpi', :because => 'both install mpi__ compiler wrappers' @@ -49,8 +51,6 @@ class Mpich2 < Formula      ]      if build.include? 'disable-fortran'        args << "--disable-f77" << "--disable-fc" -    else -      ENV.fortran      end      # MPICH configure defaults to "--disable-shared" diff --git a/Library/Formula/netcdf.rb b/Library/Formula/netcdf.rb index 2aab51a4e..6c109c234 100644 --- a/Library/Formula/netcdf.rb +++ b/Library/Formula/netcdf.rb @@ -23,6 +23,7 @@ class Netcdf < Formula    url 'http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-4.2.1.1.tar.gz'    sha1 '76631cb4e6b767c224338415cf6e5f5ff9bd1238' +  depends_on :fortran if build.include? 'enable-fortran'    depends_on 'hdf5'    option 'enable-fortran', 'Compile Fortran bindings' @@ -31,7 +32,6 @@ class Netcdf < Formula    def install      if build.include? 'enable-fortran' -      ENV.fortran        # fix for ifort not accepting the --force-load argument, causing        # the library libnetcdff.dylib to be missing all the f90 symbols.        # http://www.unidata.ucar.edu/software/netcdf/docs/known_problems.html#intel-fortran-macosx diff --git a/Library/Formula/open-mpi.rb b/Library/Formula/open-mpi.rb index 3613ccc53..56033a467 100644 --- a/Library/Formula/open-mpi.rb +++ b/Library/Formula/open-mpi.rb @@ -16,6 +16,8 @@ class OpenMpi < Formula    conflicts_with 'mpich2', :because => 'both install mpi__ compiler wrappers' +  depends_on :fortran unless build.include? 'disable-fortran' +    # Reported upstream at version 1.6, both issues    # http://www.open-mpi.org/community/lists/devel/2012/05/11003.php    # http://www.open-mpi.org/community/lists/devel/2012/08/11362.php @@ -32,8 +34,6 @@ class OpenMpi < Formula      ]      if build.include? 'disable-fortran'        args << '--disable-mpi-f77' << '--disable-mpi-f90' -    else -      ENV.fortran      end      if build.include? 'enable-mpi-thread-multiple' diff --git a/Library/Formula/pgplot.rb b/Library/Formula/pgplot.rb index 198f3be06..b9250c716 100644 --- a/Library/Formula/pgplot.rb +++ b/Library/Formula/pgplot.rb @@ -15,6 +15,7 @@ class Pgplot < Formula    option 'with-button', 'Install libbutton'    depends_on :x11 +  depends_on :fortran    def patches      # from MacPorts: https://trac.macports.org/browser/trunk/dports/graphics/pgplot/files @@ -26,7 +27,6 @@ class Pgplot < Formula    def install      ENV.deparallelize -    ENV.fortran      ENV.append 'CPPFLAGS', "-DPG_PPU"      # allow long lines in the fortran code (for long homebrew PATHs)      ENV.append 'FCFLAGS', "-ffixed-line-length-none" diff --git a/Library/Formula/qd.rb b/Library/Formula/qd.rb index 88e0cd390..3e1f07ac0 100644 --- a/Library/Formula/qd.rb +++ b/Library/Formula/qd.rb @@ -5,8 +5,9 @@ class Qd < Formula    url 'http://crd.lbl.gov/~dhbailey/mpdist/qd-2.3.13.tar.gz'    sha1 'f46d63eb5e21172a6f66884b4ddbb352b327a9ca' +  depends_on :fortran +    def install -    ENV.fortran      system "./configure", "--disable-dependency-tracking",                            "--prefix=#{prefix}"      system "make install" diff --git a/Library/Formula/qrupdate.rb b/Library/Formula/qrupdate.rb index aea99b992..8413f6f08 100644 --- a/Library/Formula/qrupdate.rb +++ b/Library/Formula/qrupdate.rb @@ -5,13 +5,13 @@ class Qrupdate < Formula    url 'http://downloads.sourceforge.net/qrupdate/qrupdate-1.1.2.tar.gz'    sha1 'f7403b646ace20f4a2b080b4933a1e9152fac526' +  depends_on :fortran    depends_on 'dotwrp'    def install -    ENV.fortran +    ENV.j1      ENV['PREFIX'] = prefix      inreplace 'Makeconf' do |s| -      # as per the caveats in the gfortran formula:        s.gsub! /^(FC=).*/,     "\\1#{HOMEBREW_PREFIX}/bin/gfortran"        s.gsub! /^(FFLAGS=).*/, "\\1#{ENV['FCFLAGS']}"        s.gsub! /^(BLAS=).*/,   "\\1#{ENV["LDFLAGS"]} -ldotwrp -framework Accelerate" @@ -22,7 +22,6 @@ class Qrupdate < Formula        s.gsub! 'install -D', 'install'      end      lib.mkpath -    ENV.j1      system 'make install'    end  end diff --git a/Library/Formula/r.rb b/Library/Formula/r.rb index a473b8556..3c9aa3867 100644 --- a/Library/Formula/r.rb +++ b/Library/Formula/r.rb @@ -17,6 +17,7 @@ class R < Formula    option 'with-valgrind', 'Compile an unoptimized build with support for the Valgrind debugger'    option 'test', 'Run tests before installing' +  depends_on :fortran    depends_on 'readline'    depends_on 'libtiff'    depends_on 'jpeg' @@ -26,7 +27,6 @@ class R < Formula    def install      ENV.Og if build.include? 'with-valgrind' -    ENV.fortran      args = [        "--prefix=#{prefix}", diff --git a/Library/Formula/salt.rb b/Library/Formula/salt.rb index c878a10ae..5c3b1aaab 100644 --- a/Library/Formula/salt.rb +++ b/Library/Formula/salt.rb @@ -73,6 +73,8 @@ class Salt < Formula    url 'http://supernovae.in2p3.fr/~guy/salt/download/snfit-2.2.2b.tar.gz'    sha1 'e435ca19d22800f95f5363038297593ec4dae97f' +  depends_on :fortran +    def install_subbrew(subbrew, installdir)      s = subbrew.new      s.brew do @@ -92,7 +94,6 @@ class Salt < Formula    def install      ENV.deparallelize -    ENV.fortran      # the libgfortran.a path needs to be set explicitly      # for the --enable-gfortran option to work      libgfortran = `$FC --print-file-name libgfortran.a`.chomp diff --git a/Library/Formula/slicot.rb b/Library/Formula/slicot.rb index 9e2be215a..be5e3d9c2 100644 --- a/Library/Formula/slicot.rb +++ b/Library/Formula/slicot.rb @@ -8,9 +8,9 @@ class Slicot < Formula    option 'with-default-integer-8', 'Build with 8-byte-wide integer type' -  def install -    ENV.fortran +  depends_on :fortran +  def install      args = [        "FORTRAN=#{ENV['FC']}",        "LOADER=#{ENV['FC']}", | 
