2013-06-11 05:00:52 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Haxe < Formula
|
|
|
|
homepage 'http://haxe.org'
|
2014-03-29 15:42:12 +00:00
|
|
|
url 'https://github.com/HaxeFoundation/haxe.git', :tag => '3.1.2'
|
2013-06-11 05:00:52 +00:00
|
|
|
|
2013-11-06 23:22:11 +00:00
|
|
|
head 'https://github.com/HaxeFoundation/haxe.git', :branch => 'development'
|
2013-06-11 05:00:52 +00:00
|
|
|
|
2014-03-04 17:38:18 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2014-03-31 15:24:38 +00:00
|
|
|
sha1 "b26c27ea86f207d838d039e7d18e6c61fdcc3354" => :mavericks
|
|
|
|
sha1 "203ad40ae2ca4b6d7747c4e69f316a99ae045e09" => :mountain_lion
|
|
|
|
sha1 "b8a047a98ed5d2f5cc8aedfd468a7ecbe027ca4e" => :lion
|
2014-03-04 17:38:18 +00:00
|
|
|
end
|
|
|
|
|
2013-06-11 05:00:52 +00:00
|
|
|
depends_on 'neko'
|
|
|
|
depends_on 'objective-caml'
|
|
|
|
|
|
|
|
def install
|
|
|
|
# Build requires targets to be built in specific order
|
|
|
|
ENV.deparallelize
|
2014-03-03 08:23:10 +00:00
|
|
|
system "make"
|
|
|
|
bin.mkpath
|
|
|
|
system "make", "install", "INSTALL_BIN_DIR=#{bin}", "INSTALL_LIB_DIR=#{lib}/haxe"
|
2014-03-29 15:42:12 +00:00
|
|
|
|
|
|
|
# Replace the absolute symlink by a relative one,
|
|
|
|
# such that binary package created by homebrew will work in non-/usr/local locations.
|
|
|
|
rm bin/"haxe"
|
|
|
|
bin.install_symlink lib/"haxe/haxe"
|
2013-06-11 05:00:52 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
ENV["HAXE_STD_PATH"] = "#{HOMEBREW_PREFIX}/lib/haxe/std"
|
|
|
|
system "#{bin}/haxe", "-v", "Std"
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Add the following line to your .bashrc or equivalent:
|
|
|
|
export HAXE_STD_PATH="#{HOMEBREW_PREFIX}/lib/haxe/std"
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|