forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvcftools.rb
32 lines (25 loc) · 879 Bytes
/
vcftools.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
require 'formula'
class Vcftools < Formula
homepage 'http://vcftools.sourceforge.net/index.html'
url 'https://downloads.sourceforge.net/project/vcftools/vcftools_0.1.12a.tar.gz'
sha1 '66b982c67d2441f2b7fdbf2895f0749547852b13'
version '0.1.12a-1' # detect new release, not an alpha version
depends_on "homebrew/dupes/zlib" => :optional
def install
args = %W[PREFIX=#{prefix} CPP=#{ENV.cxx}]
if build.with? "zlib"
zlib = Formula["zlib"]
args << "LIB=-lz -L#{zlib.opt_lib} -I#{zlib.opt_include}"
end
system "make", "install", *args
end
def caveats; <<-EOS.undent
To use the Perl modules, make sure Vcf.pm, VcfStats.pm, and FaSlice.pm
are included in your PERL5LIB environment variable:
export PERL5LIB=#{HOMEBREW_PREFIX}/lib/perl5/site_perl:${PERL5LIB}
EOS
end
def test
system "#{bin}/vcftools"
end
end