aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/lua.rb
diff options
context:
space:
mode:
authorMax Howell2011-08-04 12:47:53 +0100
committerMax Howell2011-08-05 13:55:25 +0100
commit8fc3cc59a3999bdaeb376becafd667c7d7f68815 (patch)
tree57ce1396079d0c24e34f4b8e726656db76666bb5 /Library/Formula/lua.rb
parent7cbf34be5d7f23afe745dd5f5b7988eeb8c2bf49 (diff)
downloadhomebrew-8fc3cc59a3999bdaeb376becafd667c7d7f68815.tar.bz2
Make luarocks "just work" with lua
Fixes #5735. Our default install now doesn't make `/usr/local` group writable in an attempt to "play nicely", this caused luarocks to refuse to install anything because it would assume a non-writable prefix would mean it couldn't write any files. Which is an incorrect check since it only installs files to `prefix/lib`. So the check is removed with a patch if Homebrew is installed to `/usr/local`.
Diffstat (limited to 'Library/Formula/lua.rb')
-rw-r--r--Library/Formula/lua.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Formula/lua.rb b/Library/Formula/lua.rb
index 1d2cf89b8..b62ac6db6 100644
--- a/Library/Formula/lua.rb
+++ b/Library/Formula/lua.rb
@@ -31,6 +31,10 @@ class Lua < Formula
s.gsub! "INSTALL_MAN= ${prefix}/man/man1", "INSTALL_MAN= ${prefix}/share/man/man1"
end
+ # this ensures that this symlinking for lua starts at lib/lua/5.1 and not
+ # below that, thus making luarocks work
+ (HOMEBREW_PREFIX/"lib/lua"/version.split('.')[0..1].join('.')).mkpath
+
system "make", "macosx", "INSTALL_TOP=#{prefix}", "INSTALL_MAN=#{man1}"
system "make", "install", "INSTALL_TOP=#{prefix}", "INSTALL_MAN=#{man1}"