aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/haxe.rb
blob: 50d46b89820584164179e3cabdc7fdb60f8a7e47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require 'formula'

class Haxe < Formula
  homepage 'http://haxe.org'
  url 'https://github.com/HaxeFoundation/haxe.git', :tag => 'v3.0.1'

  head 'https://github.com/HaxeFoundation/haxe.git'

  depends_on 'neko'
  depends_on 'objective-caml'

  def install
    # Build requires targets to be built in specific order
    ENV.deparallelize
    system 'make'
    bin.install 'haxe'
    bin.install 'std/tools/haxelib/haxelib.sh' => 'haxelib'
    (lib/'haxe').install 'std'
  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