2012-11-01 21:51:41 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Avian < Formula
|
|
|
|
homepage 'http://oss.readytalk.com/avian/'
|
2013-08-05 15:07:20 +00:00
|
|
|
url 'http://oss.readytalk.com/avian/avian-0.7.tar.bz2'
|
|
|
|
sha1 '7650d937c111154cfdeff465e3a1be77b07e1b26'
|
2012-11-01 21:51:41 +00:00
|
|
|
|
|
|
|
head 'https://github.com/ReadyTalk/avian.git'
|
|
|
|
|
2013-06-14 19:09:06 +00:00
|
|
|
depends_on :macos => :lion
|
2012-11-01 21:51:41 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
system 'make', 'JAVA_HOME=/Library/Java/Home'
|
|
|
|
bin.install Dir['build/darwin-*/avian*']
|
|
|
|
lib.install Dir['build/darwin-*/*.dylib'] + Dir['build/darwin-*/*.a']
|
|
|
|
end
|
|
|
|
|
2013-01-29 18:56:01 +00:00
|
|
|
test do
|
|
|
|
(testpath/'Test.java').write <<-EOS.undent
|
|
|
|
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
|
|
|
|
system 'javac', 'Test.java'
|
2013-06-09 02:26:17 +00:00
|
|
|
assert_equal 'OK', `avian Test`.strip
|
2012-11-01 21:51:41 +00:00
|
|
|
end
|
|
|
|
end
|