summaryrefslogtreecommitdiff
path: root/homebrew/lua/.beer
diff options
context:
space:
mode:
authorMCApollo <34170230+MCApollo@users.noreply.github.com>2019-04-20 20:49:46 -0500
committerMCApollo <34170230+MCApollo@users.noreply.github.com>2019-04-23 20:18:47 -0500
commit12335518ab39608d58370c85ff9f5384ad2aa5f7 (patch)
tree352d81f2a2de3f1252af732080ec0fde38c13b4d /homebrew/lua/.beer
parenta2b26ad12d4fa12f0273645caf4be6d0b8b71e7c (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/lua/.beer')
-rw-r--r--homebrew/lua/.beer86
1 files changed, 86 insertions, 0 deletions
diff --git a/homebrew/lua/.beer b/homebrew/lua/.beer
new file mode 100644
index 000000000..1a9e9a3c0
--- /dev/null
+++ b/homebrew/lua/.beer
@@ -0,0 +1,86 @@
+{
+ "name": "Lua",
+ "description": "Powerful, lightweight programming language",
+ "url": "https://www.lua.org/ftp/lua-5.3.5.tar.gz",
+ "mirror": null,
+ "homepage": "https://www.lua.org/",
+ "depends": [],
+ "resource": [],
+ "conflicts": [],
+ "patches": [
+ {
+ "url": null,
+ "data": [
+ "diff --git a/Makefile b/Makefile\n",
+ "index 7fa91c8..a825198 100644\n",
+ "--- a/Makefile\n",
+ "+++ b/Makefile\n",
+ "@@ -41,7 +41,7 @@ PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris\n",
+ " # What to install.\n",
+ " TO_BIN= lua luac\n",
+ " TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp\n",
+ "-TO_LIB= liblua.a\n",
+ "+TO_LIB= liblua.5.3.5.dylib\n",
+ " TO_MAN= lua.1 luac.1\n",
+ "\n",
+ " # Lua version and release.\n",
+ "@@ -63,6 +63,8 @@ install: dummy\n",
+ "\tcd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)\n",
+ "\tcd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)\n",
+ "\tcd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)\n",
+ "+\tln -s -f liblua.5.3.5.dylib $(INSTALL_LIB)/liblua.5.3.dylib\n",
+ "+\tln -s -f liblua.5.3.dylib $(INSTALL_LIB)/liblua.dylib\n",
+ "\n",
+ " uninstall:\n",
+ "\tcd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)\n",
+ "diff --git a/src/Makefile b/src/Makefile\n",
+ "index 2e7a412..d0c4898 100644\n",
+ "--- a/src/Makefile\n",
+ "+++ b/src/Makefile\n",
+ "@@ -28,7 +28,7 @@ MYOBJS=\n",
+ "\n",
+ " PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris\n",
+ "\n",
+ "-LUA_A=\tliblua.a\n",
+ "+LUA_A=\tliblua.5.3.5.dylib\n",
+ " CORE_O=\tlapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \\\n",
+ "\tlmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \\\n",
+ "\tltm.o lundump.o lvm.o lzio.o\n",
+ "@@ -56,11 +56,12 @@ o:\t$(ALL_O)\n",
+ " a:\t$(ALL_A)\n",
+ "\n",
+ " $(LUA_A): $(BASE_O)\n",
+ "-\t$(AR) $@ $(BASE_O)\n",
+ "-\t$(RANLIB) $@\n",
+ "+\t$(CC) -dynamiclib -install_name @LUA_PREFIX@/lib/liblua.5.3.dylib \\\n",
+ "+\t\t-compatibility_version 5.3 -current_version 5.3.5 \\\n",
+ "+\t\t-o liblua.5.3.5.dylib $^\n",
+ "\n",
+ " $(LUA_T): $(LUA_O) $(LUA_A)\n",
+ "-\t$(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)\n",
+ "+\t$(CC) -fno-common $(MYLDFLAGS) -o $@ $(LUA_O) $(LUA_A) -L. -llua.5.3.5 $(LIBS)\n",
+ "\n",
+ " $(LUAC_T): $(LUAC_O) $(LUA_A)\n",
+ "\t$(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)\n",
+ "@@ -110,7 +111,7 @@ linux:\n",
+ "\t$(MAKE) $(ALL) SYSCFLAGS=\"-DLUA_USE_LINUX\" SYSLIBS=\"-Wl,-E -ldl -lreadline\"\n",
+ "\n",
+ " macosx:\n",
+ "-\t$(MAKE) $(ALL) SYSCFLAGS=\"-DLUA_USE_MACOSX\" SYSLIBS=\"-lreadline\"\n",
+ "+\t$(MAKE) $(ALL) SYSCFLAGS=\"-DLUA_USE_MACOSX -fno-common\" SYSLIBS=\"-lreadline\"\n",
+ "\n",
+ " mingw:\n",
+ "\t$(MAKE) \"LUA_A=lua53.dll\" \"LUA_T=lua.exe\" \\\n"
+ ]
+ }
+ ],
+ "install": [
+ "inreplace \"src/Makefile\" do |s|",
+ "s.gsub! \"@LUA_PREFIX@\", prefix",
+ "s.remove_make_var! \"CC\"",
+ "s.change_make_var! \"CFLAGS\", \"#{ENV.cflags} -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS)\"",
+ "s.change_make_var! \"MYLDFLAGS\", ENV.ldflags"
+ ],
+ "version": "5.3.5",
+ "file": "lua.rb"
+} \ No newline at end of file