aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorHiroaki Nakamura2012-11-24 19:41:54 +0900
committerAdam Vandenberg2013-02-01 18:48:38 -0800
commit6ecc2575c4c659c29769e5cad353e2d07a9ada04 (patch)
tree5c0def87d0d86eade02b703f0f96bb7e8b42c4a3 /Library/Formula
parente3ca3099c97ec26c66331c2100eaee87a1125092 (diff)
downloadhomebrew-6ecc2575c4c659c29769e5cad353e2d07a9ada04.tar.bz2
Lua 5.1.5
Closes #16213. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/lua.rb30
1 files changed, 13 insertions, 17 deletions
diff --git a/Library/Formula/lua.rb b/Library/Formula/lua.rb
index d2fd1145e..805421dfe 100644
--- a/Library/Formula/lua.rb
+++ b/Library/Formula/lua.rb
@@ -4,8 +4,8 @@ class Lua < Formula
# 5.2 is not fully backwards compatible, and breaks e.g. luarocks.
# It is available in Homebrew-versions for the time being.
homepage 'http://www.lua.org/'
- url 'http://www.lua.org/ftp/lua-5.1.4.tar.gz'
- sha1 '2b11c8e60306efb7f0734b747588f57995493db7'
+ url 'http://www.lua.org/ftp/lua-5.1.5.tar.gz'
+ sha1 'b3882111ad02ecc6b972f8c1241647905cb2e3fc'
fails_with :llvm do
build 2326
@@ -30,16 +30,12 @@ class Lua < Formula
def install
ENV.universal_binary if build.universal?
- # Apply patch-level 2
- 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)
-
# Use our CC/CFLAGS to compile.
inreplace 'src/Makefile' do |s|
s.remove_make_var! 'CC'
s.change_make_var! 'CFLAGS', "#{ENV.cflags} $(MYCFLAGS)"
s.change_make_var! 'MYLDFLAGS', ENV.ldflags
+ s.sub! 'MYCFLAGS_VAL', "-fno-common -DLUA_USE_LINUX"
end
# Fix path in the config header
@@ -64,7 +60,7 @@ end
__END__
diff --git a/Makefile b/Makefile
-index 6e78f66..6b48d2b 100644
+index 209a132..9387b09 100644
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,7 @@ PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
@@ -72,7 +68,7 @@ index 6e78f66..6b48d2b 100644
TO_BIN= lua luac
TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
-TO_LIB= liblua.a
-+TO_LIB= liblua.5.1.4.dylib
++TO_LIB= liblua.5.1.5.dylib
TO_MAN= lua.1 luac.1
# Lua version and release.
@@ -80,13 +76,13 @@ index 6e78f66..6b48d2b 100644
cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
-+ ln -s -f liblua.5.1.4.dylib $(INSTALL_LIB)/liblua.5.1.dylib
++ ln -s -f liblua.5.1.5.dylib $(INSTALL_LIB)/liblua.5.1.dylib
+ ln -s -f liblua.5.1.dylib $(INSTALL_LIB)/liblua.dylib
ranlib:
cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB)
diff --git a/src/Makefile b/src/Makefile
-index e4a3cd6..e35a1b5 100644
+index e0d4c9f..4477d7b 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -22,7 +22,7 @@ MYLIBS=
@@ -94,7 +90,7 @@ index e4a3cd6..e35a1b5 100644
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
-LUA_A= liblua.a
-+LUA_A= liblua.5.1.4.dylib
++LUA_A= liblua.5.1.5.dylib
CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
lundump.o lvm.o lzio.o
@@ -102,16 +98,16 @@ index e4a3cd6..e35a1b5 100644
a: $(ALL_A)
$(LUA_A): $(CORE_O) $(LIB_O)
-- $(AR) $@ $?
+- $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files
- $(RANLIB) $@
+ $(CC) -dynamiclib -install_name HOMEBREW_PREFIX/lib/liblua.5.1.dylib \
-+ -compatibility_version 5.1 -current_version 5.1.4 \
-+ -o liblua.5.1.4.dylib $^
++ -compatibility_version 5.1 -current_version 5.1.5 \
++ -o liblua.5.1.5.dylib $^
$(LUA_T): $(LUA_O) $(LUA_A)
- $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
+ $(CC) -fno-common $(MYLDFLAGS) \
-+ -o $@ $(LUA_O) $(LUA_A) -L. -llua.5.1.4 $(LIBS)
++ -o $@ $(LUA_O) $(LUA_A) -L. -llua.5.1.5 $(LIBS)
$(LUAC_T): $(LUAC_O) $(LUA_A)
$(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
@@ -120,7 +116,7 @@ index e4a3cd6..e35a1b5 100644
macosx:
- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
-+ $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX -fno-common" MYLIBS="-lreadline"
++ $(MAKE) all MYCFLAGS="MYCFLAGS_VAL" MYLIBS="-lreadline"
# use this on Mac OS X 10.3-
# $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX