itsol, salt: move to homebrew/science

Closes Homebrew/homebrew#34777.
This commit is contained in:
Misty De Meo 2014-12-08 14:44:15 -08:00
parent 561fb9d1f2
commit 38ef9745a5
2 changed files with 0 additions and 65 deletions

View file

@ -1,15 +0,0 @@
require "formula"
class Itsol < Formula
homepage "http://www-users.cs.umn.edu/~saad/software/ITSOL"
url "http://www-users.cs.umn.edu/~saad/software/ITSOL/ITSOL_2.tar.gz"
sha1 "c7af215aaa6ab377521ba317eccf6859165ebefb"
depends_on :fortran
def install
system "make"
lib.install("LIB/libitsol.a")
(include/"itsol").install Dir["INC/*.h"]
end
end

View file

@ -1,50 +0,0 @@
require 'formula'
class Salt < Formula
homepage 'http://supernovae.in2p3.fr/salt/doku.php?id=start'
url 'http://supernovae.in2p3.fr/salt/lib/exe/fetch.php?media=snfit-2.4.0.tar.gz'
sha1 '7f6e36e78199d8dec0458b464643e1e90fc51282'
version '2.4'
depends_on :fortran
conflicts_with 'fastbit', :because => 'both install `include/filter.h`'
resource 'data' do
url 'http://supernovae.in2p3.fr/salt/lib/exe/fetch.php?media=salt2-4_data.tgz'
sha1 '92c34fe3363fe6a88c8cda75c543503a9b3196f7'
end
resource '03d4ag' do
url 'http://supernovae.in2p3.fr/salt/lib/exe/fetch.php?media=jla-03d4ag.tar.gz'
sha1 'b227f5e50ea227375720f3c00dd849f964cfa2ba'
end
def install
ENV.deparallelize
# the libgfortran.a path needs to be set explicitly
libgfortran = `$FC --print-file-name libgfortran.a`.chomp
ENV.append 'LDFLAGS', "-L#{File.dirname(libgfortran)} -lgfortran"
system "./configure", "--prefix=#{prefix}", "--disable-static"
system "make install"
# install all the model data
(prefix/'data').install resource('data')
# for testing
(prefix/'03d4ag').install resource('03d4ag')
end
test do
ENV['SALTPATH'] = "#{prefix}/data"
cp_r Dir["#{prefix}/03d4ag/*"], '.'
system bin/"snfit", testpath/"lc-03D4ag.list"
assert File.exist?("result_salt2.dat")
end
def caveats
<<-EOS.undent
You should add the following to your .bashrc or equivalent:
export SALTPATH=#{prefix}/data
EOS
end
end