2014-11-15 05:16:42 +00:00
|
|
|
require "formula"
|
2012-11-01 21:51:41 +00:00
|
|
|
|
|
|
|
class Avian < Formula
|
2014-11-15 05:16:42 +00:00
|
|
|
homepage "http://oss.readytalk.com/avian/"
|
|
|
|
head "https://github.com/ReadyTalk/avian.git"
|
|
|
|
url "https://github.com/ReadyTalk/avian/archive/v1.1.tar.gz"
|
|
|
|
sha1 "de51fb048b0b81a131ddbb3387adb229d3eddf2f"
|
2012-11-01 21:51:41 +00:00
|
|
|
|
2013-06-14 19:09:06 +00:00
|
|
|
depends_on :macos => :lion
|
2012-11-01 21:51:41 +00:00
|
|
|
|
|
|
|
def install
|
2014-11-15 05:16:42 +00:00
|
|
|
ENV["JAVA_HOME"] = `/usr/libexec/java_home`.chomp
|
|
|
|
system "make", "use-clang=true"
|
|
|
|
bin.install Dir["build/macosx-*/avian*"]
|
|
|
|
lib.install Dir["build/macosx-*/*.dylib", "build/macosx-*/*.a"]
|
2012-11-01 21:51:41 +00:00
|
|
|
end
|
|
|
|
|
2013-01-29 18:56:01 +00:00
|
|
|
test do
|
2014-11-15 05:16:42 +00:00
|
|
|
(testpath/"Test.java").write <<-EOS.undent
|
2013-01-29 18:56:01 +00:00
|
|
|
public class Test {
|
|
|
|
public static void main(String arg[]) {
|
|
|
|
System.out.print("OK");
|
2012-11-01 21:51:41 +00:00
|
|
|
}
|
2013-01-29 18:56:01 +00:00
|
|
|
}
|
|
|
|
EOS
|
2014-11-15 05:16:42 +00:00
|
|
|
system "javac", "Test.java"
|
|
|
|
assert_equal "OK", shell_output("#{bin}/avian Test")
|
2012-11-01 21:51:41 +00:00
|
|
|
end
|
|
|
|
end
|