diff options
| author | Pierre Carrier | 2012-11-01 22:51:41 +0100 |
|---|---|---|
| committer | Adam Vandenberg | 2012-12-28 14:51:16 -0800 |
| commit | b14a896325a6be555462f11f12466cbdf2959e43 (patch) | |
| tree | 02a354ce1b8183a5528cef6d7fead63a27a70623 /Library | |
| parent | e34b0df6b7a3a8160c0cf28c136c206b83ecd1fb (diff) | |
| download | homebrew-b14a896325a6be555462f11f12466cbdf2959e43.tar.bz2 | |
avian 0.6
Closes #15805.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/avian.rb | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Library/Formula/avian.rb b/Library/Formula/avian.rb new file mode 100644 index 000000000..0b1dd627c --- /dev/null +++ b/Library/Formula/avian.rb @@ -0,0 +1,50 @@ +require 'formula' + +class JdkInstalled < Requirement + def message; <<-EOS.undent + A JDK is required. + + You can get the official Oracle installers from: + http://www.oracle.com/technetwork/java/javase/downloads/index.html + EOS + end + + def satisfied? + which 'javac' + end + + def fatal? + true + end +end + +class Avian < Formula + homepage 'http://oss.readytalk.com/avian/' + url 'http://oss.readytalk.com/avian/avian-0.6.tar.bz2' + sha1 '763e1d99af624416aac60f0e222df938aaa3510b' + + head 'https://github.com/ReadyTalk/avian.git' + + depends_on JdkInstalled.new + + 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 + + def test + mktemp do + (Pathname.pwd/'Test.java').write <<-EOS.undent + public class Test { + public static void main(String arg[]) { + System.out.print("OK"); + } + } + EOS + system 'javac', 'Test.java' + %x[avian Test] == 'OK' + end + end +end |
