forked from lotia/homebrew-versions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also includes cpp runtime library. Pulled over from Homebrew/legacy-homebrew#10701. Signed-off-by: Charlie Sharpsteen <[email protected]>
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
require 'formula' | ||
|
||
class Antlr2 < Formula | ||
|
||
homepage 'http://www.antlr2.org' | ||
url 'http://www.antlr2.org/download/antlr-2.7.7.tar.gz' | ||
md5 '01cc9a2a454dd33dcd8c856ec89af090' | ||
|
||
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 |