Permalink
Browse files

Lua: take 5.1.4-3 patch from MacPorts

Closes #10790.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
  • Loading branch information...
1 parent db23cac commit 86b649de8f665cc6c2a9c9c89152414a4983210b @lukecampbell lukecampbell committed with adamv Mar 8, 2012
Showing with 9 additions and 9 deletions.
  1. +9 −9 Library/Formula/lua.rb
View
@@ -1,8 +1,8 @@
require 'formula'
class Lua < Formula
- url 'http://www.lua.org/ftp/lua-5.1.4.tar.gz'
homepage 'http://www.lua.org/'
+ url 'http://www.lua.org/ftp/lua-5.1.4.tar.gz'
md5 'd0870f2de55d59c1c8419f36e8fac150'
fails_with_llvm "Lua itself compiles with LLVM, but may fail when other software tries to link.",
@@ -11,25 +11,25 @@ class Lua < Formula
# Skip cleaning both empty folders and bin/libs so external symbols still work.
skip_clean :all
+ def options
+ [['--completion', 'Enables advanced readline support']]
+ end
+
# Be sure to build a dylib, or else runtime modules will pull in another static copy of liblua = crashy
# See: https://github.com/mxcl/homebrew/pull/5043
def patches
+ p = [DATA]
# completion provided by advanced readline power patch from
# http://lua-users.org/wiki/LuaPowerPatches
if ARGV.include? '--completion'
- [DATA, 'http://luajit.org/patches/lua-5.1.4-advanced_readline.patch']
- else
- DATA
+ p << 'http://luajit.org/patches/lua-5.1.4-advanced_readline.patch'
end
- end
-
- def options
- [['--completion', 'Enables advanced readline support']]
+ p
end
def install
# Apply patch-level 2
- curl "http://www.lua.org/ftp/patch-lua-5.1.4-3", "-O"
+ curl "https://trac.macports.org/export/90538/trunk/dports/lang/lua/files/patch-lua-5.1.4-3", "-O"
safe_system '/usr/bin/patch', '-d', 'src', '-i', '../patch-lua-5.1.4-3'
# we could use the patches method if it supported additional arguments (-d in our case)

0 comments on commit 86b649d

Please sign in to comment.