Skip to content

Instantly share code, notes, and snippets.

@Gui13
Last active August 29, 2015 14:08
Show Gist options
  • Save Gui13/f5cf103f50d34c28c7be to your computer and use it in GitHub Desktop.
Save Gui13/f5cf103f50d34c28c7be to your computer and use it in GitHub Desktop.
Antlr3 Brew file
require 'formula'
class Antlr3 < Formula
# Antlr4 is the current main, but some people may need Antlr3,
# which has support for a C API.
url "http://www.antlr3.org/download/antlr-3.4-complete.jar"
version '3.4'
homepage 'http://www.antlr.org/'
sha1 '5cab59d859caa6598e28131d30dd2e89806db57f'
def install
prefix.install "antlr-3.4-complete.jar"
(share+"java").install_symlink "#{prefix}/antlr-3.4-complete.jar" => "antlr3.jar"
(bin+"antlr-3.4").write <<-EOS.undent
#!/bin/sh
java -jar #{prefix}/antlr-3.4-complete.jar "$@"
EOS
bin.install_symlink bin/"antlr-3.4" => "antlr3"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment