Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
--- lua-5.3.3/src/luaconf.h.orig	2016-05-01 20:06:09.000000000 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+++ lua-5.3.3/src/luaconf.h	2016-06-23 10:02:23.471604030 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
@@ -72,6 +72,12 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 #endif
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+#if defined(LUA_USE_MIDIPIX)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+#define LUA_USE_POSIX
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+#define LUA_USE_DLOPEN		/* needs an extra library: -ldl */
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+#endif
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 /*
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 @@ LUA_C89_NUMBERS ensures that Lua uses the largest types available for
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 ** C89 ('long' and 'double'); Windows always has '__int64', so it does
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
@@ -188,7 +194,7 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 #else			/* }{ */
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
-#define LUA_ROOT	"/usr/local/"
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+#define LUA_ROOT	"/usr/"
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 #define LUA_LDIR	LUA_ROOT "share/lua/" LUA_VDIR "/"
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 #define LUA_CDIR	LUA_ROOT "lib/lua/" LUA_VDIR "/"
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 #define LUA_PATH_DEFAULT  \
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
--- lua-5.3.3/src/Makefile.orig	2015-05-27 11:10:11.000000000 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 828f47
+++ lua-5.3.3/src/Makefile	2016-06-23 10:45:40.323546394 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
@@ -26,9 +26,10 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
-PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+PLATS= aix bsd c89 freebsd generic linux macosx midipix mingw posix solaris
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 LUA_A=	liblua.a
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+LUA_SO=	liblua.so
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 CORE_O=	lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 	lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 	ltm.o lundump.o lvm.o lzio.o
Lucio Andrés Illanes Albornoz (arab, vxp) 828f47
@@ -36,14 +37,14 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 828f47
 	lmathlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o loadlib.o linit.o
Lucio Andrés Illanes Albornoz (arab, vxp) 828f47
 BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
Lucio Andrés Illanes Albornoz (arab, vxp) 828f47
 
Lucio Andrés Illanes Albornoz (arab, vxp) 828f47
-LUA_T=	lua
Lucio Andrés Illanes Albornoz (arab, vxp) 347d4f
+LUA_T=	lua$(V)
Lucio Andrés Illanes Albornoz (arab, vxp) 828f47
 LUA_O=	lua.o
Lucio Andrés Illanes Albornoz (arab, vxp) 828f47
 
Lucio Andrés Illanes Albornoz (arab, vxp) 828f47
-LUAC_T=	luac
Lucio Andrés Illanes Albornoz (arab, vxp) 347d4f
+LUAC_T=	luac$(V)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 LUAC_O=	luac.o
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 ALL_A= $(LUA_A)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 # Targets start here.
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
@@ -56,9 +57,14 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 a:	$(ALL_A)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 $(LUA_A): $(BASE_O)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
-	$(AR) $@ $(BASE_O)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+	$(AR) rcs $@ $(BASE_O)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 	$(RANLIB) $@
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+$(LUA_SO): $(CORE_O) $(LIB_O)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+	$(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+	ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+	ln -sf $(LUA_SO).$(R) $(LUA_SO)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 $(LUA_T): $(LUA_O) $(LUA_A)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 	$(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
@@ -112,6 +118,9 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 macosx:
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 	$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" CC=cc
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+midipix:
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+	$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MIDIPIX" SYSLIBS="-Wl,-E -ldl"
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 mingw:
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 	$(MAKE) "LUA_A=lua53.dll" "LUA_T=lua.exe" \
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 	"AR=$(CC) -shared -o" "RANLIB=strip --strip-unneeded" \
Lucio Andrés Illanes Albornoz (arab, vxp) 828f47
--- lua-5.3.3/Makefile.orig	2015-05-27 11:10:11.000000000 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 347d4f
+++ lua-5.3.3/Makefile	2016-06-23 10:59:29.519527991 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 828f47
@@ -36,23 +36,25 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 # Convenience platforms targets.
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
-PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+PLATS= aix bsd c89 freebsd generic linux macosx midipix mingw posix solaris
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+# Lua version and release.
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+V= 5.3
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+R= $V.3
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 # What to install.
Lucio Andrés Illanes Albornoz (arab, vxp) 828f47
-TO_BIN= lua luac
Lucio Andrés Illanes Albornoz (arab, vxp) 347d4f
+TO_BIN= lua$(V) luac$(V)
Lucio Andrés Illanes Albornoz (arab, vxp) 347d4f
+TO_BIN_LINKS= lua$(V):lua luac$(V):luac
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 TO_LIB= liblua.a
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+TO_LIBSO= liblua.so liblua.so.$V
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 TO_MAN= lua.1 luac.1
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
-# Lua version and release.
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
-V= 5.3
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
-R= $V.3
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
-
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 # Targets start here.
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 all:	$(PLAT)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 $(PLATS) clean:
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
-	cd src && $(MAKE) $@
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+	cd src && $(MAKE) $@ V=$(V) R=$(R)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 test:	dummy
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 	src/lua -v
Lucio Andrés Illanes Albornoz (arab, vxp) 828f47
@@ -60,8 +62,10 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 828f47
 install: dummy
Lucio Andrés Illanes Albornoz (arab, vxp) 828f47
 	cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 	cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
Lucio Andrés Illanes Albornoz (arab, vxp) 347d4f
+	cd src && for FNAME in $(TO_BIN_LINKS); do echo ln -fs $${FNAME%:*} $(INSTALL_BIN)/$${FNAME#*:}; ln -fs $${FNAME%:*} $(INSTALL_BIN)/$${FNAME#*:}; done
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 	cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 	cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
+	cd src && $(INSTALL_EXEC) $(TO_LIBSO) $(INSTALL_LIB)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 	cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 
Lucio Andrés Illanes Albornoz (arab, vxp) 6ad215
 uninstall: