forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstacks.rb
47 lines (37 loc) · 1.23 KB
/
stacks.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
require 'formula'
class Stacks < Formula
homepage 'http://creskolab.uoregon.edu/stacks/'
url 'http://creskolab.uoregon.edu/stacks/source/stacks-1.12.tar.gz'
sha1 'eb2c176c5605297dd795ae6f1ead81ba566a3688'
depends_on "google-sparsehash" => :recommended
depends_on "samtools" => :recommended
needs :cxx11
fails_with :clang do
build 503
cause "error: comparison between pointer and integer ('const char *' and 'int')"
end
def install
# OpenMP doesn't yet work on OS X with Apple-provided compilers.
args = ["--disable-dependency-tracking", "--disable-openmp", "--prefix=#{prefix}"]
args << "--enable-sparsehash" if build.with? "google-sparsehash"
if build.with? "samtools"
samtools = Formula["samtools"].opt_prefix
args += ["--enable-bam",
"--with-bam-include-path=#{samtools}/include/bam",
"--with-bam-lib-path=#{samtools}/lib"]
end
system "./configure", *args
system "make", "install"
end
def caveats
<<-EOS.undent
For instructions on setting up the web interface:
#{prefix}/README
The PHP and MySQL scripts have been installed to:
#{share}
EOS
end
test do
system "#{bin}/ustacks", "--version"
end
end