diff options
author | MCApollo <34170230+MCApollo@users.noreply.github.com> | 2019-04-20 20:49:46 -0500 |
---|---|---|
committer | MCApollo <34170230+MCApollo@users.noreply.github.com> | 2019-04-23 20:18:47 -0500 |
commit | 12335518ab39608d58370c85ff9f5384ad2aa5f7 (patch) | |
tree | 352d81f2a2de3f1252af732080ec0fde38c13b4d /homebrew/luaat51/patches.sh | |
parent | a2b26ad12d4fa12f0273645caf4be6d0b8b71e7c (diff) |
Ported in the homebrew-marauder for a hacky update/import system.
TODO: Maybe add a license & fix up messy code.
Diffstat (limited to 'homebrew/luaat51/patches.sh')
-rwxr-xr-x | homebrew/luaat51/patches.sh | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/homebrew/luaat51/patches.sh b/homebrew/luaat51/patches.sh new file mode 100755 index 000000000..bacbf5b56 --- /dev/null +++ b/homebrew/luaat51/patches.sh @@ -0,0 +1,63 @@ +echo 'Creating brew-patch.diff' +cat << EOF >> brew-patch.diff +diff --git a/Makefile b/Makefile +index 209a132..9387b09 100644 +--- a/Makefile ++++ b/Makefile +@@ -43,7 +43,7 @@ PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris + # What to install. + 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.5.dylib + TO_MAN= lua.1 luac.1 + + # Lua version and release. +@@ -64,6 +64,8 @@ install: dummy + 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.5.dylib $(INSTALL_LIB)/liblua.5.1.dylib ++ ln -s -f liblua.5.1.dylib $(INSTALL_LIB)/liblua5.1.dylib + + ranlib: + cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB) +diff --git a/src/Makefile b/src/Makefile +index e0d4c9f..4477d7b 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -22,7 +22,7 @@ MYLIBS= + + PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris + +-LUA_A= liblua.a ++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 +@@ -48,11 +48,13 @@ o: $(ALL_O) + a: $(ALL_A) + + $(LUA_A): $(CORE_O) $(LIB_O) +- $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files +- $(RANLIB) $@ ++ $(CC) -dynamiclib -install_name @LUA_PREFIX@/lib/liblua.5.1.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.5 $(LIBS) + + $(LUAC_T): $(LUAC_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) +@@ -99,7 +101,7 @@ linux: + $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" + + macosx: +- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline" ++ $(MAKE) all MYCFLAGS="MYCFLAGS_VAL" MYLIBS="-lreadline" + # use this on Mac OS X 10.3- + # $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX +EOF |