homebrew-core/Formula/procyon-decompiler.rb
Mike McQuaid 7a4dabfc1a Use hash rockets again. (#5177)
This restores 1.8 hash rockets because they look nicer with e.g. `depends_on :foo => :bar`
2016-09-24 16:45:48 +01:00

29 lines
872 B
Ruby

class ProcyonDecompiler < Formula
desc "Modern decompiler for Java 5 and beyond."
homepage "https://bitbucket.org/mstrobel/procyon/wiki/Java%20Decompiler"
url "https://bitbucket.org/mstrobel/procyon/downloads/procyon-decompiler-0.5.30.jar"
sha256 "cd9a2177f72f490842b0b84909f58b5548614a78ecd135ce28b833f93429e5a0"
bottle :unneeded
depends_on :java => "1.7+"
def install
libexec.install "procyon-decompiler-#{version}.jar"
bin.write_jar_script libexec/"procyon-decompiler-#{version}.jar", "procyon-decompiler"
end
test do
fixture = <<-EOS.undent
class T
{
public static void main(final String[] array) {
System.out.println("Hello World!");
}
}
EOS
(testpath/"T.java").write fixture
system "javac", "T.java"
fixture.match pipe_output("#{bin}/procyon-decompiler", "T.class")
end
end