haxe: fix head spec (#12156)
This commit is contained in:
parent
6a7177560e
commit
ea1636a807
1 changed files with 15 additions and 4 deletions
|
@ -4,7 +4,6 @@ class Haxe < Formula
|
|||
url "https://github.com/HaxeFoundation/haxe.git",
|
||||
:tag => "3.4.2",
|
||||
:revision => "890f8c70cf23ce6f9fe0fdd0ee514a9699433ca7"
|
||||
head "https://github.com/HaxeFoundation/haxe.git", :branch => "development"
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
|
@ -13,6 +12,11 @@ class Haxe < Formula
|
|||
sha256 "07da6182e4e2482c941a0b7e5d3ec0bda852ab6702c0067153c02e0c3a3a1925" => :yosemite
|
||||
end
|
||||
|
||||
head do
|
||||
url "https://github.com/HaxeFoundation/haxe.git", :branch => "development"
|
||||
depends_on "opam" => :build
|
||||
end
|
||||
|
||||
depends_on "ocaml" => :build
|
||||
depends_on "camlp4" => :build
|
||||
depends_on "cmake" => :build
|
||||
|
@ -22,9 +26,16 @@ class Haxe < Formula
|
|||
def install
|
||||
# Build requires targets to be built in specific order
|
||||
ENV.deparallelize
|
||||
args = ["OCAMLOPT=ocamlopt.opt"]
|
||||
args << "ADD_REVISION=1" if build.head?
|
||||
system "make", *args
|
||||
|
||||
if build.head?
|
||||
ENV["OPAMROOT"] = buildpath/"opamroot"
|
||||
ENV["OPAMYES"] = "1"
|
||||
system "opam", "init", "--no-setup"
|
||||
system "opam", "install", "ocamlfind"
|
||||
system "opam", "config", "exec", "--", "make", "ADD_REVISION=1"
|
||||
else
|
||||
system "make", "OCAMLOPT=ocamlopt.opt"
|
||||
end
|
||||
|
||||
# Rebuild haxelib as a valid binary
|
||||
cd "extra/haxelib_src" do
|
||||
|
|
Loading…
Reference in a new issue