Last active
August 29, 2015 14:00
-
-
Save lpetre/eb08cf9b845bcd544022 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Haxe < Formula | |
homepage 'http://haxe.org' | |
head 'https://github.com/proletariatgames/haxe.git', :branch => 'master' | |
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