aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2014-12-17 10:05:27 +0000
committerMike McQuaid2014-12-17 10:05:27 +0000
commitaaa693eebaefda47cd53ea9b1a37dbd65b1f3a94 (patch)
tree041f97ae2ed25ce118c10fdd324647d139a34fb1 /Library
parentc26a9c0a5a17a90e0aa0617bba2e861905bee41e (diff)
downloadhomebrew-aaa693eebaefda47cd53ea9b1a37dbd65b1f3a94.tar.bz2
luajit: general cleanup.
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/luajit.rb48
1 files changed, 25 insertions, 23 deletions
diff --git a/Library/Formula/luajit.rb b/Library/Formula/luajit.rb
index 4255bbfc8..8cf859162 100644
--- a/Library/Formula/luajit.rb
+++ b/Library/Formula/luajit.rb
@@ -1,15 +1,15 @@
-require 'formula'
+require "formula"
class Luajit < Formula
- homepage 'http://luajit.org/luajit.html'
- url 'http://luajit.org/download/LuaJIT-2.0.3.tar.gz'
- sha1 '2db39e7d1264918c2266b0436c313fbd12da4ceb'
- head 'http://luajit.org/git/luajit-2.0.git'
+ homepage "http://luajit.org/luajit.html"
+ url "http://luajit.org/download/LuaJIT-2.0.3.tar.gz"
+ sha1 "2db39e7d1264918c2266b0436c313fbd12da4ceb"
+ head "http://luajit.org/git/luajit-2.0.git"
revision 1
devel do
- version '2.1'
- url 'http://luajit.org/git/luajit-2.0.git', :branch => 'v2.1'
+ url "http://luajit.org/git/luajit-2.0.git", :branch => "v2.1"
+ version "2.1"
end
bottle do
@@ -18,41 +18,43 @@ class Luajit < Formula
sha1 "0363e0a9c7ff2580d35363622b228fba7bb8f770" => :mountain_lion
end
- skip_clean 'lib/lua/5.1', 'share/lua/5.1'
+ skip_clean "lib/lua/5.1", "share/lua/5.1"
- option "enable-debug", "Build with debugging symbols"
+ deprecated_option "enable-debug" => "with-debug"
+
+ option "with-debug", "Build with debugging symbols"
def install
# 1 - Override the hardcoded gcc.
- # 2 - Remove the '-march=i686' so we can set the march in cflags.
+ # 2 - Remove the "-march=i686" so we can set the march in cflags.
# Both changes should persist and were discussed upstream.
- inreplace 'src/Makefile' do |f|
- f.change_make_var! 'CC', ENV.cc
- f.change_make_var! 'CCOPT_x86', ''
+ inreplace "src/Makefile" do |f|
+ f.change_make_var! "CC", ENV.cc
+ f.change_make_var! "CCOPT_x86", ""
end
ENV.O2 # Respect the developer's choice.
args = %W[PREFIX=#{prefix}]
- # This doesn't yet work under superenv because it removes '-g'
- args << 'CCDEBUG=-g' if build.include? 'enable-debug'
+ # This doesn't yet work under superenv because it removes "-g"
+ args << "CCDEBUG=-g" if build.with? "debug"
# The development branch of LuaJIT normally does not install "luajit".
- args << 'INSTALL_TNAME=luajit' if build.devel?
+ args << "INSTALL_TNAME=luajit" if build.devel?
- system 'make', 'amalg', *args
- system 'make', 'install', *args
+ system "make", "amalg", *args
+ system "make", "install", *args
# Having an empty Lua dir in Lib can screw with the new Lua setup.
- rm_rf prefix/'lib/lua'
- rm_rf prefix/'share/lua'
+ rm_rf prefix/"lib/lua"
+ rm_rf prefix/"share/lua"
end
test do
- system "#{bin}/luajit", "-e", <<-EOS.strip
+ system "#{bin}/luajit", "-e", <<-EOS.undent
local ffi = require("ffi")
ffi.cdef("int printf(const char *fmt, ...);")
- ffi.C.printf("Hello %s!\\n", "#{ENV['USER']}")
- EOS
+ ffi.C.printf("Hello %s!\\n", "#{ENV["USER"]}")
+ EOS
end
end