29 lines
999 B
Ruby
29 lines
999 B
Ruby
class Igv < Formula
|
|
desc "Interactive Genomics Viewer"
|
|
homepage "https://www.broadinstitute.org/software/igv"
|
|
url "https://data.broadinstitute.org/igv/projects/downloads/2.7/IGV_2.7.2.zip"
|
|
sha256 "cbaeb3d437374ad9d9057eeddaa963c573ddd86e1c2e01c8cad7660263e7cf86"
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on "openjdk"
|
|
|
|
def install
|
|
inreplace ["igv.sh", "igvtools"], /^prefix=.*/, "prefix=#{libexec}"
|
|
bin.install "igv.sh" => "igv"
|
|
bin.install "igvtools"
|
|
libexec.install "igv.args", "lib"
|
|
bin.env_script_all_files libexec, :JAVA_HOME => Formula["openjdk"].opt_prefix
|
|
end
|
|
|
|
test do
|
|
assert_match "Usage:", shell_output("#{bin}/igvtools")
|
|
assert_match "org/broad/igv/ui/IGV.class", shell_output("#{Formula["openjdk"].bin}/jar tf #{libexec}/lib/igv.jar")
|
|
# Fails on Jenkins with Unhandled exception: java.awt.HeadlessException
|
|
unless ENV["CI"]
|
|
(testpath/"script").write "exit"
|
|
assert_match "Version", shell_output("#{bin}/igv -b script")
|
|
end
|
|
end
|
|
end
|