2010-03-08 12:22:58 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Luajit < Formula
|
2011-12-17 22:12:44 +00:00
|
|
|
url 'http://luajit.org/download/LuaJIT-2.0.0-beta9.tar.gz'
|
2010-03-08 12:22:58 +00:00
|
|
|
head 'http://luajit.org/git/luajit-2.0.git', :using => :git
|
2010-09-10 05:37:52 +00:00
|
|
|
homepage 'http://luajit.org/luajit.html'
|
2011-12-17 22:12:44 +00:00
|
|
|
md5 'e7e03e67e2550817358bc28b44270c6d'
|
2010-03-08 12:22:58 +00:00
|
|
|
|
2011-04-01 12:57:51 +00:00
|
|
|
# Skip cleaning both empty folders and bin/libs so external symbols still work.
|
|
|
|
skip_clean :all
|
2010-03-08 12:22:58 +00:00
|
|
|
|
2011-11-23 17:20:50 +00:00
|
|
|
fails_with_llvm "_Unwind_Exception_Class undeclared", :build => 2336
|
2011-08-04 02:03:24 +00:00
|
|
|
|
2011-06-09 19:23:07 +00:00
|
|
|
def options
|
2012-03-15 22:20:25 +00:00
|
|
|
[["--enable-debug", "Build with debugging symbols."]]
|
2011-06-09 19:23:07 +00:00
|
|
|
end
|
|
|
|
|
2010-03-08 12:22:58 +00:00
|
|
|
def install
|
2012-03-15 22:20:25 +00:00
|
|
|
if ARGV.include? '--enable-debug'
|
2011-08-04 02:03:24 +00:00
|
|
|
system "make", "CCDEBUG=-g", "PREFIX=#{prefix}",
|
|
|
|
"TARGET_CC=#{ENV['CC']}",
|
|
|
|
"amalg"
|
|
|
|
system "make", "CCDEBUG=-g", "PREFIX=#{prefix}",
|
|
|
|
"TARGET_CC=#{ENV['CC']}",
|
|
|
|
"install"
|
2011-06-09 19:23:07 +00:00
|
|
|
else
|
2011-08-04 02:03:24 +00:00
|
|
|
system "make", "PREFIX=#{prefix}",
|
|
|
|
"TARGET_CC=#{ENV['CC']}",
|
|
|
|
"amalg"
|
|
|
|
system "make", "PREFIX=#{prefix}",
|
|
|
|
"TARGET_CC=#{ENV['CC']}",
|
|
|
|
"install"
|
2011-06-09 19:23:07 +00:00
|
|
|
end
|
2011-08-24 04:31:05 +00:00
|
|
|
|
2011-04-01 12:57:51 +00:00
|
|
|
# Non-versioned symlink
|
2011-08-24 04:31:05 +00:00
|
|
|
if ARGV.build_head?
|
2011-12-17 22:12:44 +00:00
|
|
|
version = "2.0.0-beta9"
|
2011-08-24 04:31:05 +00:00
|
|
|
else
|
|
|
|
version = @version
|
|
|
|
end
|
2011-04-01 12:57:51 +00:00
|
|
|
ln_s bin+"luajit-#{version}", bin+"luajit"
|
2010-03-08 12:22:58 +00:00
|
|
|
end
|
|
|
|
end
|