homebrew-core/Formula/plantuml.rb
equal-l2 fa799b2359
plantuml 1.2019.1
Closes #36986.

Signed-off-by: Chongyu Zhu <i@lembacon.com>
2019-02-15 00:37:31 +08:00

26 lines
679 B
Ruby

class Plantuml < Formula
desc "Draw UML diagrams"
homepage "https://plantuml.com/"
url "https://downloads.sourceforge.net/project/plantuml/1.2019.1/plantuml.1.2019.1.jar"
sha256 "6f1baab2a36059c3ffb926eeb7b65aa9f5f5c4559712b94f0f97108f58592bdf"
version_scheme 1
bottle :unneeded
depends_on "graphviz"
depends_on :java
def install
jar = "plantuml.jar"
libexec.install "plantuml.#{version}.jar" => jar
(bin/"plantuml").write <<~EOS
#!/bin/bash
GRAPHVIZ_DOT="#{Formula["graphviz"].opt_bin}/dot" exec java -jar #{libexec}/#{jar} "$@"
EOS
chmod 0555, bin/"plantuml"
end
test do
system bin/"plantuml", "-testdot"
end
end