diff options
| author | Adam Vandenberg | 2013-01-29 10:56:01 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2013-01-29 10:56:01 -0800 |
| commit | 437ff64ac8ff301258a4019cd9d690f976f22756 (patch) | |
| tree | e96150ac01a4d6af98a6709054ca820afa42af9b | |
| parent | 62a8c50669b00587694c9a1f6c7287a41e4e69a8 (diff) | |
| download | homebrew-437ff64ac8ff301258a4019cd9d690f976f22756.tar.bz2 | |
Avian: Snow Leopard throws an errror during compile
Closes #17349.
| -rw-r--r-- | Library/Formula/avian.rb | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/Library/Formula/avian.rb b/Library/Formula/avian.rb index feebb45e5..ba6b740f0 100644 --- a/Library/Formula/avian.rb +++ b/Library/Formula/avian.rb @@ -1,5 +1,15 @@ require 'formula' +class LionOrNewer < Requirement + fatal true + + satisfy MacOS.version >= :lion + + def message + "Avian requires Mac OS X 10.7 (Lion) or newer." + end +end + class JdkInstalled < Requirement fatal true @@ -22,25 +32,23 @@ class Avian < Formula head 'https://github.com/ReadyTalk/avian.git' depends_on JdkInstalled + depends_on LionOrNewer 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"); - } + 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' - %x[avian Test] == 'OK' - end + } + EOS + system 'javac', 'Test.java' + %x[avian Test] == 'OK' end end |
