2010-03-08 12:22:58 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Luajit < Formula
|
2011-05-21 00:37:03 +00:00
|
|
|
url 'http://luajit.org/download/LuaJIT-2.0.0-beta7.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-05-21 00:37:03 +00:00
|
|
|
md5 'b845dec15dd9eba2fd17d865601a52e5'
|
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-06-09 19:23:07 +00:00
|
|
|
def options
|
|
|
|
[["--debug", "Build with debugging symbols."]]
|
|
|
|
end
|
|
|
|
|
2010-03-08 12:22:58 +00:00
|
|
|
def install
|
2011-06-09 19:23:07 +00:00
|
|
|
if ARGV.include? '--debug'
|
|
|
|
system "make", "CCDEBUG=-g", "PREFIX=#{prefix}", "install"
|
|
|
|
else
|
|
|
|
system "make", "PREFIX=#{prefix}", "install"
|
|
|
|
end
|
2011-04-01 12:57:51 +00:00
|
|
|
# Non-versioned symlink
|
|
|
|
ln_s bin+"luajit-#{version}", bin+"luajit"
|
2010-03-08 12:22:58 +00:00
|
|
|
end
|
|
|
|
end
|