forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circos.rb
47 lines (43 loc) · 1.64 KB
/
circos.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
class Circos < Formula
homepage "http://circos.ca"
url "http://circos.ca/distribution/circos-0.67-7.tgz"
sha256 "6e1fc82e1f2f74056fa3229eb43f069e5813e911e9d75e6267f5e1e569a87b49"
depends_on "gd"
depends_on "Config::General" => :perl
depends_on "Font::TTF::Font" => :perl
depends_on "GD::Polyline" => :perl
depends_on "Math::Bezier" => :perl
depends_on "Math::VecStat" => :perl
depends_on "Readonly" => :perl
depends_on "Set::IntSpan" => :perl
depends_on "Text::Format" => :perl
depends_on "SVG" => :perl unless OS.mac?
depends_on "Statistics::Basic" => :perl unless OS.mac?
depends_on "Params::Validate" => :perl unless OS.mac?
depends_on "Math::Round" => :perl unless OS.mac?
depends_on "Regexp::Common" => :perl unless OS.mac?
def install
inreplace "bin/circos", "#!/bin/env perl", "#!/usr/bin/env perl"
libexec.install Dir["*"]
bin.install_symlink "../libexec/bin/circos" => "circos"
end
def caveats; <<-EOS.undent
GD::Polyline fails to install with cpan.
To install gd and circos, run the following commands:
brew remove gd
brew install gd --with-freetype
brew install cpanminus
sudo chown -R "$USER":admin /Library/Perl
cpanm Config::General Font::TTF::Font Math::Bezier Math::VecStat Readonly Set::IntSpan Text::Format
cpanm --force GD::Polyline
brew install circos
Alternatively, download and install GD.pm manually:
perl Makefile.PL && make install
EOS
end
test do
system "cd #{libexec}/bin && ./test.modules"
system "#{bin}/circos --version |grep -q ^circos"
system "#{bin}/circos -conf #{libexec}/example/etc/circos.conf"
end
end