29 lines
996 B
Ruby
29 lines
996 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.8/IGV_2.8.7.zip"
|
|
sha256 "98a7cdc8818c99e4f830fbd1eb701bc099f6885ed5386a7e907c2465e1ff2362"
|
|
|
|
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
|