36 lines
1.2 KiB
Ruby
36 lines
1.2 KiB
Ruby
class Igv < Formula
|
|
desc "Interactive Genomics Viewer"
|
|
homepage "https://www.broadinstitute.org/software/igv"
|
|
url "https://data.broadinstitute.org/igv/projects/downloads/2.15/IGV_2.15.4.zip"
|
|
sha256 "ea6defe0f273629a0530f10d7307454f8d120025f33e0fdda1753f90fc7b70a3"
|
|
license "MIT"
|
|
|
|
livecheck do
|
|
url "https://software.broadinstitute.org/software/igv/download"
|
|
regex(/href=.*?IGV[._-]v?(\d+(?:\.\d+)+)\.zip/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, all: "34bf00032ec9156f11e3d7e08a2b674bd42b3a3313951aee662221bb49ae93d4"
|
|
end
|
|
|
|
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, Language::Java.overridable_java_home_env
|
|
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")
|
|
|
|
ENV.append "_JAVA_OPTIONS", "-Duser.home=#{testpath}"
|
|
(testpath/"script").write "exit"
|
|
assert_match "Using system JDK.", shell_output("#{bin}/igv -b script")
|
|
end
|
|
end
|