2012-11-01 21:51:41 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Avian < Formula
|
|
|
|
homepage 'http://oss.readytalk.com/avian/'
|
|
|
|
head 'https://github.com/ReadyTalk/avian.git'
|
2014-04-19 14:58:48 +00:00
|
|
|
url 'https://github.com/ReadyTalk/avian/archive/v0.7.1.1.tar.gz'
|
|
|
|
sha1 '326f127f146f46a5b35567b1717ea4a5b13833fd'
|
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
|
|
|
|
2013-11-21 02:25:05 +00:00
|
|
|
# Fix build with clang; already upstream
|
2014-03-16 23:54:12 +00:00
|
|
|
patch do
|
|
|
|
url "https://github.com/ReadyTalk/avian/commit/69ea1f57219e0ec1b113f1fcadaa3dae6b93f358.diff"
|
2014-04-19 14:58:48 +00:00
|
|
|
sha1 "fc357efdd179c2511e76181dbf735e4a9e19e8b5"
|
2013-11-21 02:25:05 +00:00
|
|
|
end
|
|
|
|
|
2012-11-01 21:51:41 +00:00
|
|
|
def install
|
|
|
|
system 'make', 'JAVA_HOME=/Library/Java/Home'
|
|
|
|
bin.install Dir['build/darwin-*/avian*']
|
2014-05-31 15:03:18 +00:00
|
|
|
lib.install Dir['build/darwin-*/*.dylib', 'build/darwin-*/*.a']
|
2012-11-01 21:51:41 +00:00
|
|
|
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
|