0d7bbe6868
Closes #43685. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
29 lines
776 B
Ruby
29 lines
776 B
Ruby
class Plantuml < Formula
|
|
desc "Draw UML diagrams"
|
|
homepage "https://plantuml.com/"
|
|
url "https://downloads.sourceforge.net/project/plantuml/1.2019.9/plantuml.1.2019.9.jar"
|
|
sha256 "36f57c9a1cd3c26c91a2fb522066ca8fa0ed46313284a085fcd51f0de35add24"
|
|
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
|
|
if [[ "$*" != *"-gui"* ]]; then
|
|
VMARGS="-Djava.awt.headless=true"
|
|
fi
|
|
GRAPHVIZ_DOT="#{Formula["graphviz"].opt_bin}/dot" exec java $VMARGS -jar #{libexec}/#{jar} "$@"
|
|
EOS
|
|
chmod 0555, bin/"plantuml"
|
|
end
|
|
|
|
test do
|
|
system bin/"plantuml", "-testdot"
|
|
end
|
|
end
|