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-10-13 02:32:57 +00:00
|
|
|
url "https://github.com/HaxeFoundation/haxe.git", :tag => "3.2.1", :revision => "deab4424399b520750671e51e5f5c2684e942c17"
|
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
|
2015-10-13 02:37:24 +00:00
|
|
|
cellar :any_skip_relocation
|
|
|
|
sha256 "131893375697db4a6f747ebec788f9d0d7304b742a3c007f27ea877f561e1e9f" => :el_capitan
|
|
|
|
sha256 "104c2a1e9cc5c0d3ca3ee794a4872e8b25107139106f904c2471162ce278474e" => :yosemite
|
|
|
|
sha256 "1e4c88518c6747bf86345ac67b2e3e2da5d9f3cea3c3917e8837ac4db2083412" => :mavericks
|
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
|
|
|
|
|
2015-08-27 11:34:28 +00:00
|
|
|
depends_on "ocaml" => :build
|
2014-12-09 21:45:09 +00:00
|
|
|
depends_on "camlp4" => :build
|
2015-10-13 02:32:57 +00:00
|
|
|
depends_on "neko"
|
2013-06-11 05:00:52 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
# Build requires targets to be built in specific order
|
|
|
|
ENV.deparallelize
|
2015-06-18 12:48:18 +00:00
|
|
|
args = ["OCAMLOPT=ocamlopt.opt"]
|
|
|
|
args << "ADD_REVISION=1" if build.head?
|
|
|
|
system "make", *args
|
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
|