homebrew-core/Formula/plantuml.rb
2017-10-20 14:10:54 +01:00

26 lines
681 B
Ruby

class Plantuml < Formula
desc "Draw UML diagrams"
homepage "https://plantuml.com/"
url "https://downloads.sourceforge.net/project/plantuml/1.2017.18/plantuml.1.2017.18.jar"
sha256 "60e5928d1e3af5bc91e6b2aff19ea1f8c2a15862c69b083b6c3e9079a9794e6b"
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