Skip to content

Commit

Permalink
ditaa 0.10
Browse files Browse the repository at this point in the history
Closes Homebrew/legacy-homebrew#48372.

Closes #858.

Signed-off-by: Andrew Janke <janke@eilonwy.local>
  • Loading branch information
geoffholden authored and Andrew Janke committed Aug 19, 2016
1 parent 06390e1 commit 3dfddba
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions Formula/ditaa.rb
@@ -1,13 +1,25 @@
class Ditaa < Formula
desc "Convert ASCII diagrams into proper bitmap graphics"
homepage "http://ditaa.sourceforge.net/"
url "https://downloads.sourceforge.net/project/ditaa/ditaa/0.9/ditaa0_9.zip"
sha256 "d689e933b80b065cd7c349e489cfb8feea69dd3e91ca78931edc6fa6e098e689"
url "https://github.com/stathissideris/ditaa/archive/v0.10.tar.gz"
sha256 "82e49065d408cba8b323eea0b7f49899578336d566096c6eb6e2d0a28745d63b"

bottle :unneeded
depends_on :ant => :build
depends_on :java

def install
libexec.install "ditaa0_9.jar"
bin.write_jar_script libexec/"ditaa0_9.jar", "ditaa"
# 0.10 Release still calls itself 0.9
# Reported upstream at https://github.com/stathissideris/ditaa/issues/14
inreplace "build/release.xml", "0_9", "0_10"
inreplace "src/org/stathissideris/ascii2image/core/CommandLineConverter.java", "ditaa version 0.9", "ditaa version 0.10"

mkdir "bin"
system "ant", "-buildfile", "build/release.xml", "release-jar"
libexec.install "releases/ditaa0_10.jar"
bin.write_jar_script libexec/"ditaa0_10.jar", "ditaa"
end

test do
system "#{bin}/ditaa", "-help"
end
end

0 comments on commit 3dfddba

Please sign in to comment.