Skip to content

Instantly share code, notes, and snippets.

@dogles
Last active August 29, 2015 14:22
Show Gist options
  • Save dogles/7413f687c452f37ceade to your computer and use it in GitHub Desktop.
Save dogles/7413f687c452f37ceade to your computer and use it in GitHub Desktop.
Keep generics haxe branch
require 'formula'
class Haxe < Formula
homepage 'http://haxe.org'
head 'https://github.com/waneck/haxe.git', :branch => 'keep_generics'
depends_on 'neko' => :recommended
depends_on 'objective-caml' => :build
depends_on 'camlp4' => :build
def install
# Build requires targets to be built in specific order
ENV.deparallelize
system "make"
bin.mkpath
system "make", "install", "INSTALL_BIN_DIR=#{bin}", "INSTALL_LIB_DIR=#{lib}/haxe"
# 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"
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment