homebrew-core/Formula/luajit.rb
Jack Nagel 303b2f6d50 Don't shadow install options in formulae
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-15 17:20:25 -05:00

43 lines
1.2 KiB
Ruby

require 'formula'
class Luajit < Formula
url 'http://luajit.org/download/LuaJIT-2.0.0-beta9.tar.gz'
head 'http://luajit.org/git/luajit-2.0.git', :using => :git
homepage 'http://luajit.org/luajit.html'
md5 'e7e03e67e2550817358bc28b44270c6d'
# Skip cleaning both empty folders and bin/libs so external symbols still work.
skip_clean :all
fails_with_llvm "_Unwind_Exception_Class undeclared", :build => 2336
def options
[["--enable-debug", "Build with debugging symbols."]]
end
def install
if ARGV.include? '--enable-debug'
system "make", "CCDEBUG=-g", "PREFIX=#{prefix}",
"TARGET_CC=#{ENV['CC']}",
"amalg"
system "make", "CCDEBUG=-g", "PREFIX=#{prefix}",
"TARGET_CC=#{ENV['CC']}",
"install"
else
system "make", "PREFIX=#{prefix}",
"TARGET_CC=#{ENV['CC']}",
"amalg"
system "make", "PREFIX=#{prefix}",
"TARGET_CC=#{ENV['CC']}",
"install"
end
# Non-versioned symlink
if ARGV.build_head?
version = "2.0.0-beta9"
else
version = @version
end
ln_s bin+"luajit-#{version}", bin+"luajit"
end
end