sdedit: depend on openjdk

master
Markus Reiter 2020-02-06 00:50:14 +01:00 committed by Alexander Bayandin
parent 7d21740496
commit 5a2275071f
1 changed files with 7 additions and 4 deletions

View File

@ -3,14 +3,18 @@ class Sdedit < Formula
homepage "https://sdedit.sourceforge.io"
url "https://downloads.sourceforge.net/project/sdedit/sdedit/4.0/sdedit-4.01.jar"
sha256 "060576f9fe79bda0a65f2cfa0b041fceaf7846f034a7519ef939b73ae82673f1"
revision 1
bottle :unneeded
depends_on :java => "1.5+"
depends_on "openjdk"
def install
libexec.install "sdedit-#{version}.jar"
bin.write_jar_script libexec/"sdedit-#{version}.jar", "sdedit"
(bin/"sdedit").write <<~EOS
#!/bin/bash
exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/sdedit-#{version}.jar" "$@"
EOS
end
test do
@ -19,7 +23,6 @@ class Sdedit < Formula
ext:External[pe]
user:Actor
EOS
system "java", "-jar", "#{libexec}/sdedit-#{version}.jar", "-t", "pdf",
"-o", testpath/"test.pdf", testpath/"test.sd"
system bin/"sdedit", "-t", "pdf", "-o", testpath/"test.pdf", testpath/"test.sd"
end
end