forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathamos.rb
69 lines (56 loc) · 2.15 KB
/
amos.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
class Amos < Formula
desc "Modular Open-Source Assembler"
homepage "https://sourceforge.net/projects/amos/"
url "https://downloads.sourceforge.net/project/amos/amos/3.1.0/amos-3.1.0.tar.gz"
sha256 "2d9f50e39186ad3dde3d3b28cc265e8d632430657f40fc3978ce34ab1b3db43b"
revision 1
# doi "10.1002/0471250953.bi1108s33"
# tag "bioinformatics"
bottle do
rebuild 1
sha256 "b0792115d1d77dd72d93f0ff1e1dfdd3a542e705339763ffe9093f2539c79ee9" => :x86_64_linux
end
depends_on "expat" unless OS.mac?
depends_on "blat" => :optional # for minimus2-blat
depends_on "boost" => :recommended # for Bambus 2
depends_on "mummer" => :recommended # for minimus2
resource "Statistics::Descriptive" do
url "https://www.cpan.org/authors/id/S/SH/SHLOMIF/Statistics-Descriptive-3.0612.tar.gz"
sha256 "772413148e5e00efb32f277c4254aa78b9112490a896208dcd0025813afdbf7a"
end
fails_with :clang do
build 600
cause "error: reference to 'hash' is ambiguous"
end
def install
ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5"
resource("Statistics::Descriptive").stage do
system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}"
system "make"
system "make", "install"
end
# http://seqanswers.com/forums/showthread.php?t=17802
inreplace "src/Align/find-tandem.cc", "#include <sys/time.h>", "#include <sys/time.h>\n#include <getopt.h>"
ENV.deparallelize
args = %W[--prefix=#{prefix} --disable-dependency-tracking]
args << "--with-Boost-dir=#{Formula["boost"].opt_prefix}" if build.with? "boost"
args << "BLAT=#{Formula["blat"].opt_bin}/blat" if build.with? "blat"
args << "BUILD_QT4=no"
if build.with? "mummer"
args << "DELTAFILTER=#{Formula["mummer"].opt_libexec}/delta-filter"
args << "SHOWCOORDS=#{Formula["mummer"].opt_libexec}/show-coords"
end
system "./configure", *args
system "make", "install"
(bin/"amos").write_env_script("#{libexec}/bin/amos", :PERL5LIB => ENV["PERL5LIB"])
end
def caveats; <<-EOS.undent
The Perl modules have been installed in
#{lib}/AMOS
#{lib}/TIGR
EOS
end
test do
system "#{bin}/bank-transact", "-h"
end
end