lua: add 5.3.x serie
PATCH 1/6 lua: add 5.3.x serie
--- package/lua/5.3.0/0001-root-path.patch | 17 ++++++ package/lua/5.3.0/0002-shared-libs-for-lua.patch | 78 ++++++++++++++++++++++++ package/lua/5.3.0/0004-lua-pc.patch | 40 ++++++++++++ package/lua/5.3.0/0011-linenoise.patch | 26 ++++++++ package/lua/Config.in | 4 ++ package/lua/lua.mk | 15 ++++- package/luarocks/luarocks.mk | 6 +- 7 files changed, 182 insertions(+), 4 deletions(-) create mode 100644 package/lua/5.3.0/0001-root-path.patch create mode 100644 package/lua/5.3.0/0002-shared-libs-for-lua.patch create mode 100644 package/lua/5.3.0/0004-lua-pc.patch create mode 100644 package/lua/5.3.0/0011-linenoise.patch
package/lua/5.3.0/0001-root-path.patch new file +17 -0
@@ -0,0 +1,17 @@ +Adjust installation location to /usr. + +Signed-off-by: Francois Perrad <[email protected]> + +Index: b/src/luaconf.h +=================================================================== +--- a/src/luaconf.h ++++ b/src/luaconf.h +@@ -175,7 +175,7 @@ + + #else /* }{ */ + +-#define LUA_ROOT "/usr/local/" ++#define LUA_ROOT "/usr/" + #define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/" + #define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/" + #define LUA_PATH_DEFAULT \
package/lua/5.3.0/0002-shared-libs-for-lua.patch new file +78 -0
78 lines not on this page · raw message
package/lua/5.3.0/0004-lua-pc.patch new file +40 -0
@@ -0,0 +1,40 @@ +add lua.pc + +Signed-off-by: Francois Perrad <[email protected]> + +Index: b/etc/lua.pc +=================================================================== +--- /dev/null ++++ b/etc/lua.pc +@@ -0,0 +1,31 @@ ++# lua.pc -- pkg-config data for Lua ++ ++# vars from install Makefile ++ ++# grep '^V=' ../Makefile ++V= 5.3 ++# grep '^R=' ../Makefile ++R= 5.3.0 ++ ++# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' ++prefix= /usr ++INSTALL_BIN= ${prefix}/bin ++INSTALL_INC= ${prefix}/include ++INSTALL_LIB= ${prefix}/lib ++INSTALL_MAN= ${prefix}/man/man1 ++INSTALL_LMOD= ${prefix}/share/lua/${V} ++INSTALL_CMOD= ${prefix}/lib/lua/${V} ++ ++# canonical vars ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: Lua ++Description: An Extensible Extension Language ++Version: ${R} ++Requires: ++Libs: -L${libdir} -llua -lm ++Cflags: -I${includedir} ++ ++# (end of lua.pc)
package/lua/5.3.0/0011-linenoise.patch new file +26 -0
@@ -0,0 +1,26 @@ +Add support of linenoise (replace readline) + +see discussion, http://lua-users.org/lists/lua-l/2010-03/msg00879.html + +Signed-off-by: Francois Perrad <[email protected]> + +Index: b/src/lua.c +=================================================================== +--- a/src/lua.c ++++ b/src/lua.c +@@ -85,6 +85,15 @@ + add_history(lua_tostring(L, idx)); /* add it to history */ + #define lua_freeline(L,b) ((void)L, free(b)) + ++#elif defined(LUA_USE_LINENOISE) ++ ++#include <linenoise.h> ++#define lua_readline(L,b,p) ((void)L, ((b)=linenoise(p)) != NULL) ++#define lua_saveline(L,idx) \ ++ if (lua_rawlen(L,idx) > 0) /* non-empty line? */ \ ++ linenoiseHistoryAdd(lua_tostring(L, idx)); /* add it to history */ ++#define lua_freeline(L,b) ((void)L, free(b)) ++ + #else /* }{ */ + + #define lua_readline(L,b,p) \
package/lua/Config.in +4 -0
@@ -23,11 +23,15 @@ choice config BR2_PACKAGE_LUA_5_2 bool "Lua 5.2.x" + config BR2_PACKAGE_LUA_5_3 + bool "Lua 5.3.x" + endchoice config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION default "5.1" if BR2_PACKAGE_LUA_5_1 default "5.2" if BR2_PACKAGE_LUA_5_2 + default "5.3" if BR2_PACKAGE_LUA_5_3 choice prompt "Lua command-line editing"
package/lua/lua.mk +12 -3
@@ -4,11 +4,15 @@ # ################################################################################ +ifeq ($(BR2_PACKAGE_LUA_5_3),y) +LUA_VERSION = 5.3.0 +else ifeq ($(BR2_PACKAGE_LUA_5_2),y) LUA_VERSION = 5.2.3 else LUA_VERSION = 5.1.5 endif +endif LUA_SITE = http://www.lua.org/ftp LUA_INSTALL_STAGING = YES LUA_LICENSE = MIT
@@ -23,10 +27,11 @@ LUA_PROVIDES = luainterpreter LUA_CFLAGS = -Wall -fPIC -DLUA_USE_POSIX ifeq ($(BR2_PACKAGE_LUA_5_2),y) -LUA_CFLAGS += -DLUA_COMPAT_ALL -ifneq ($(BR2_LARGEFILE),y) -LUA_CFLAGS += -D_FILE_OFFSET_BITS=32 + LUA_CFLAGS += -DLUA_COMPAT_ALL endif + +ifeq ($(BR2_PACKAGE_LUA_5_3),y) + LUA_CFLAGS += -DLUA_COMPAT_5_2 endif ifeq ($(BR2_STATIC_LIBS),y)
@@ -49,6 +54,10 @@ ifeq ($(BR2_PACKAGE_LUA_LINENOISE),y) endif endif +ifneq ($(BR2_LARGEFILE),y) + LUA_CFLAGS += -D_FILE_OFFSET_BITS=32 +endif + # We never want to have host-readline and host-ncurses as dependencies # of host-lua. HOST_LUA_DEPENDENCIES =
package/luarocks/luarocks.mk +5 -1
@@ -13,6 +13,10 @@ HOST_LUAROCKS_DEPENDENCIES = host-luainterpreter LUAROCKS_CONFIG_DIR = $(HOST_DIR)/usr/etc/luarocks LUAROCKS_CONFIG_FILE = $(LUAROCKS_CONFIG_DIR)/config-$(LUAINTERPRETER_ABIVER).lua +LUAROCKS_CFLAGS = $(TARGET_CFLAGS) -fPIC +ifeq ($(BR2_PACKAGE_LUA_5_3),y) + LUAROCKS_CFLAGS += -DLUA_COMPAT_5_2 +endif HOST_LUAROCKS_CONF_OPTS = \ --prefix=$(HOST_DIR)/usr \
@@ -37,7 +41,7 @@ define HOST_LUAROCKS_INSTALL_CMDS echo " LUA_LIBDIR = [[$(STAGING_DIR)/usr/lib]]," >> $(LUAROCKS_CONFIG_FILE) echo " CC = [[$(TARGET_CC)]]," >> $(LUAROCKS_CONFIG_FILE) echo " LD = [[$(TARGET_CC)]]," >> $(LUAROCKS_CONFIG_FILE) - echo " CFLAGS = [[$(TARGET_CFLAGS) -fPIC]]," >> $(LUAROCKS_CONFIG_FILE) + echo " CFLAGS = [[$(LUAROCKS_CFLAGS)]]," >> $(LUAROCKS_CONFIG_FILE) echo " LIBFLAG = [[-shared $(TARGET_LDFLAGS)]]," >> $(LUAROCKS_CONFIG_FILE) echo "}" >> $(LUAROCKS_CONFIG_FILE) echo "external_deps_dirs = { [[$(STAGING_DIR)/usr]] }" >> $(LUAROCKS_CONFIG_FILE)
Signature · 1 line
2.1.0
PATCH 2/6 lua-modules: fix dependencies with version of lua
--- package/lbase64/Config.in | 5 +++-- package/lrandom/lrandom.mk | 2 +- package/lua-msgpack-native/Config.in | 5 +++-- package/luaposix/Config.in | 4 ++++ package/lunit/Config.in | 5 +++-- 5 files changed, 14 insertions(+), 7 deletions(-)
package/lbase64/Config.in +3 -2
@@ -1,11 +1,12 @@ config BR2_PACKAGE_LBASE64 bool "lbase64" depends on BR2_PACKAGE_HAS_LUAINTERPRETER - depends on !BR2_PACKAGE_LUA_5_2 + depends on BR2_PACKAGE_LUA_5_1 || BR2_PACKAGE_LUAJIT help A base64 library for Lua http://luaforge.net/projects/lbase64/ comment "lbase64 needs a Lua 5.1 interpreter" - depends on BR2_PACKAGE_LUA_5_2 + depends on !BR2_PACKAGE_LUA_5_1 + depends on !BR2_PACKAGE_LUAJIT
package/lrandom/lrandom.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -ifeq ($(BR2_PACKAGE_LUA_5_2),y) +ifeq ($(BR2_PACKAGE_LUA_5_2)$(BR2_PACKAGE_LUA_5_3),y) LRANDOM_VERSION = 20120430.52-1 else LRANDOM_VERSION = 20120430.51-1
package/lua-msgpack-native/Config.in +3 -2
@@ -1,7 +1,7 @@ config BR2_PACKAGE_LUA_MSGPACK_NATIVE bool "lua-msgpack-native" depends on BR2_PACKAGE_HAS_LUAINTERPRETER - depends on !BR2_PACKAGE_LUA_5_2 + depends on BR2_PACKAGE_LUA_5_1 || BR2_PACKAGE_LUAJIT help This is a native, C language implementation of msgpack (http://msgpack.org) library/protocol for Lua language
@@ -9,4 +9,5 @@ config BR2_PACKAGE_LUA_MSGPACK_NATIVE https://github.com/kengonakajima/lua-msgpack-native comment "lua-msgpack-native needs a Lua 5.1 interpreter" - depends on BR2_PACKAGE_LUA_5_2 + depends on !BR2_PACKAGE_LUA_5_1 + depends on !BR2_PACKAGE_LUAJIT
package/luaposix/Config.in +4 -0
@@ -1,6 +1,7 @@ config BR2_PACKAGE_LUAPOSIX bool "luaposix" depends on BR2_PACKAGE_HAS_LUAINTERPRETER + depends on !BR2_PACKAGE_LUA_5_3 select BR2_PACKAGE_NCURSES select BR2_PACKAGE_LUABITOP if BR2_PACKAGE_LUA_5_1 # LuaBitOp is already included in LuaJIT
@@ -13,3 +14,6 @@ config BR2_PACKAGE_LUAPOSIX APIs https://github.com/luaposix/luaposix + +comment "luaposix needs a Lua 5.1/5.2 interpreter" + depends on BR2_PACKAGE_LUA_5_3
package/lunit/Config.in +3 -2
@@ -1,10 +1,11 @@ config BR2_PACKAGE_LUNIT bool "lunit" - depends on !BR2_PACKAGE_LUA_5_2 + depends on BR2_PACKAGE_LUA_5_1 || BR2_PACKAGE_LUAJIT help A unit testing framework for Lua. http://www.mroth.net/lunit/ comment "lunit needs a Lua 5.1 interpreter" - depends on BR2_PACKAGE_LUA_5_2 + depends on !BR2_PACKAGE_LUA_5_1 + depends on !BR2_PACKAGE_LUAJIT
Signature · 1 line
2.1.0
PATCH 3/6 lua: add option 32bits
In reply to Francois Perrad--- package/lua/Config.in | 9 +++++++++ package/lua/lua.mk | 8 ++++++++ package/luabitop/Config.in | 4 ++++ 3 files changed, 21 insertions(+)
package/lua/Config.in +9 -0
@@ -33,6 +33,15 @@ config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION default "5.2" if BR2_PACKAGE_LUA_5_2 default "5.3" if BR2_PACKAGE_LUA_5_3 +if BR2_PACKAGE_LUA_5_3 +config BR2_PACKAGE_LUA_32BITS + bool "Lua 32bits" + default y if !BR2_ARCH_IS_64 + help + The option with 32 bits for both integers and floats is particularly + attractive for small machines and embedded systems. +endif + choice prompt "Lua command-line editing" default BR2_PACKAGE_LUA_EDITING_NONE
package/lua/lua.mk +8 -0
@@ -58,6 +58,14 @@ ifneq ($(BR2_LARGEFILE),y) LUA_CFLAGS += -D_FILE_OFFSET_BITS=32 endif +ifeq ($(BR2_PACKAGE_LUA_32BITS),y) +define LUA_32BITS_LUACONF + $(SED) 's/\/\* #define LUA_32BITS \*\//#define LUA_32BITS/' $(@D)/src/luaconf.h +endef + +LUA_POST_PATCH_HOOKS += LUA_32BITS_LUACONF +endif + # We never want to have host-readline and host-ncurses as dependencies # of host-lua. HOST_LUA_DEPENDENCIES =
package/luabitop/Config.in +4 -0
@@ -1,7 +1,11 @@ config BR2_PACKAGE_LUABITOP bool "luabitop" + depends on !BR2_PACKAGE_LUA_32BITS help Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise operations on numbers. http://bitop.luajit.org + +comment "luabitop needs a full Lua interpreter" + depends on BR2_PACKAGE_LUA_32BITS
Signature · 1 line
2.1.0
PATCH 3/6 lua: add option 32bits
Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Francois" == Francois Perrad <[email protected]> writes:
Signed-off-by Francois Perrad <[email protected]>--- package/lua/Config.in | 9 +++++++++ package/lua/lua.mk | 8 ++++++++ package/luabitop/Config.in | 4 ++++ 3 files changed, 21 insertions(+)package/lua/Config.in +0
-0
package/lua/Config.in config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION · line 42
Quoted 10 lines
package/lua/Config.in +7
-0@@ -33,6 +33,15 @@ config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION default "5.2" if BR2_PACKAGE_LUA_5_2 default "5.3" if BR2_PACKAGE_LUA_5_3 +if BR2_PACKAGE_LUA_5_3 +config BR2_PACKAGE_LUA_32BITS + bool "Lua 32bits" + default y if !BR2_ARCH_IS_64 + help + The option with 32 bits for both integers and floats is particularly + attractive for small machines and embedded systems.
I have extended this help text a bit to make it (imho) a bit more clear what this does and committed the series, thanks!
Signature · 1 line
Bye, Peter Korsgaard
PATCH 4/6 lsqlite3: bump to version 0.9.3
In reply to Francois Perrad--- package/lsqlite3/lsqlite3.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/lsqlite3/lsqlite3.mk +2 -2
@@ -4,8 +4,8 @@ # ################################################################################ -LSQLITE3_VERSION = 0.9.1-2 -LSQLITE3_SUBDIR = lsqlite3_fsl09t +LSQLITE3_VERSION = 0.9.3-0 +LSQLITE3_SUBDIR = lsqlite3_fsl09w LSQLITE3_DEPENDENCIES = sqlite LSQLITE3_LICENSE = MIT
Signature · 1 line
2.1.0
PATCH 5/6 lua-messagepack: bump to version 0.3.2
In reply to Francois Perrad--- package/lua-messagepack/lua-messagepack.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
package/lua-messagepack/lua-messagepack.mk +5 -1
@@ -4,8 +4,12 @@ # ################################################################################ -LUA_MESSAGEPACK_VERSION_UPSTREAM = 0.3.1 +LUA_MESSAGEPACK_VERSION_UPSTREAM = 0.3.2 +ifeq ($(BR2_PACKAGE_LUA_5_3),y) +LUA_MESSAGEPACK_VERSION = lua53-$(LUA_MESSAGEPACK_VERSION_UPSTREAM)-1 +else LUA_MESSAGEPACK_VERSION = $(LUA_MESSAGEPACK_VERSION_UPSTREAM)-1 +endif LUA_MESSAGEPACK_SUBDIR = lua-MessagePack-$(LUA_MESSAGEPACK_VERSION_UPSTREAM) LUA_MESSAGEPACK_LICENSE = MIT LUA_MESSAGEPACK_LICENSE_FILES = $(LUA_MESSAGEPACK_SUBDIR)/COPYRIGHT
Signature · 1 line
2.1.0
PATCH 6/6 luafilesystem: bump to version 1.6.3
In reply to Francois Perrad--- package/luafilesystem/0001-without_large_file.patch | 20 -------------------- package/luafilesystem/luafilesystem.mk | 6 +++++- 2 files changed, 5 insertions(+), 21 deletions(-) delete mode 100644 package/luafilesystem/0001-without_large_file.patch
package/luafilesystem/0001-without_large_file.patch deleted +0 -20
@@ -1,20 +0,0 @@ -Index: b/luafilesystem-1.6.2/src/lfs.c -=================================================================== ---- a/luafilesystem-1.6.2/src/lfs.c -+++ b/luafilesystem-1.6.2/src/lfs.c -@@ -22,13 +22,13 @@ - - #ifndef _WIN32 - #ifndef _AIX --#define _FILE_OFFSET_BITS 64 /* Linux, Solaris and HP-UX */ -+//#define _FILE_OFFSET_BITS 64 /* Linux, Solaris and HP-UX */ - #else - #define _LARGE_FILES 1 /* AIX */ - #endif - #endif - --#define _LARGEFILE64_SOURCE -+//#define _LARGEFILE64_SOURCE - - #include <errno.h> - #include <stdio.h>
package/luafilesystem/luafilesystem.mk +5 -1
@@ -4,7 +4,11 @@ # ################################################################################ -LUAFILESYSTEM_VERSION = 1.6.2-2 +LUAFILESYSTEM_VERSION = 1.6.3-1 LUAFILESYSTEM_LICENSE = MIT +LUAFILESYSTEM_SUBDIR = luafilesystem +ifneq ($(BR2_LARGEFILE),y) +LUAFILESYSTEM_BUILD_OPTS += CFLAGS="$(LUAROCKS_CFLAGS) -DLFS_DO_NOT_USE_LARGE_FILE" +endif $(eval $(luarocks-package))
Signature · 1 line
2.1.0
PATCH 1/6 lua: add 5.3.x serie
In reply to Francois PerradDear Francois Perrad,
package/lua/lua.mk line 14
Quoted 8 lines · Francois Perrad
package/lua/lua.mk +3
-0+ifeq ($(BR2_PACKAGE_LUA_5_3),y) +LUA_VERSION = 5.3.0 +else ifeq ($(BR2_PACKAGE_LUA_5_2),y) LUA_VERSION = 5.2.3 else LUA_VERSION = 5.1.5 endif
Can we get rid of Lua 5.1 ? If not, at what point do you think it will be possible ?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/6 lua: add 5.3.x serie
2015-01-16 22:25 GMT+01:00 Thomas Petazzoni
<[email protected]>:
Quoted 4 lines
Dear Francois Perrad,
On Fri, 16 Jan 2015 22:09:50 +0100, Francois Perrad wrote:
Quoted 12 lines
package/lua/lua.mk line 14
Quoted 8 lines
package/lua/lua.mk +3
-0+ifeq ($(BR2_PACKAGE_LUA_5_3),y) +LUA_VERSION = 5.3.0 +else ifeq ($(BR2_PACKAGE_LUA_5_2),y) LUA_VERSION = 5.2.3 else LUA_VERSION = 5.1.5 endifCan we get rid of Lua 5.1 ? If not, at what point do you think it will be possible ?
My feeling is :
- Lua 5.1 will stay
- if everything goes well for Lua 5.3 (ie. modules/extensions updated), Lua 5.2 could be marked as deprecated in 6 months and removed in 1 year.
The gap for compatibility between 5.2 and 5.3 is really small. Lua 5.3 comes with a real improvement for embedded target : a 32 bits variant for number (see patch 3/6).
Fran?ois
Quoted 11 lines
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot