2014-12-09 21:45:09 +00:00
|
|
|
require "formula"
|
2013-06-11 05:00:52 +00:00
|
|
|
|
|
|
|
class Haxe < Formula
|
2014-12-09 21:45:09 +00:00
|
|
|
homepage "http://haxe.org"
|
2013-06-11 05:00:52 +00:00
|
|
|
|
2014-12-09 21:45:09 +00:00
|
|
|
stable do
|
|
|
|
url "https://github.com/HaxeFoundation/haxe.git", :tag => "3.1.3"
|
|
|
|
# Remove the below with the next stable release
|
|
|
|
depends_on MaximumMacOSRequirement => :mavericks
|
|
|
|
end
|
2013-06-11 05:00:52 +00:00
|
|
|
|
2014-03-04 17:38:18 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2014-04-13 21:40:25 +00:00
|
|
|
sha1 "83fe01c0ca2997328e88ef7763181ff40cc5082a" => :mavericks
|
|
|
|
sha1 "46c5911f3505c7e102c71dde16ed4ab2bdcc4cbc" => :mountain_lion
|
|
|
|
sha1 "408dbaf0110cb38ee52900bd4910c56913681bab" => :lion
|
2014-03-04 17:38:18 +00:00
|
|
|
end
|
|
|
|
|
2014-12-09 21:45:09 +00:00
|
|
|
head do
|
|
|
|
url "https://github.com/HaxeFoundation/haxe.git", :branch => "development"
|
|
|
|
end
|
|
|
|
|
|
|
|
depends_on "objective-caml" => :build
|
|
|
|
depends_on "camlp4" => :build
|
|
|
|
depends_on "neko" => :optional
|
2013-06-11 05:00:52 +00:00
|
|
|
|
|
|
|
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
|