homebrew-core/Formula/avian.rb

35 lines
956 B
Ruby
Raw Normal View History

require 'formula'
class Avian < Formula
homepage 'http://oss.readytalk.com/avian/'
head 'https://github.com/ReadyTalk/avian.git'
2013-11-18 00:31:42 +00:00
url 'https://github.com/ReadyTalk/avian/archive/v0.7.1.tar.gz'
sha1 '7465b27f11de9b85f4d750e8f4f57a9b3477b87d'
2013-06-14 19:09:06 +00:00
depends_on :macos => :lion
# 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"
sha1 "f05e71680c5970cbf945d866f9aa000f02c56005"
end
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
test do
(testpath/'Test.java').write <<-EOS.undent
public class Test {
public static void main(String arg[]) {
System.out.print("OK");
}
}
EOS
system 'javac', 'Test.java'
2013-06-09 02:26:17 +00:00
assert_equal 'OK', `avian Test`.strip
end
end