forked from lotia/homebrew-versions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathantlr2.rb
More file actions
29 lines (24 loc) · 730 Bytes
/
antlr2.rb
File metadata and controls
29 lines (24 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require 'formula'
class Antlr2 < Formula
homepage 'http://www.antlr2.org'
url 'http://www.antlr2.org/download/antlr-2.7.7.tar.gz'
sha1 '802655c343cc7806aaf1ec2177a0e663ff209de1'
def install
# C Sharp is explicitly disabled because the antlr configure script will
# confuse the Chicken Scheme compiler, csc, for a C sharp compiler.
args = %W[
--prefix=#{prefix}
--disable-debug
--disable-csharp
]
system "./configure", *args
system "make"
libexec.install "antlr.jar"
include.install "lib/cpp/antlr"
lib.install "lib/cpp/src/libantlr.a"
(bin+"antlr2").write <<-EOS.undent
#!/bin/sh
java -classpath #{libexec}/antlr.jar antlr.Tool "$@"
EOS
end
end