26 lines
688 B
Ruby
26 lines
688 B
Ruby
class Plantuml < Formula
|
|
desc "Draw UML diagrams"
|
|
homepage "https://plantuml.com/"
|
|
url "https://downloads.sourceforge.net/project/plantuml/1.2017.16/plantuml.1.2017.16.jar"
|
|
sha256 "a3d319ed54ed78ce3cf7bfcfe76ffc5aa6ed28a72b5aa575fe9125e0c6bd985c"
|
|
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.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
|