24 lines
646 B
Ruby
24 lines
646 B
Ruby
class Plantuml < Formula
|
|
desc "Draw UML diagrams"
|
|
homepage "https://plantuml.sourceforge.io/"
|
|
url "https://downloads.sourceforge.net/project/plantuml/plantuml.8053.jar"
|
|
sha256 "9551a8d4a7cce5c7a2fb1124910ff7347aee9a3a90ff2e451d6629fe82f7a380"
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on "graphviz"
|
|
|
|
def install
|
|
jar = "plantuml.jar"
|
|
libexec.install "plantuml.#{version}.jar" => jar
|
|
(bin/"plantuml").write <<-EOS.undent
|
|
#!/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
|