2013-06-11 05:00:52 +00:00
|
|
|
class Haxe < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Multi-platform programming language"
|
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
|
2015-05-27 19:07:16 +00:00
|
|
|
url "https://github.com/HaxeFoundation/haxe.git", :tag => "3.2.0", :revision => "77d171b15c94932d265e2a03d476bafc9b3a1894"
|
2014-12-09 21:45:09 +00:00
|
|
|
end
|
2013-06-11 05:00:52 +00:00
|
|
|
|
2014-03-04 17:38:18 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-05-27 19:33:03 +00:00
|
|
|
sha256 "49e090c6d7dd5afb7518ac7c3e70de9abcc42eb6a16c858a02faaa4cc6eb25e2" => :yosemite
|
|
|
|
sha256 "a6bcceefac96a3db26d39999940c833daed45e5d93140a6d245428e3a2218a2f" => :mavericks
|
|
|
|
sha256 "040bda6d708295debe5ec8753ca700260b284d18a9b81829653904fa131163bd" => :mountain_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
|
2015-03-24 10:48:54 +00:00
|
|
|
system "make", "OCAMLOPT=ocamlopt.opt"
|
2014-03-03 08:23:10 +00:00
|
|
|
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
|