a package infrastructure for Lua modules
v2 cover a package infrastructure for Lua modules
LuaRocks is a deployment and management system for Lua modules. (see http://luarocks.org/)
This patch set contains 4 parts :
1) 2 long standing patches for the virtual package luainterpreter
see http://patchwork.ozlabs.org/patch/266986 and http://patchwork.ozlabs.org/patch/266985
2) the removal of a patch, see discussion http://lists.busybox.net/pipermail/buildroot/2013-August/076587.html
3) the new infrastructure for LuaRocks
4) the conversion of 13 Lua modules
In this V2, the cross-compilation of native Lua module is supported (V1 supports only pure Lua module), a chapter is also added in the documentation.
Note: writing infrastructure is easier than I originally thought.
Francois Perrad (10):
luainterpreter: create virtual package
luajit: allow to build Lua extensions without lua
lua: remove a too invasive patch
lua*: restore version in module paths
luarocks: new package
luarocks: new infrastructure
lua-cjson: restore official name
luasql-sqlite3: renamed like with LuaRocks lua*: refactor with luarocks infrastructure
manual: adding packages luarocks
Config.in | 8 ++ Makefile | 1 + docs/manual/adding-packages-luarocks.txt | 91 ++++++++++++++++++ docs/manual/adding-packages.txt | 2 + package/Config.in | 5 +- package/Makefile.in | 1 + package/cgilua/cgilua.mk | 14 +-- package/copas/copas.mk | 14 +-- package/coxpcall/coxpcall.mk | 4 +- package/lbase64/Config.in | 1 + package/lbase64/lbase64.mk | 28 +----- package/lua-cjson/Config.in | 14 +++ package/lua-cjson/lua-cjson.mk | 12 +++ package/lua-ev/Config.in | 1 + package/lua-ev/lua-ev.mk | 4 +- package/lua-msgpack-native/Config.in | 1 + package/lua-msgpack-native/lua-msgpack-native.mk | 6 +- package/lua/Config.in | 1 + package/lua/lua-01-root-path.patch | 21 +---- package/lua/lua-03-shared-libs-for-luac.patch | 97 -------------------- package/luabitop/luabitop.mk | 24 +---- package/luacjson/Config.in | 13 --- package/luacjson/luacjson.mk | 35 ------- package/luaexpat/Config.in | 1 + package/luaexpat/luaexpat.mk | 36 +------- package/luaexpatutils/luaexpatutils.mk | 4 +- package/luafilesystem/Config.in | 1 + .../luafilesystem-without_large_file.patch | 8 +- package/luafilesystem/luafilesystem.mk | 26 +----- package/luainterpreter/Config.in | 2 + package/luainterpreter/luainterpreter.mk | 18 ++++ package/luajit/Config.in | 1 + package/luajit/luajit-01-root-path.patch | 22 ----- package/luajit/luajit-05-install-inc.patch | 17 ++++ package/luaposix/Config.in | 1 + package/luaposix/luaposix.mk | 4 +- package/luarocks/luarocks-build-minimal.patch | 17 ++++ package/luarocks/luarocks-unpack.patch | 24 +++++ package/luarocks/luarocks.mk | 42 +++++++++ package/luasec/Config.in | 1 + package/luasec/luasec.mk | 31 ++----- package/luasocket/Config.in | 1 + package/luasocket/luasocket.mk | 18 ++-- package/luasql-sqlite3/Config.in | 8 ++ package/luasql-sqlite3/luasql-sqlite3.mk | 13 +++ package/luasql/Config.in | 21 ----- package/luasql/luasql.mk | 39 -------- package/orbit/orbit-01-fix-installation.patch | 26 ------ package/orbit/orbit.mk | 16 +--- package/pkg-luarocks.mk | 71 ++++++++++++++ package/rings/Config.in | 1 + package/rings/rings.mk | 24 +---- package/wsapi/wsapi.mk | 15 +-- package/xavante/xavante.mk | 17 +--- 54 files changed, 419 insertions(+), 505 deletions(-) create mode 100644 docs/manual/adding-packages-luarocks.txt create mode 100644 package/lua-cjson/Config.in create mode 100644 package/lua-cjson/lua-cjson.mk delete mode 100644 package/lua/lua-03-shared-libs-for-luac.patch delete mode 100644 package/luacjson/Config.in delete mode 100644 package/luacjson/luacjson.mk create mode 100644 package/luainterpreter/Config.in create mode 100644 package/luainterpreter/luainterpreter.mk delete mode 100644 package/luajit/luajit-01-root-path.patch create mode 100644 package/luajit/luajit-05-install-inc.patch create mode 100644 package/luarocks/luarocks-build-minimal.patch create mode 100644 package/luarocks/luarocks-unpack.patch create mode 100644 package/luarocks/luarocks.mk create mode 100644 package/luasql-sqlite3/Config.in create mode 100644 package/luasql-sqlite3/luasql-sqlite3.mk delete mode 100644 package/luasql/Config.in delete mode 100644 package/luasql/luasql.mk delete mode 100644 package/orbit/orbit-01-fix-installation.patch create mode 100644 package/pkg-luarocks.mk
Signature · 1 line
1.7.9.5
PATCH v2 1/10 luainterpreter: create virtual package
luainterpreter is lua or luajit
--- package/Config.in | 1 + package/lbase64/Config.in | 1 + package/lbase64/lbase64.mk | 2 +- package/lua-ev/Config.in | 1 + package/lua-ev/lua-ev.mk | 2 +- package/lua-msgpack-native/Config.in | 1 + package/lua-msgpack-native/lua-msgpack-native.mk | 2 +- package/lua/Config.in | 1 + package/luacjson/Config.in | 1 + package/luacjson/luacjson.mk | 2 +- package/luaexpat/Config.in | 1 + package/luaexpat/luaexpat.mk | 2 +- package/luafilesystem/Config.in | 1 + package/luafilesystem/luafilesystem.mk | 2 +- package/luainterpreter/Config.in | 2 ++ package/luainterpreter/luainterpreter.mk | 18 ++++++++++++++++++ package/luajit/Config.in | 1 + package/luaposix/Config.in | 1 + package/luaposix/luaposix.mk | 2 +- package/luasec/Config.in | 1 + package/luasec/luasec.mk | 2 +- package/luasocket/Config.in | 1 + package/luasocket/luasocket.mk | 2 +- package/luasql/Config.in | 1 + package/luasql/luasql.mk | 2 +- package/rings/Config.in | 1 + package/rings/rings.mk | 2 +- 27 files changed, 45 insertions(+), 11 deletions(-) create mode 100644 package/luainterpreter/Config.in create mode 100644 package/luainterpreter/luainterpreter.mk
package/Config.in +1 -0
@@ -353,6 +353,7 @@ source "package/jamvm/Config.in" source "package/jimtcl/Config.in" source "package/lua/Config.in" source "package/luajit/Config.in" +source "package/luainterpreter/Config.in" if BR2_PACKAGE_LUA || BR2_PACKAGE_LUAJIT menu "Lua libraries/modules" source "package/cgilua/Config.in"
package/lbase64/Config.in +1 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_LBASE64 bool "lbase64" + depends on BR2_PACKAGE_HAS_LUA_INTERPRETER help A base64 library for Lua
package/lbase64/lbase64.mk +1 -1
@@ -9,7 +9,7 @@ LBASE64_SITE = http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/5.1 LBASE64_SOURCE = lbase64.tar.gz LBASE64_LICENSE = Public domain LBASE64_LICENSE_FILES = README -LBASE64_DEPENDENCIES = lua +LBASE64_DEPENDENCIES = luainterpreter define LBASE64_BUILD_CMDS $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
package/lua-ev/Config.in +1 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_LUA_EV bool "lua-ev" + depends on BR2_PACKAGE_HAS_LUA_INTERPRETER select BR2_PACKAGE_LIBEV help Get access to the libev library from Lua.
package/lua-ev/lua-ev.mk +1 -1
@@ -6,7 +6,7 @@ LUA_EV_VERSION = 458165bdfe0c6eadc788813925f11a0e6a823845 LUA_EV_SITE = http://github.com/brimworks/lua-ev/tarball/$(LUA_EV_VERSION) -LUA_EV_DEPENDENCIES = lua libev +LUA_EV_DEPENDENCIES = luainterpreter libev LUA_EV_LICENSE = MIT LUA_EV_LICENSE_FILES = README LUA_EV_CONF_OPT = -DINSTALL_CMOD="/usr/lib/lua"
package/lua-msgpack-native/Config.in +1 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_LUA_MSGPACK_NATIVE bool "lua-msgpack-native" + depends on BR2_PACKAGE_HAS_LUA_INTERPRETER help This is a native, C language implementation of msgpack (http://msgpack.org) library/protocol for Lua language
package/lua-msgpack-native/lua-msgpack-native.mk +1 -1
@@ -6,7 +6,7 @@ LUA_MSGPACK_NATIVE_VERSION = 41cce91ab6b54e4426c6d626a0ac41a02ec2096d LUA_MSGPACK_NATIVE_SITE = http://github.com/kengonakajima/lua-msgpack-native/tarball/$(LUA_MSGPACK_NATIVE_VERSION) -LUA_MSGPACK_NATIVE_DEPENDENCIES = lua +LUA_MSGPACK_NATIVE_DEPENDENCIES = luainterpreter LUA_MSGPACK_NATIVE_LICENSE = Apache-2.0 LUA_MSGPACK_NATIVE_LICENSE_FILES = LICENSE.txt
package/lua/Config.in +1 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_LUA bool "lua" + select BR2_PACKAGE_HAS_LUA_INTERPRETER help Lua is a powerful, fast, light-weight, embeddable scripting language.
package/luacjson/Config.in +1 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_LUACJSON bool "luacjson" + depends on BR2_PACKAGE_HAS_LUA_INTERPRETER help The Lua CJSON module provides JSON support for Lua. It features: - Fast, standards compliant encoding/parsing routines
package/luacjson/luacjson.mk +1 -1
@@ -7,7 +7,7 @@ LUACJSON_VERSION = 2.1.0 LUACJSON_SOURCE = lua-cjson-$(LUACJSON_VERSION).tar.gz LUACJSON_SITE = http://www.kyne.com.au/~mark/software/download -LUACJSON_DEPENDENCIES = lua +LUACJSON_DEPENDENCIES = luainterpreter LUACJSON_LICENSE = MIT LUACJSON_LICENSE_FILES = LICENSE
package/luaexpat/Config.in +1 -0
@@ -1,6 +1,7 @@ config BR2_PACKAGE_LUAEXPAT bool "luaexpat" select BR2_PACKAGE_EXPAT + depends on BR2_PACKAGE_HAS_LUA_INTERPRETER help LuaExpat is a SAX XML parser based on the Expat library.
package/luaexpat/luaexpat.mk +1 -1
@@ -6,7 +6,7 @@ LUAEXPAT_VERSION = 1.2.0 LUAEXPAT_SITE = http://matthewwild.co.uk/projects/luaexpat -LUAEXPAT_DEPENDENCIES = lua expat +LUAEXPAT_DEPENDENCIES = luainterpreter expat LUAEXPAT_LICENSE = MIT
package/luafilesystem/Config.in +1 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_LUAFILESYSTEM bool "luafilesystem" + depends on BR2_PACKAGE_HAS_LUA_INTERPRETER help LuaFileSystem offers a portable way to access the underlying directory structure and file attributes.
package/luafilesystem/luafilesystem.mk +1 -1
@@ -6,7 +6,7 @@ LUAFILESYSTEM_VERSION = 1.6.2 LUAFILESYSTEM_SITE = http://github.com/downloads/keplerproject/luafilesystem -LUAFILESYSTEM_DEPENDENCIES = lua +LUAFILESYSTEM_DEPENDENCIES = luainterpreter LUAFILESYSTEM_LICENSE = MIT ifeq ($(BR2_LARGEFILE),y)
package/luainterpreter/Config.in new file +2 -0
@@ -0,0 +1,2 @@ +config BR2_PACKAGE_HAS_LUA_INTERPRETER + bool
package/luainterpreter/luainterpreter.mk new file +18 -0
@@ -0,0 +1,18 @@ +############################################################# +# +# Virtual package for luainterpreter +# +############################################################# + +LUAINTERPRETER_VERSION = 5.1 +LUAINTERPRETER_SOURCE = + +ifeq ($(BR2_PACKAGE_LUA),y) +LUAINTERPRETER_DEPENDENCIES = lua +endif + +ifeq ($(BR2_PACKAGE_LUAJIT),y) +LUAINTERPRETER_DEPENDENCIES = luajit +endif + +$(eval $(generic-package))
package/luajit/Config.in +1 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_LUAJIT bool "luajit" + select BR2_PACKAGE_HAS_LUA_INTERPRETER # Luajit is only available for some target architectures, and # has some complexity wrt 32/64. See luajit.mk for details. depends on BR2_i386 || (BR2_x86_64 && BR2_HOSTARCH='x86_64') || BR2_powerpc || BR2_arm || BR2_armeb
package/luaposix/Config.in +1 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_LUAPOSIX bool "luaposix" + depends on BR2_PACKAGE_HAS_LUA_INTERPRETER select BR2_PACKAGE_LUABITOP if BR2_PACKAGE_LUA # LuaBitOp is already included in LuaJIT help
package/luaposix/luaposix.mk +1 -1
@@ -9,7 +9,7 @@ LUAPOSIX_SITE = https://github.com/luaposix/luaposix/archive LUAPOSIX_SOURCE = release-v$(LUAPOSIX_VERSION).tar.gz LUAPOSIX_LICENSE = MIT LUAPOSIX_LICENSE_FILES = COPYING -LUAPOSIX_DEPENDENCIES = lua host-lua +LUAPOSIX_DEPENDENCIES = luainterpreter host-lua LUAPOSIX_CONF_OPT = --libdir="/usr/lib/lua" --datarootdir="/usr/share/lua" ifeq ($(BR2_PACKAGE_NCURSES),y)
package/luasec/Config.in +1 -0
@@ -2,6 +2,7 @@ config BR2_PACKAGE_LUASEC bool "luasec" select BR2_PACKAGE_OPENSSL select BR2_PACKAGE_LUASOCKET + depends on BR2_PACKAGE_HAS_LUA_INTERPRETER help LuaSec is a binding for OpenSSL library to provide TLS/SSL communication.
package/luasec/luasec.mk +1 -1
@@ -8,7 +8,7 @@ LUASEC_VERSION = 0.4.1 LUASEC_SITE = http://www.inf.puc-rio.br/~brunoos/luasec/download/ LUASEC_LICENSE = MIT LUASEC_LICENSE_FILES = LICENSE -LUASEC_DEPENDENCIES = lua openssl +LUASEC_DEPENDENCIES = luainterpreter openssl define LUASEC_BUILD_CMDS $(MAKE) -C $(@D) CC="$(TARGET_CC)" LD="$(TARGET_CC)" \
package/luasocket/Config.in +1 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_LUASOCKET bool "luasocket" + depends on BR2_PACKAGE_HAS_LUA_INTERPRETER help LuaSocket is the most comprehensive networking support library for the Lua language.
package/luasocket/luasocket.mk +1 -1
@@ -6,7 +6,7 @@ LUASOCKET_VERSION = 2.0.2 LUASOCKET_SITE = http://luaforge.net/frs/download.php/2664 -LUASOCKET_DEPENDENCIES = lua +LUASOCKET_DEPENDENCIES = luainterpreter LUASOCKET_LICENSE = MIT LUASOCKET_LICENSE_FILES = LICENSE
package/luasql/Config.in +1 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_LUASQL bool "luasql" + depends on BR2_PACKAGE_HAS_LUA_INTERPRETER help LuaSQL is a simple interface from Lua to a DBMS.
package/luasql/luasql.mk +1 -1
@@ -8,7 +8,7 @@ LUASQL_VERSION = v2.3.0 LUASQL_SITE = https://github.com/keplerproject/luasql/tarball/$(LUASQL_VERSION) LUASQL_LICENSE = MIT LUASQL_LICENSE_FILES = README -LUASQL_DEPENDENCIES = lua +LUASQL_DEPENDENCIES = luainterpreter LUASQL_MAKE_FLAGS = \ CC="$(TARGET_CC)" \
package/rings/Config.in +1 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_RINGS bool "rings" + depends on BR2_PACKAGE_HAS_LUA_INTERPRETER help Provides a way to create new Lua states from within Lua.
package/rings/rings.mk +1 -1
@@ -6,7 +6,7 @@ RINGS_VERSION = 1.2.3 RINGS_SITE = http://github.com/downloads/keplerproject/rings -RINGS_DEPENDENCIES = lua +RINGS_DEPENDENCIES = luainterpreter RINGS_LICENSE = MIT define RINGS_BUILD_CMDS
Signature · 1 line
1.7.9.5
PATCH v2 2/10 luajit: allow to build Lua extensions without lua
In reply to Francois Perrad--- package/luajit/luajit-05-install-inc.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 package/luajit/luajit-05-install-inc.patch
package/luajit/luajit-05-install-inc.patch new file +17 -0
@@ -0,0 +1,17 @@ +Install includes like lua's ones + +Signed-off-by: Francois Perrad <[email protected]> + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -31,7 +31,7 @@ DPREFIX= $(DESTDIR)$(PREFIX) + INSTALL_BIN= $(DPREFIX)/bin + INSTALL_LIB= $(DPREFIX)/lib + INSTALL_SHARE= $(DPREFIX)/share +-INSTALL_INC= $(DPREFIX)/include/luajit-$(MAJVER).$(MINVER) ++INSTALL_INC= $(DPREFIX)/include + + INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(VERSION) + INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit
Signature · 1 line
1.7.9.5
PATCH v2 3/10 lua: remove a too invasive patch
In reply to Francois Perradthe static version of luac is enough
--- package/lua/lua-03-shared-libs-for-luac.patch | 97 ------------------------- 1 file changed, 97 deletions(-) delete mode 100644 package/lua/lua-03-shared-libs-for-luac.patch
package/lua/lua-03-shared-libs-for-luac.patch deleted +0 -97
@@ -1,97 +0,0 @@ -Compile the luac binary with the shared library. -Many internal functions (LUAI_FUNC) must be exported (LUA_API). - -Signed-off-by: Francois Perrad <[email protected]> - -Index: b/src/ldo.h -=================================================================== ---- a/src/ldo.h -+++ b/src/ldo.h -@@ -46,7 +46,7 @@ - LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult); - LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize); - LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize); --LUAI_FUNC void luaD_growstack (lua_State *L, int n); -+LUA_API void luaD_growstack (lua_State *L, int n); - - LUAI_FUNC void luaD_throw (lua_State *L, int errcode); - LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); -Index: b/src/lfunc.h -=================================================================== ---- a/src/lfunc.h -+++ b/src/lfunc.h -@@ -18,7 +18,7 @@ - cast(int, sizeof(TValue *)*((n)-1))) - - --LUAI_FUNC Proto *luaF_newproto (lua_State *L); -+LUA_API Proto *luaF_newproto (lua_State *L); - LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e); - LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e); - LUAI_FUNC UpVal *luaF_newupval (lua_State *L); -Index: b/src/lmem.h -=================================================================== ---- a/src/lmem.h -+++ b/src/lmem.h -@@ -38,9 +38,9 @@ - ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t)))) - - --LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, -+LUA_API void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, - size_t size); --LUAI_FUNC void *luaM_toobig (lua_State *L); -+LUA_API void *luaM_toobig (lua_State *L); - LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size, - size_t size_elem, int limit, - const char *errormsg); -Index: b/src/lstring.h -=================================================================== ---- a/src/lstring.h -+++ b/src/lstring.h -@@ -25,7 +25,7 @@ - - LUAI_FUNC void luaS_resize (lua_State *L, int newsize); - LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e); --LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); -+LUA_API TString *luaS_newlstr (lua_State *L, const char *str, size_t l); - - - #endif -Index: b/src/lundump.h -=================================================================== ---- a/src/lundump.h -+++ b/src/lundump.h -@@ -17,7 +17,7 @@ - LUAI_FUNC void luaU_header (char* h); - - /* dump one chunk; from ldump.c */ --LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); -+LUA_API int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); - - #ifdef luac_c - /* print one chunk; from print.c */ -Index: b/src/Makefile -=================================================================== ---- a/src/Makefile -+++ b/src/Makefile -@@ -34,7 +34,7 @@ - LUA_O= lua.o - - LUAC_T= luac --LUAC_O= luac.o print.o -+LUAC_O= luac.o print.o lopcodes.o - - ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) - ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) -@@ -62,8 +62,8 @@ - $(LUA_T): $(LUA_O) $(LUA_SO) - $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUA_O) $(LIBS) - --$(LUAC_T): $(LUAC_O) $(LUA_A) -- $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) -+$(LUAC_T): $(LUAC_O) $(LUA_SO) -+ $(CC) -o $@ -L. $(MYLDFLAGS) $(LUAC_O) -llua $(LIBS) - - clean: - $(RM) $(ALL_T) $(ALL_O)
Signature · 1 line
1.7.9.5
PATCH v2 4/10 lua*: restore version in module paths
In reply to Francois Perrad(like in Lua upstream)
--- package/cgilua/cgilua.mk | 6 +++--- package/copas/copas.mk | 4 ++-- package/coxpcall/coxpcall.mk | 4 ++-- package/lbase64/lbase64.mk | 4 ++-- package/lua-ev/lua-ev.mk | 2 +- package/lua-msgpack-native/lua-msgpack-native.mk | 4 ++-- package/lua/lua-01-root-path.patch | 21 ++++----------------- package/luabitop/luabitop.mk | 5 ++--- package/luacjson/luacjson.mk | 4 ++-- package/luaexpat/luaexpat.mk | 10 +++++----- package/luaexpatutils/luaexpatutils.mk | 4 ++-- package/luafilesystem/luafilesystem.mk | 4 ++-- package/luajit/luajit-01-root-path.patch | 22 ---------------------- package/luaposix/luaposix.mk | 2 +- package/luasec/luasec.mk | 12 +++++------- package/luasocket/luasocket.mk | 16 ++++++++-------- package/luasql/luasql.mk | 7 +++---- package/orbit/orbit.mk | 2 +- package/rings/rings.mk | 7 +++---- package/wsapi/wsapi.mk | 6 +++--- package/xavante/xavante.mk | 10 ++++------ 21 files changed, 57 insertions(+), 99 deletions(-) delete mode 100644 package/luajit/luajit-01-root-path.patch
package/cgilua/cgilua.mk +3 -3
@@ -9,12 +9,12 @@ CGILUA_SITE = http://github.com/downloads/keplerproject/cgilua CGILUA_LICENSE = MIT define CGILUA_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D) install LUA_DIR="$(TARGET_DIR)/usr/share/lua" + $(MAKE) PREFIX="$(TARGET_DIR)/usr" -C $(@D) install endef define CGILUA_UNINSTALL_TARGET_CMDS - rm -rf "$(TARGET_DIR)/usr/share/lua/cgilua" - rm -f "$(TARGET_DIR)/usr/share/lua/cgilua.lua" + rm -rf "$(TARGET_DIR)/usr/share/lua/5.1/cgilua" + rm -f "$(TARGET_DIR)/usr/share/lua/5.1/cgilua.lua" endef $(eval $(generic-package))
package/copas/copas.mk +2 -2
@@ -10,11 +10,11 @@ COPAS_LICENSE = MIT define COPAS_INSTALL_TARGET_CMDS $(INSTALL) -m 0644 -D $(@D)/src/copas/copas.lua \ - $(TARGET_DIR)/usr/share/lua/copas.lua + $(TARGET_DIR)/usr/share/lua/5.1/copas.lua endef define COPAS_UNINSTALL_TARGET_CMDS - rm -f "$(TARGET_DIR)/usr/share/lua/copas.lua" + rm -f "$(TARGET_DIR)/usr/share/lua/5.1/copas.lua" endef $(eval $(generic-package))
package/coxpcall/coxpcall.mk +2 -2
@@ -10,11 +10,11 @@ COXPCALL_LICENSE = MIT define COXPCALL_INSTALL_TARGET_CMDS $(INSTALL) -m 0644 -D $(@D)/src/coxpcall.lua \ - $(TARGET_DIR)/usr/share/lua/coxpcall.lua + $(TARGET_DIR)/usr/share/lua/5.1/coxpcall.lua endef define COXPCALL_UNINSTALL_TARGET_CMDS - rm -f "$(TARGET_DIR)/usr/share/lua/coxpcall.lua" + rm -f "$(TARGET_DIR)/usr/share/lua/5.1/coxpcall.lua" endef $(eval $(generic-package))
package/lbase64/lbase64.mk +2 -2
@@ -18,11 +18,11 @@ endef define LBASE64_INSTALL_TARGET_CMDS $(INSTALL) -D -m 0755 $(@D)/base64.so \ - $(TARGET_DIR)/usr/lib/lua/base64.so + $(TARGET_DIR)/usr/lib/lua/5.1/base64.so endef define LBASE64_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/lib/lua/base64.so + rm -f $(TARGET_DIR)/usr/lib/lua/5.1/base64.so endef define LBASE64_CLEAN_CMDS
package/lua-ev/lua-ev.mk +1 -1
@@ -9,6 +9,6 @@ LUA_EV_SITE = http://github.com/brimworks/lua-ev/tarball/$(LUA_EV_VERSION) LUA_EV_DEPENDENCIES = luainterpreter libev LUA_EV_LICENSE = MIT LUA_EV_LICENSE_FILES = README -LUA_EV_CONF_OPT = -DINSTALL_CMOD="/usr/lib/lua" +LUA_EV_CONF_OPT = -DINSTALL_CMOD="/usr/lib/lua/5.1" $(eval $(cmake-package))
package/lua-msgpack-native/lua-msgpack-native.mk +2 -2
@@ -15,11 +15,11 @@ define LUA_MSGPACK_NATIVE_BUILD_CMDS endef define LUA_MSGPACK_NATIVE_INSTALL_TARGET_CMDS - $(INSTALL) -m 755 -D $(@D)/msgpack.so $(TARGET_DIR)/usr/lib/lua/msgpack.so + $(INSTALL) -m 755 -D $(@D)/msgpack.so $(TARGET_DIR)/usr/lib/lua/5.1/msgpack.so endef define LUA_MSGPACK_NATIVE_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/lib/lua/msgpack.so + rm -f $(TARGET_DIR)/usr/lib/lua/5.1/msgpack.so endef define LUA_MSGPACK_NATIVE_CLEAN_CMDS
package/lua/lua-01-root-path.patch +4 -17
@@ -1,5 +1,4 @@ Adjust installation location to /usr. -Remove version in module paths. Signed-off-by: Francois Perrad <[email protected]>
@@ -7,7 +6,7 @@ Index: b/etc/lua.pc =================================================================== --- a/etc/lua.pc +++ b/etc/lua.pc -@@ -8,13 +8,13 @@ +@@ -8,7 +8,7 @@ R= 5.1.5 # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
@@ -16,28 +15,16 @@ Index: b/etc/lua.pc 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} -+INSTALL_LMOD= ${prefix}/share/lua -+INSTALL_CMOD= ${prefix}/lib/lua - - # canonical vars - exec_prefix=${prefix} Index: b/src/luaconf.h =================================================================== --- a/src/luaconf.h +++ b/src/luaconf.h -@@ -94,9 +94,9 @@ +@@ -94,7 +94,7 @@ ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll" #else -#define LUA_ROOT "/usr/local/" --#define LUA_LDIR LUA_ROOT "share/lua/5.1/" --#define LUA_CDIR LUA_ROOT "lib/lua/5.1/" +#define LUA_ROOT "/usr/" -+#define LUA_LDIR LUA_ROOT "share/lua/" -+#define LUA_CDIR LUA_ROOT "lib/lua/" + #define LUA_LDIR LUA_ROOT "share/lua/5.1/" + #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" #define LUA_PATH_DEFAULT \ - "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ - LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua"
package/luabitop/luabitop.mk +2 -3
@@ -12,12 +12,11 @@ LUABITOP_LICENSE_FILES = README LUABITOP_DEPENDENCIES = lua define LUABITOP_BUILD_CMDS - $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) INCLUDES="-I$(STAGING_DIR)/usr/include" endef define LUABITOP_INSTALL_TARGET_CMDS - mkdir -p $(TARGET_DIR)/usr/lib/lua - $(INSTALL) -p $(@D)/bit.so $(TARGET_DIR)/usr/lib/lua + $(INSTALL) -p $(@D)/bit.so $(TARGET_DIR)/usr/lib/lua/5.1 endef define LUABITOP_CLEAN_CMDS
package/luacjson/luacjson.mk +2 -2
@@ -21,7 +21,7 @@ define LUACJSON_BUILD_CMDS endef define LUACJSON_INSTALL_TARGET_CMDS - install -D -m 0644 $(@D)/cjson.so $(TARGET_DIR)/usr/lib/lua/cjson.so + $(MAKE) DESTDIR="$(TARGET_DIR)" PREFIX="/usr" -C $(@D) install endef define LUACJSON_CLEAN_CMDS
@@ -29,7 +29,7 @@ define LUACJSON_CLEAN_CMDS endef define LUACJSON_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/lib/lua/cjson.so + rm -f $(TARGET_DIR)/usr/lib/lua/5.1/cjson.so endef $(eval $(generic-package))
package/luaexpat/luaexpat.mk +5 -5
@@ -11,7 +11,7 @@ LUAEXPAT_LICENSE = MIT LUAEXPAT_MFLAGS += LUA_VERSION_NUM=501 -LUAEXPAT_MFLAGS += LUA_INC=$(STAGING_DIR)/usr/include/lua +LUAEXPAT_MFLAGS += LUA_INC=$(STAGING_DIR)/usr/include LUAEXPAT_MFLAGS += EXPAT_INC=$(STAGING_DIR)/usr/include LUAEXPAT_MFLAGS += LIBNAME=lxp.so LUAEXPAT_MFLAGS += LIB_OPTION="-shared -fPIC $(TARGET_CFLAGS)"
@@ -23,13 +23,13 @@ define LUAEXPAT_BUILD_CMDS endef define LUAEXPAT_INSTALL_TARGET_CMDS - $(INSTALL) -D $(@D)/src/lxp.so $(TARGET_DIR)/usr/lib/lua/lxp.so - $(INSTALL) -D -m 0644 $(@D)/src/lxp/lom.lua $(TARGET_DIR)/usr/share/lua/lxp/lom.lua + $(INSTALL) -D $(@D)/src/lxp.so $(TARGET_DIR)/usr/lib/lua/5.1/lxp.so + $(INSTALL) -D -m 0644 $(@D)/src/lxp/lom.lua $(TARGET_DIR)/usr/share/lua/5.1/lxp/lom.lua endef define LUAEXPAT_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/lib/lua/lxp.so - rm -f $(TARGET_DIR)/usr/share/lua/lxp/lom.lua + rm -f $(TARGET_DIR)/usr/lib/lua/5.1/lxp.so + rm -f $(TARGET_DIR)/usr/share/lua/5.1/lxp/lom.lua endef define LUAEXPAT_CLEAN_CMDS
package/luaexpatutils/luaexpatutils.mk +2 -2
@@ -11,11 +11,11 @@ LUAEXPATUTILS_DEPENDENCIES = luaexpat define LUAEXPATUTILS_INSTALL_TARGET_CMDS $(INSTALL) -m 0644 -D $(@D)/lua/doc.lua \ - $(TARGET_DIR)/usr/share/lua/lxp/doc.lua + $(TARGET_DIR)/usr/share/lua/5.1/lxp/doc.lua endef define LUAEXPATUTILS_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/share/lua/lxp/doc.lua + rm -f $(TARGET_DIR)/usr/share/lua/5.1/lxp/doc.lua endef $(eval $(generic-package))
package/luafilesystem/luafilesystem.mk +2 -2
@@ -18,11 +18,11 @@ define LUAFILESYSTEM_BUILD_CMDS endef define LUAFILESYSTEM_INSTALL_TARGET_CMDS - $(INSTALL) -D $(@D)/src/lfs.so $(TARGET_DIR)/usr/lib/lua/lfs.so + $(INSTALL) -D $(@D)/src/lfs.so $(TARGET_DIR)/usr/lib/lua/5.1/lfs.so endef define LUAFILESYSTEM_UNINSTALL_TARGET_CMDS - rm -f "$(TARGET_DIR)/usr/lib/lua/lfs.so" + rm -f "$(TARGET_DIR)/usr/lib/lua/5.1/lfs.so" endef define LUAFILESYSTEM_CLEAN_CMDS
package/luajit/luajit-01-root-path.patch deleted +0 -22
@@ -1,22 +0,0 @@ -Adjust installation location to /usr - -Signed-off-by: Francois Perrad <[email protected]> -Signed-off-by: Thomas Petazzoni <[email protected]> - -Index: b/src/luaconf.h -=================================================================== ---- a/src/luaconf.h -+++ b/src/luaconf.h -@@ -26,9 +26,9 @@ - ** Note to distribution maintainers: do NOT patch the following line! - ** Please read ../doc/install.html#distro and pass PREFIX=/usr instead. - */ --#define LUA_ROOT "/usr/local/" --#define LUA_LDIR LUA_ROOT "share/lua/5.1/" --#define LUA_CDIR LUA_ROOT "lib/lua/5.1/" -+#define LUA_ROOT "/usr/" -+#define LUA_LDIR LUA_ROOT "share/lua/" -+#define LUA_CDIR LUA_ROOT "lib/lua/" - #ifdef LUA_XROOT - #define LUA_JDIR LUA_XROOT "share/luajit-2.0.0/" - #define LUA_XPATH \
package/luaposix/luaposix.mk +1 -1
@@ -10,7 +10,7 @@ LUAPOSIX_SOURCE = release-v$(LUAPOSIX_VERSION).tar.gz LUAPOSIX_LICENSE = MIT LUAPOSIX_LICENSE_FILES = COPYING LUAPOSIX_DEPENDENCIES = luainterpreter host-lua -LUAPOSIX_CONF_OPT = --libdir="/usr/lib/lua" --datarootdir="/usr/share/lua" +LUAPOSIX_CONF_OPT = --libdir="/usr/lib/lua/5.1" --datarootdir="/usr/share/lua/5.1" ifeq ($(BR2_PACKAGE_NCURSES),y) LUAPOSIX_DEPENDENCIES += ncurses
package/luasec/luasec.mk +5 -7
@@ -17,17 +17,15 @@ define LUASEC_BUILD_CMDS endef define LUASEC_INSTALL_TARGET_CMDS - mkdir -p $(TARGET_DIR)/usr/share/lua - mkdir -p $(TARGET_DIR)/usr/lib/lua $(MAKE) -C $(@D) \ - LUAPATH="$(TARGET_DIR)/usr/share/lua" \ - LUACPATH="$(TARGET_DIR)/usr/lib/lua" install + LUAPATH="$(TARGET_DIR)/usr/share/lua/5.1" \ + LUACPATH="$(TARGET_DIR)/usr/lib/lua/5.1" install endef define LUASEC_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/lib/lua/ssl.so - rm -rf $(TARGET_DIR)/usr/share/lua/ssl - rm -f $(TARGET_DIR)/usr/share/lua/ssl.lua + rm -f $(TARGET_DIR)/usr/lib/lua/5.1/ssl.so + rm -rf $(TARGET_DIR)/usr/share/lua/5.1/ssl + rm -f $(TARGET_DIR)/usr/share/lua/5.1/ssl.lua endef $(eval $(generic-package))
package/luasocket/luasocket.mk +8 -8
@@ -18,17 +18,17 @@ endef define LUASOCKET_INSTALL_TARGET_CMDS $(MAKE) -C $(@D) -f makefile \ - INSTALL_TOP_SHARE="$(TARGET_DIR)/usr/share/lua" \ - INSTALL_TOP_LIB="$(TARGET_DIR)/usr/lib/lua" install + INSTALL_TOP_SHARE="$(TARGET_DIR)/usr/share/lua/5.1" \ + INSTALL_TOP_LIB="$(TARGET_DIR)/usr/lib/lua/5.1" install endef define LUASOCKET_UNINSTALL_TARGET_CMDS - rm -rf "$(TARGET_DIR)/usr/lib/lua/mime" - rm -rf "$(TARGET_DIR)/usr/lib/lua/socket" - rm -rf "$(TARGET_DIR)/usr/share/lua/socket" - rm -f "$(TARGET_DIR)/usr/share/lua/socket.lua" - rm -f "$(TARGET_DIR)/usr/share/lua/mime.lua" - rm -f "$(TARGET_DIR)/usr/share/lua/ltn12.lua" + rm -rf "$(TARGET_DIR)/usr/lib/lua/5.1/mime" + rm -rf "$(TARGET_DIR)/usr/lib/lua/5.1/socket" + rm -rf "$(TARGET_DIR)/usr/share/lua/5.1/socket" + rm -f "$(TARGET_DIR)/usr/share/lua/5.1/socket.lua" + rm -f "$(TARGET_DIR)/usr/share/lua/5.1/mime.lua" + rm -f "$(TARGET_DIR)/usr/share/lua/5.1/ltn12.lua" endef define LUASOCKET_CLEAN_CMDS
package/luasql/luasql.mk +3 -4
@@ -27,13 +27,12 @@ define LUASQL_BUILD_CMDS endef define LUASQL_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D) $(LUASQL_MAKE_FLAGS) PREFIX=/usr \ - LUA_DIR="$(TARGET_DIR)/usr/share/lua" \ - LUA_LIBDIR="$(TARGET_DIR)/usr/lib/lua" install + $(MAKE) -C $(@D) $(LUASQL_MAKE_FLAGS) \ + PREFIX="$(TARGET_DIR)/usr" install endef define LUASQL_UNINSTALL_TARGET_CMDS - rm -rf $(TARGET_DIR)/usr/lib/lua/luasql + rm -rf $(TARGET_DIR)/usr/lib/lua/5.1/luasql endef $(eval $(generic-package))
package/orbit/orbit.mk +1 -1
@@ -11,7 +11,7 @@ ORBIT_LICENSE_FILES = doc/us/license.md define ORBIT_INSTALL_TARGET_CMDS $(MAKE) -C $(@D) \ - LUA_DIR=$(TARGET_DIR)/usr/share/lua/ \ + LUA_DIR=$(TARGET_DIR)/usr/share/lua/5.1/ \ BIN_DIR=$(TARGET_DIR)/usr/bin \ install endef
package/rings/rings.mk +3 -4
@@ -14,13 +14,12 @@ define RINGS_BUILD_CMDS endef define RINGS_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D) LUA_LIBDIR="$(TARGET_DIR)/usr/lib/lua" \ - LUA_DIR="$(TARGET_DIR)/usr/share/lua" install + $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)/usr" install endef define RINGS_UNINSTALL_TARGET_CMDS - rm -f "$(TARGET_DIR)/usr/lib/lua/rings.so" - rm -f "$(TARGET_DIR)/usr/share/lua/stable.lua" + rm -f "$(TARGET_DIR)/usr/lib/lua/5.1/rings.so" + rm -f "$(TARGET_DIR)/usr/share/lua/5.1/stable.lua" endef define RINGS_CLEAN_CMDS
package/wsapi/wsapi.mk +3 -3
@@ -9,13 +9,13 @@ WSAPI_SITE = http://github.com/downloads/keplerproject/wsapi WSAPI_LICENSE = MIT define WSAPI_INSTALL_TARGET_CMDS - mkdir -p $(TARGET_DIR)/usr/share/lua/wsapi + mkdir -p $(TARGET_DIR)/usr/share/lua/5.1/wsapi $(INSTALL) -m 0644 -D $(@D)/src/wsapi/*.lua \ - $(TARGET_DIR)/usr/share/lua/wsapi + $(TARGET_DIR)/usr/share/lua/5.1/wsapi endef define WSAPI_UNINSTALL_TARGET_CMDS - rm -rf "$(TARGET_DIR)/usr/share/lua/wsapi" + rm -rf "$(TARGET_DIR)/usr/share/lua/5.1/wsapi" endef $(eval $(generic-package))
package/xavante/xavante.mk +4 -6
@@ -9,15 +9,13 @@ XAVANTE_SITE = http://github.com/downloads/keplerproject/xavante XAVANTE_LICENSE = MIT define XAVANTE_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D) PREFIX=/usr \ - LUA_DIR="$(TARGET_DIR)/usr/share/lua" \ - LUA_LIBDIR="$(TARGET_DIR)/usr/lib/lua" install + $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)/usr" install endef define XAVANTE_UNINSTALL_TARGET_CMDS - rm -rf "$(TARGET_DIR)/usr/share/xavante" - rm -f "$(TARGET_DIR)/usr/share/xavante.lua" - rm -f "$(TARGET_DIR)/usr/share/sajax.lua" + rm -rf "$(TARGET_DIR)/usr/share/5.1/xavante" + rm -f "$(TARGET_DIR)/usr/share/5.1/xavante.lua" + rm -f "$(TARGET_DIR)/usr/share/5.1/sajax.lua" endef $(eval $(generic-package))
Signature · 1 line
1.7.9.5
PATCH v2 5/10 luarocks: new package
In reply to Francois Perrad--- package/luarocks/luarocks-build-minimal.patch | 17 ++++++++++ package/luarocks/luarocks-unpack.patch | 24 ++++++++++++++ package/luarocks/luarocks.mk | 42 +++++++++++++++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 package/luarocks/luarocks-build-minimal.patch create mode 100644 package/luarocks/luarocks-unpack.patch create mode 100644 package/luarocks/luarocks.mk
package/luarocks/luarocks-build-minimal.patch new file +17 -0
@@ -0,0 +1,17 @@ +hack for buildroot which needs independant steps : download, unpack, build + +Signed-off-by: Francois Perrad <[email protected]> + +Index: b/src/luarocks/build.lua +=================================================================== +--- a/src/luarocks/build.lua ++++ b/src/luarocks/build.lua +@@ -362,6 +362,8 @@ + + if flags["pack-binary-rock"] then + return pack.pack_binary_rock(name, version, do_build, name, version, deps.get_deps_mode(flags)) ++ elseif flags["minimal"] then ++ return build_rockspec(name, false, true, "none") + else + local ok, err = fs.check_command_permissions(flags) + if not ok then return nil, err end
package/luarocks/luarocks-unpack.patch new file +24 -0
@@ -0,0 +1,24 @@ +allows unpack in existing directory + +Signed-off-by: Francois Perrad <[email protected]> + +Index: b/src/luarocks/unpack.lua +=================================================================== +--- a/src/luarocks/unpack.lua ++++ b/src/luarocks/unpack.lua +@@ -101,11 +101,10 @@ + return nil, file.." does not seem to be a valid filename." + end + +- if (fs.exists(dir_name)) then +- return nil, "Directory "..dir_name.." already exists." ++ if not fs.exists(dir_name) then ++ local ok, err = fs.make_dir(dir_name) ++ if not ok then return nil, err end + end +- local ok, err = fs.make_dir(dir_name) +- if not ok then return nil, err end + local rollback = util.schedule_function(fs.delete, fs.absolute_name(dir_name)) + + local rockspec, err +
package/luarocks/luarocks.mk new file +42 -0
42 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v2 6/10 luarocks: new infrastructure
In reply to Francois Perrad--- Config.in | 8 ++++++ Makefile | 1 + package/Makefile.in | 1 + package/pkg-luarocks.mk | 71 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 81 insertions(+) create mode 100644 package/pkg-luarocks.mk
Config.in +8 -0
@@ -207,6 +207,14 @@ config BR2_DEBIAN_MIRROR endif +config BR2_LUAROCKS_MIRROR + string "LuaRocks mirror" + default "http://luarocks.org/repositories/rocks" + help + LuaRocks repository. + + See, http://luarocks.org + endmenu config BR2_JLEVEL
Makefile +1 -0
@@ -473,6 +473,7 @@ endif ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y) find $(TARGET_DIR)/usr/lib/ -name '*.py' -print0 | xargs -0 rm -f endif + rm -rf $(TARGET_DIR)/usr/lib/luarocks $(STRIP_FIND_CMD) | xargs $(STRIPCMD) 2>/dev/null || true if test -d $(TARGET_DIR)/lib/modules; then \ find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \
package/Makefile.in +1 -0
@@ -363,4 +363,5 @@ include package/pkg-utils.mk include package/pkg-download.mk include package/pkg-autotools.mk include package/pkg-cmake.mk +include package/pkg-luarocks.mk include package/pkg-generic.mk
package/pkg-luarocks.mk new file +71 -0
71 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v2 6/10 luarocks: new infrastructure
Francois,
Quoted 15 lines · Francois Perrad
--- Config.in | 8 ++++++ Makefile | 1 + package/Makefile.in | 1 + package/pkg-luarocks.mk | 71 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 81 insertions(+) create mode 100644 package/pkg-luarocks.mkConfig.in +0
-0@@ -207,6 +207,14 @@ config BR2_DEBIAN_MIRROR endif
Config.in config BR2_DEBIAN_MIRROR · line 218
Quoted 10 lines
Config.in +8
-0+config BR2_LUAROCKS_MIRROR + string "LuaRocks mirror" + default "http://luarocks.org/repositories/rocks" + help + LuaRocks repository. + + See, http://luarocks.org + endmenu
Should be "See http://luarocks.org", no comma.
Danomi -
PATCH v2 7/10 lua-cjson: restore official name
In reply to Francois Perradbefore infrastructure conversion
--- package/Config.in | 2 +- package/lua-cjson/Config.in | 14 ++++++++++++++ package/lua-cjson/lua-cjson.mk | 34 ++++++++++++++++++++++++++++++++++ package/luacjson/Config.in | 14 -------------- package/luacjson/luacjson.mk | 35 ----------------------------------- 5 files changed, 49 insertions(+), 50 deletions(-) create mode 100644 package/lua-cjson/Config.in create mode 100644 package/lua-cjson/lua-cjson.mk delete mode 100644 package/luacjson/Config.in delete mode 100644 package/luacjson/luacjson.mk
package/Config.in +1 -1
@@ -361,7 +361,6 @@ source "package/copas/Config.in" source "package/coxpcall/Config.in" source "package/lbase64/Config.in" source "package/luabitop/Config.in" -source "package/luacjson/Config.in" source "package/luacrypto/Config.in" source "package/luaexpat/Config.in" source "package/luaexpatutils/Config.in"
@@ -370,6 +369,7 @@ source "package/luaposix/Config.in" source "package/luasec/Config.in" source "package/luasocket/Config.in" source "package/luasql/Config.in" +source "package/lua-cjson/Config.in" source "package/lua-ev/Config.in" source "package/lua-msgpack-native/Config.in" source "package/orbit/Config.in"
package/lua-cjson/Config.in new file +14 -0
@@ -0,0 +1,14 @@ +config BR2_PACKAGE_LUA_CJSON + bool "lua-cjson" + depends on BR2_PACKAGE_HAS_LUA_INTERPRETER + help + The Lua CJSON module provides JSON support for Lua. It features: + - Fast, standards compliant encoding/parsing routines + - Full support for JSON with UTF-8, including decoding surrogate pairs + - Optional run-time support for common exceptions to the JSON + specification (infinity, NaN, ...) + - No dependencies on other libraries + + (C-module) + + http://www.kyne.com.au/~mark/software/lua-cjson.php
package/lua-cjson/lua-cjson.mk new file +34 -0
@@ -0,0 +1,34 @@ +################################################################################ +# +# lua-cjson +# +################################################################################ + +LUA_CJSON_VERSION = 2.1.0 +LUA_CJSON_SITE = http://www.kyne.com.au/~mark/software/download +LUA_CJSON_DEPENDENCIES = luainterpreter +LUA_CJSON_LICENSE = MIT +LUA_CJSON_LICENSE_FILES = LICENSE + +define LUA_CJSON_BUILD_CMDS + $(MAKE) -C $(@D) \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + CC="$(TARGET_CC)" \ + LD="$(TARGET_LD)" \ + PREFIX=$(STAGING_DIR)/usr +endef + +define LUA_CJSON_INSTALL_TARGET_CMDS + $(MAKE) DESTDIR="$(TARGET_DIR)" PREFIX="/usr" -C $(@D) install +endef + +define LUA_CJSON_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +define LUA_CJSON_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/lib/lua/5.1/cjson.so +endef + +$(eval $(generic-package))
package/luacjson/Config.in deleted +0 -14
@@ -1,14 +0,0 @@ -config BR2_PACKAGE_LUACJSON - bool "luacjson" - depends on BR2_PACKAGE_HAS_LUA_INTERPRETER - help - The Lua CJSON module provides JSON support for Lua. It features: - - Fast, standards compliant encoding/parsing routines - - Full support for JSON with UTF-8, including decoding surrogate pairs - - Optional run-time support for common exceptions to the JSON - specification (infinity, NaN, ...) - - No dependencies on other libraries - - (C-module) - - http://www.kyne.com.au/~mark/software/lua-cjson.php
package/luacjson/luacjson.mk deleted +0 -35
@@ -1,35 +0,0 @@ -################################################################################ -# -# luacjson -# -################################################################################ - -LUACJSON_VERSION = 2.1.0 -LUACJSON_SOURCE = lua-cjson-$(LUACJSON_VERSION).tar.gz -LUACJSON_SITE = http://www.kyne.com.au/~mark/software/download -LUACJSON_DEPENDENCIES = luainterpreter -LUACJSON_LICENSE = MIT -LUACJSON_LICENSE_FILES = LICENSE - -define LUACJSON_BUILD_CMDS - $(MAKE) -C $(@D) \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - CC="$(TARGET_CC)" \ - LD="$(TARGET_LD)" \ - PREFIX=$(STAGING_DIR)/usr -endef - -define LUACJSON_INSTALL_TARGET_CMDS - $(MAKE) DESTDIR="$(TARGET_DIR)" PREFIX="/usr" -C $(@D) install -endef - -define LUACJSON_CLEAN_CMDS - $(MAKE) -C $(@D) clean -endef - -define LUACJSON_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/lib/lua/5.1/cjson.so -endef - -$(eval $(generic-package))
Signature · 1 line
1.7.9.5
PATCH v2 7/10 lua-cjson: restore official name
Francois,
If you must rename "luacjson" to "lua-cjson", then should not "luacjson" be added to the "Legacy config options" menu, to warn anyone using luacjson (like me)?
Same comment for "luasql" and "luasql-sqlite3" ...
Danomi -
PATCH v2 7/10 lua-cjson: restore official name
Dear Danomi Manchego,
Quoted 5 lines · Danomi Manchego
If you must rename "luacjson" to "lua-cjson", then should not "luacjson" be added to the "Legacy config options" menu, to warn anyone using luacjson (like me)?
Same comment for "luasql" and "luasql-sqlite3" ...
Indeed, the relevant Config.in.legacy options should be added.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 7/10 lua-cjson: restore official name
In reply to Danomi Manchego2013/11/14 Danomi Manchego <[email protected]>:
Quoted 7 lines
Francois,
If you must rename "luacjson" to "lua-cjson", then should not "luacjson" be added to the "Legacy config options" menu, to warn anyone using luacjson (like me)?
Same comment for "luasql" and "luasql-sqlite3" ...
You are right.
I forgot the legacy part.
Fran?ois
Quoted 6 lines
Danomi -
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH v2 8/10 luasql-sqlite3: renamed like with LuaRocks
In reply to Francois Perradbefore infrastructure conversion
--- package/Config.in | 2 +- package/luasql-sqlite3/Config.in | 8 +++++++ package/luasql-sqlite3/luasql-sqlite3.mk | 33 ++++++++++++++++++++++++++ package/luasql/Config.in | 22 ----------------- package/luasql/luasql.mk | 38 ------------------------------ 5 files changed, 42 insertions(+), 61 deletions(-) create mode 100644 package/luasql-sqlite3/Config.in create mode 100644 package/luasql-sqlite3/luasql-sqlite3.mk delete mode 100644 package/luasql/Config.in delete mode 100644 package/luasql/luasql.mk
package/Config.in +1 -1
@@ -368,7 +368,7 @@ source "package/luafilesystem/Config.in" source "package/luaposix/Config.in" source "package/luasec/Config.in" source "package/luasocket/Config.in" -source "package/luasql/Config.in" +source "package/luasql-sqlite3/Config.in" source "package/lua-cjson/Config.in" source "package/lua-ev/Config.in" source "package/lua-msgpack-native/Config.in"
package/luasql-sqlite3/Config.in new file +8 -0
@@ -0,0 +1,8 @@ +config BR2_PACKAGE_LUASQL_SQLITE3 + bool "luasql-sqlite3" + depends on BR2_PACKAGE_HAS_LUA_INTERPRETER + help + LuaSQL is a simple interface from Lua to a DBMS. + + http://www.keplerproject.org/luasql +
package/luasql-sqlite3/luasql-sqlite3.mk new file +33 -0
@@ -0,0 +1,33 @@ +################################################################################ +# +# luasql-sqlite3 +# +################################################################################ + +LUASQL_SQLITE3_VERSION = v2.3.0 +LUASQL_SQLITE3_SITE = https://github.com/keplerproject/luasql/tarball/$(LUASQL_SQLITE3_VERSION) +LUASQL_SQLITE3_LICENSE = MIT +LUASQL_SQLITE3_LICENSE_FILES = README +LUASQL_SQLITE3_DEPENDENCIES = luainterpreter sqlite + +LUASQL_SQLITE3_MAKE_FLAGS = \ + CC="$(TARGET_CC)" \ + LD="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -fPIC" \ + T="sqlite3" \ + DRIVER_LIBS="-L$(STAGING_DIR)/usr/lib -lsqlite3" + +define LUASQL_SQLITE3_BUILD_CMDS + $(MAKE) -C $(@D) $(LUASQL_SQLITE3_MAKE_FLAGS) +endef + +define LUASQL_SQLITE3_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) $(LUASQL_SQLITE3_MAKE_FLAGS) \ + PREFIX="$(TARGET_DIR)/usr" install +endef + +define LUASQL_SQLITE3_UNINSTALL_TARGET_CMDS + rm -rf $(TARGET_DIR)/usr/lib/lua/5.1/luasql +endef + +$(eval $(generic-package))
package/luasql/Config.in deleted +0 -22
@@ -1,22 +0,0 @@ -config BR2_PACKAGE_LUASQL - bool "luasql" - depends on BR2_PACKAGE_HAS_LUA_INTERPRETER - help - LuaSQL is a simple interface from Lua to a DBMS. - - http://www.keplerproject.org/luasql - -if BR2_PACKAGE_LUASQL -choice - prompt "LuaSQL Driver" - help - Select backend driver for LuaSQL. - -config BR2_PACKAGE_LUASQL_DRIVER_SQLITE3 - bool "SQLite3" - select BR2_PACKAGE_SQLITE - help - Select if you wish to use the SQLite3 LuaSQL driver. - -endchoice -endif
package/luasql/luasql.mk deleted +0 -38
@@ -1,38 +0,0 @@ -################################################################################ -# -# luasql -# -################################################################################ - -LUASQL_VERSION = v2.3.0 -LUASQL_SITE = https://github.com/keplerproject/luasql/tarball/$(LUASQL_VERSION) -LUASQL_LICENSE = MIT -LUASQL_LICENSE_FILES = README -LUASQL_DEPENDENCIES = luainterpreter - -LUASQL_MAKE_FLAGS = \ - CC="$(TARGET_CC)" \ - LD="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -fPIC" - -ifeq ($(BR2_PACKAGE_LUASQL_DRIVER_SQLITE3),y) -LUASQL_DEPENDENCIES += sqlite -LUASQL_MAKE_FLAGS += \ - T="sqlite3" \ - DRIVER_LIBS="-L$(STAGING_DIR)/usr/lib -lsqlite3" -endif - -define LUASQL_BUILD_CMDS - $(MAKE) -C $(@D) $(LUASQL_MAKE_FLAGS) -endef - -define LUASQL_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D) $(LUASQL_MAKE_FLAGS) \ - PREFIX="$(TARGET_DIR)/usr" install -endef - -define LUASQL_UNINSTALL_TARGET_CMDS - rm -rf $(TARGET_DIR)/usr/lib/lua/5.1/luasql -endef - -$(eval $(generic-package))
Signature · 1 line
1.7.9.5
PATCH v2 9/10 lua*: refactor with luarocks infrastructure
In reply to Francois Perrad--- package/cgilua/cgilua.mk | 14 ++------ package/copas/copas.mk | 14 ++------ package/lbase64/lbase64.mk | 28 +++------------ package/lua-cjson/lua-cjson.mk | 32 +++-------------- package/luabitop/luabitop.mk | 23 +++---------- package/luaexpat/luaexpat.mk | 36 +++----------------- .../luafilesystem-without_large_file.patch | 8 ++--- package/luafilesystem/luafilesystem.mk | 26 ++------------ package/luasec/luasec.mk | 29 ++++------------ package/luasql-sqlite3/luasql-sqlite3.mk | 30 +++------------- package/orbit/orbit-01-fix-installation.patch | 26 -------------- package/orbit/orbit.mk | 16 +++------ package/rings/rings.mk | 23 ++----------- package/wsapi/wsapi.mk | 15 ++------ package/xavante/xavante.mk | 15 ++------ 15 files changed, 50 insertions(+), 285 deletions(-) delete mode 100644 package/orbit/orbit-01-fix-installation.patch
package/cgilua/cgilua.mk +2 -12
@@ -4,17 +4,7 @@ # ################################################################################ -CGILUA_VERSION = 5.1.4 -CGILUA_SITE = http://github.com/downloads/keplerproject/cgilua +CGILUA_VERSION = 5.1.4-1 CGILUA_LICENSE = MIT -define CGILUA_INSTALL_TARGET_CMDS - $(MAKE) PREFIX="$(TARGET_DIR)/usr" -C $(@D) install -endef - -define CGILUA_UNINSTALL_TARGET_CMDS - rm -rf "$(TARGET_DIR)/usr/share/lua/5.1/cgilua" - rm -f "$(TARGET_DIR)/usr/share/lua/5.1/cgilua.lua" -endef - -$(eval $(generic-package)) +$(eval $(luarocks-package))
package/copas/copas.mk +2 -12
@@ -4,17 +4,7 @@ # ################################################################################ -COPAS_VERSION = 1.1.6 -COPAS_SITE = http://github.com/downloads/keplerproject/copas +COPAS_VERSION = 1.1.6-1 COPAS_LICENSE = MIT -define COPAS_INSTALL_TARGET_CMDS - $(INSTALL) -m 0644 -D $(@D)/src/copas/copas.lua \ - $(TARGET_DIR)/usr/share/lua/5.1/copas.lua -endef - -define COPAS_UNINSTALL_TARGET_CMDS - rm -f "$(TARGET_DIR)/usr/share/lua/5.1/copas.lua" -endef - -$(eval $(generic-package)) +$(eval $(luarocks-package))
package/lbase64/lbase64.mk +4 -24
@@ -4,29 +4,9 @@ # ################################################################################ -LBASE64_VERSION = 20100323 -LBASE64_SITE = http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/5.1 -LBASE64_SOURCE = lbase64.tar.gz +LBASE64_VERSION = 20120820-1 +LBASE64_SUBDIR = base64 LBASE64_LICENSE = Public domain -LBASE64_LICENSE_FILES = README -LBASE64_DEPENDENCIES = luainterpreter +LBASE64_LICENSE_FILES = $(LBASE64_SUBDIR)/README -define LBASE64_BUILD_CMDS - $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -fPIC" so -endef - -define LBASE64_INSTALL_TARGET_CMDS - $(INSTALL) -D -m 0755 $(@D)/base64.so \ - $(TARGET_DIR)/usr/lib/lua/5.1/base64.so -endef - -define LBASE64_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/lib/lua/5.1/base64.so -endef - -define LBASE64_CLEAN_CMDS - $(MAKE) -C $(@D) clean -endef - -$(eval $(generic-package)) +$(eval $(luarocks-package))
package/lua-cjson/lua-cjson.mk +5 -27
@@ -4,31 +4,9 @@ # ################################################################################ -LUA_CJSON_VERSION = 2.1.0 -LUA_CJSON_SITE = http://www.kyne.com.au/~mark/software/download -LUA_CJSON_DEPENDENCIES = luainterpreter -LUA_CJSON_LICENSE = MIT -LUA_CJSON_LICENSE_FILES = LICENSE +LUA_CJSON_VERSION_UPSTREAM = 2.1.0 +LUA_CJSON_VERSION = $(LUA_CJSON_VERSION_UPSTREAM)-1 +LUA_CJSON_LICENSE = MIT +LUA_CJSON_LICENSE_FILES = lua-cjson-$(LUA_CJSON_VERSION_UPSTREAM)/LICENSE -define LUA_CJSON_BUILD_CMDS - $(MAKE) -C $(@D) \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - CC="$(TARGET_CC)" \ - LD="$(TARGET_LD)" \ - PREFIX=$(STAGING_DIR)/usr -endef - -define LUA_CJSON_INSTALL_TARGET_CMDS - $(MAKE) DESTDIR="$(TARGET_DIR)" PREFIX="/usr" -C $(@D) install -endef - -define LUA_CJSON_CLEAN_CMDS - $(MAKE) -C $(@D) clean -endef - -define LUA_CJSON_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/lib/lua/5.1/cjson.so -endef - -$(eval $(generic-package)) +$(eval $(luarocks-package))
package/luabitop/luabitop.mk +5 -18
@@ -4,23 +4,10 @@ # ################################################################################ -LUABITOP_VERSION = 1.0.2 -LUABITOP_SOURCE = LuaBitOp-$(LUABITOP_VERSION).tar.gz -LUABITOP_SITE = http://bitop.luajit.org/download +LUABITOP_VERSION_UPSTREAM = 1.0.2 +LUABITOP_VERSION = $(LUABITOP_VERSION_UPSTREAM)-1 +LUABITOP_SUBDIR = LuaBitOp-$(LUABITOP_VERSION_UPSTREAM) LUABITOP_LICENSE = MIT -LUABITOP_LICENSE_FILES = README -LUABITOP_DEPENDENCIES = lua +LUABITOP_LICENSE_FILES = $(LUABITOP_SUBDIR)/README -define LUABITOP_BUILD_CMDS - $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) INCLUDES="-I$(STAGING_DIR)/usr/include" -endef - -define LUABITOP_INSTALL_TARGET_CMDS - $(INSTALL) -p $(@D)/bit.so $(TARGET_DIR)/usr/lib/lua/5.1 -endef - -define LUABITOP_CLEAN_CMDS - $(MAKE) -C $(@D) clean -endef - -$(eval $(generic-package)) +$(eval $(luarocks-package))
package/luaexpat/luaexpat.mk +4 -32
@@ -4,36 +4,8 @@ # ################################################################################ -LUAEXPAT_VERSION = 1.2.0 -LUAEXPAT_SITE = http://matthewwild.co.uk/projects/luaexpat -LUAEXPAT_DEPENDENCIES = luainterpreter expat -LUAEXPAT_LICENSE = MIT +LUAEXPAT_VERSION = 1.2.0-1 +LUAEXPAT_DEPENDENCIES = expat +LUAEXPAT_LICENSE = MIT - -LUAEXPAT_MFLAGS += LUA_VERSION_NUM=501 -LUAEXPAT_MFLAGS += LUA_INC=$(STAGING_DIR)/usr/include -LUAEXPAT_MFLAGS += EXPAT_INC=$(STAGING_DIR)/usr/include -LUAEXPAT_MFLAGS += LIBNAME=lxp.so -LUAEXPAT_MFLAGS += LIB_OPTION="-shared -fPIC $(TARGET_CFLAGS)" -LUAEXPAT_MFLAGS += CC="$(TARGET_CC) -fPIC $(TARGET_CFLAGS)" - - -define LUAEXPAT_BUILD_CMDS - $(MAKE) -C $(@D) $(LUAEXPAT_MFLAGS) -endef - -define LUAEXPAT_INSTALL_TARGET_CMDS - $(INSTALL) -D $(@D)/src/lxp.so $(TARGET_DIR)/usr/lib/lua/5.1/lxp.so - $(INSTALL) -D -m 0644 $(@D)/src/lxp/lom.lua $(TARGET_DIR)/usr/share/lua/5.1/lxp/lom.lua -endef - -define LUAEXPAT_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/lib/lua/5.1/lxp.so - rm -f $(TARGET_DIR)/usr/share/lua/5.1/lxp/lom.lua -endef - -define LUAEXPAT_CLEAN_CMDS - $(MAKE) -C $(@D) $(LUAEXPAT_MFLAGS) clean -endef - -$(eval $(generic-package)) +$(eval $(luarocks-package))
package/luafilesystem/luafilesystem-without_large_file.patch +4 -4
@@ -1,7 +1,7 @@ -diff --git a/src/lfs.c b/src/lfs.c -index 85f01e3..ed49f50 100644 ---- a/src/lfs.c -+++ b/src/lfs.c +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
package/luafilesystem/luafilesystem.mk +2 -24
@@ -4,29 +4,7 @@ # ################################################################################ -LUAFILESYSTEM_VERSION = 1.6.2 -LUAFILESYSTEM_SITE = http://github.com/downloads/keplerproject/luafilesystem -LUAFILESYSTEM_DEPENDENCIES = luainterpreter +LUAFILESYSTEM_VERSION = 1.6.2-1 LUAFILESYSTEM_LICENSE = MIT -ifeq ($(BR2_LARGEFILE),y) -LFS_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -endif - -define LUAFILESYSTEM_BUILD_CMDS - $(MAKE) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS) $(LFS_CFLAGS) -fPIC" -endef - -define LUAFILESYSTEM_INSTALL_TARGET_CMDS - $(INSTALL) -D $(@D)/src/lfs.so $(TARGET_DIR)/usr/lib/lua/5.1/lfs.so -endef - -define LUAFILESYSTEM_UNINSTALL_TARGET_CMDS - rm -f "$(TARGET_DIR)/usr/lib/lua/5.1/lfs.so" -endef - -define LUAFILESYSTEM_CLEAN_CMDS - $(MAKE) -C $(@D) clean -endef - -$(eval $(generic-package)) +$(eval $(luarocks-package))
package/luasec/luasec.mk +6 -23
@@ -4,28 +4,11 @@ # ################################################################################ -LUASEC_VERSION = 0.4.1 -LUASEC_SITE = http://www.inf.puc-rio.br/~brunoos/luasec/download/ +LUASEC_VERSION_UPSTREAM = 0.4.1 +LUASEC_VERSION = $(LUASEC_VERSION_UPSTREAM)-2 +LUASEC_SUBDIR = luasec-luasec-$(LUASEC_VERSION_UPSTREAM) LUASEC_LICENSE = MIT -LUASEC_LICENSE_FILES = LICENSE -LUASEC_DEPENDENCIES = luainterpreter openssl +LUASEC_LICENSE_FILES = $(LUASEC_SUBDIR)/LICENSE +LUASEC_DEPENDENCIES = openssl -define LUASEC_BUILD_CMDS - $(MAKE) -C $(@D) CC="$(TARGET_CC)" LD="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -fPIC" \ - LDFLAGS="$(TARGET_LDFLAGS) -shared" linux -endef - -define LUASEC_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D) \ - LUAPATH="$(TARGET_DIR)/usr/share/lua/5.1" \ - LUACPATH="$(TARGET_DIR)/usr/lib/lua/5.1" install -endef - -define LUASEC_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/lib/lua/5.1/ssl.so - rm -rf $(TARGET_DIR)/usr/share/lua/5.1/ssl - rm -f $(TARGET_DIR)/usr/share/lua/5.1/ssl.lua -endef - -$(eval $(generic-package)) +$(eval $(luarocks-package))
package/luasql-sqlite3/luasql-sqlite3.mk +5 -25
@@ -4,30 +4,10 @@ # ################################################################################ -LUASQL_SQLITE3_VERSION = v2.3.0 -LUASQL_SQLITE3_SITE = https://github.com/keplerproject/luasql/tarball/$(LUASQL_SQLITE3_VERSION) +LUASQL_SQLITE3_VERSION = 2.3.0-1 +LUASQL_SQLITE3_SUBDIR = luasql LUASQL_SQLITE3_LICENSE = MIT -LUASQL_SQLITE3_LICENSE_FILES = README -LUASQL_SQLITE3_DEPENDENCIES = luainterpreter sqlite +LUASQL_SQLITE3_LICENSE_FILES = $(LUASQL_SQLITE3_SUBDIR)/README +LUASQL_SQLITE3_DEPENDENCIES = sqlite -LUASQL_SQLITE3_MAKE_FLAGS = \ - CC="$(TARGET_CC)" \ - LD="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -fPIC" \ - T="sqlite3" \ - DRIVER_LIBS="-L$(STAGING_DIR)/usr/lib -lsqlite3" - -define LUASQL_SQLITE3_BUILD_CMDS - $(MAKE) -C $(@D) $(LUASQL_SQLITE3_MAKE_FLAGS) -endef - -define LUASQL_SQLITE3_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D) $(LUASQL_SQLITE3_MAKE_FLAGS) \ - PREFIX="$(TARGET_DIR)/usr" install -endef - -define LUASQL_SQLITE3_UNINSTALL_TARGET_CMDS - rm -rf $(TARGET_DIR)/usr/lib/lua/5.1/luasql -endef - -$(eval $(generic-package)) +$(eval $(luarocks-package))
package/orbit/orbit-01-fix-installation.patch deleted +0 -26
@@ -1,26 +0,0 @@ -Fix installation commands - -The installation commands did not match the location of the source -files within the Orbit source tree. - -Signed-off-by: Thomas Petazzoni <[email protected]> - -Index: b/Makefile -=================================================================== ---- a/Makefile -+++ b/Makefile -@@ -11,12 +11,9 @@ - mkdir -p $(LUA_DIR) - cp src/orbit.lua $(LUA_DIR) - mkdir -p $(LUA_DIR)/orbit -- cp src/model.lua $(LUA_DIR)/orbit -- cp src/cache.lua $(LUA_DIR)/orbit -- cp src/pages.lua $(LUA_DIR)/orbit -- cp src/ophandler.lua $(LUA_DIR)/orbit -+ cp src/orbit/*.lua $(LUA_DIR)/orbit - mkdir -p $(BIN_DIR) -- cp src/orbit $(BIN_DIR) -+ cp src/launchers/* $(BIN_DIR) - if [ -f ./wsapi/Makefile ]; then \ - cd wsapi && make install; \ - fi
package/orbit/orbit.mk +5 -11
@@ -4,16 +4,10 @@ # ################################################################################ -ORBIT_VERSION = 2.2.0 -ORBIT_SITE = http://github.com/downloads/keplerproject/orbit +ORBIT_VERSION_UPSTREAM = 2.2.0 +ORBIT_VERSION = $(ORBIT_VERSION_UPSTREAM)-2 +ORBIT_SUBDIR = orbit-$(ORBIT_VERSION_UPSTREAM) ORBIT_LICENSE = MIT -ORBIT_LICENSE_FILES = doc/us/license.md +ORBIT_LICENSE_FILES = $(ORBIT_SUBDIR)/doc/us/license.md -define ORBIT_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D) \ - LUA_DIR=$(TARGET_DIR)/usr/share/lua/5.1/ \ - BIN_DIR=$(TARGET_DIR)/usr/bin \ - install -endef - -$(eval $(generic-package)) +$(eval $(luarocks-package))
package/rings/rings.mk +2 -21
@@ -4,26 +4,7 @@ # ################################################################################ -RINGS_VERSION = 1.2.3 -RINGS_SITE = http://github.com/downloads/keplerproject/rings -RINGS_DEPENDENCIES = luainterpreter +RINGS_VERSION = 1.2.3-2 RINGS_LICENSE = MIT -define RINGS_BUILD_CMDS - $(MAKE) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS) -fPIC" -endef - -define RINGS_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)/usr" install -endef - -define RINGS_UNINSTALL_TARGET_CMDS - rm -f "$(TARGET_DIR)/usr/lib/lua/5.1/rings.so" - rm -f "$(TARGET_DIR)/usr/share/lua/5.1/stable.lua" -endef - -define RINGS_CLEAN_CMDS - $(MAKE) -C $(@D) clean -endef - -$(eval $(generic-package)) +$(eval $(luarocks-package))
package/wsapi/wsapi.mk +2 -13
@@ -4,18 +4,7 @@ # ################################################################################ -WSAPI_VERSION = 1.5 -WSAPI_SITE = http://github.com/downloads/keplerproject/wsapi +WSAPI_VERSION = 1.5-1 WSAPI_LICENSE = MIT -define WSAPI_INSTALL_TARGET_CMDS - mkdir -p $(TARGET_DIR)/usr/share/lua/5.1/wsapi - $(INSTALL) -m 0644 -D $(@D)/src/wsapi/*.lua \ - $(TARGET_DIR)/usr/share/lua/5.1/wsapi -endef - -define WSAPI_UNINSTALL_TARGET_CMDS - rm -rf "$(TARGET_DIR)/usr/share/lua/5.1/wsapi" -endef - -$(eval $(generic-package)) +$(eval $(luarocks-package))
package/xavante/xavante.mk +2 -13
@@ -4,18 +4,7 @@ # ################################################################################ -XAVANTE_VERSION = 2.2.1 -XAVANTE_SITE = http://github.com/downloads/keplerproject/xavante +XAVANTE_VERSION = 2.2.0-1 XAVANTE_LICENSE = MIT -define XAVANTE_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)/usr" install -endef - -define XAVANTE_UNINSTALL_TARGET_CMDS - rm -rf "$(TARGET_DIR)/usr/share/5.1/xavante" - rm -f "$(TARGET_DIR)/usr/share/5.1/xavante.lua" - rm -f "$(TARGET_DIR)/usr/share/5.1/sajax.lua" -endef - -$(eval $(generic-package)) +$(eval $(luarocks-package))
Signature · 1 line
1.7.9.5
PATCH v2 10/10 manual: adding packages luarocks
In reply to Francois Perrad--- docs/manual/adding-packages-luarocks.txt | 91 ++++++++++++++++++++++++++++++ docs/manual/adding-packages.txt | 2 + 2 files changed, 93 insertions(+) create mode 100644 docs/manual/adding-packages-luarocks.txt
docs/manual/adding-packages-luarocks.txt new file +91 -0
@@ -0,0 +1,91 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Infrastructure for LuaRocks-based packages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[[luarocks-package-tutorial]] + ++luarocks-package+ tutorial +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +First, let's see how to write a +.mk+ file for a LuaRocks-based package, +with an example : + +------------------------ +01: ################################################################################ +02: # +03: # luafoo +04: # +05: ################################################################################ +06: +07: LUAFOO_VERSION = 1.0.2-1 +08: LUAFOO_DEPENDENCIES = foo +09: +10: LUAFOO_BUILD_OPT += FOO_INCDIR=$(STAGING_DIR)/usr/include +11: LUAFOO_BUILD_OPT += FOO_LIBDIR=$(STAGING_DIR)/usr/lib +12: +13: $(eval $(luarocks-package)) +------------------------ + +On line 7, we declare the version of the package (the same as in the rockspec, +which is the concatenation of the upstream version and the rockspec revision). + +On line 8, we declare our dependencies, so that they are built +before the build process of our package starts. + +On line 10-11, we tell Buildroot to pass custom options to LuaRocks when it is +building the package. + +Finally, on line 13, we invoke the +luarocks-package+ +macro that generates all the Makefile rules that actually allows the +package to be built. + +[[luarocks-package-reference]] + ++luarocks-package+ reference +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +LuaRocks is a deployment and management system for Lua modules. + +LuaRocks supports various +build.type+ : +builtin+, +make+, +cmake+. +This infrastructure supports only the +builtin+ mode, +the +make+ & +cmake+ modes could be directly handled by generic & cmake infrastructure. + +The main macro of the LuaRocks package infrastructure is ++luarocks-package+. It is similar to the +generic-package+ macro. +The +host-luarocks-package+ macro is not available, +only the +luarocks-package+ macro is available. + +Just like the generic infrastructure, the LuaRocks infrastructure works +by defining a number of variables before calling the +luarocks-package+ +macro. + +First, all the package metadata information variables that exist in +the generic infrastructure also exist in the LuaRocks infrastructure: ++LUAFOO_VERSION+, +LUAFOO_SOURCE+, +LUAFOO_SITE+, ++LUAFOO_DEPENDENCIES+. + +Two of them are populate by the LuaRocks infrastructure (for the ++download+ step) : + +* +LUAFOO_SITE+ with the +BR2_LUAROCKS_MIRROR+ value + +* +LUAFOO_SOURCE+ with +foo-$(FOO_VERSION).src.rock+ + +A few additional variables, specific to the LuaRocks infrastructure, are +also defined. They could be overrided in specific cases. + +* +LUAFOO_ROCKSPEC+ with +foo-$(FOO_VERSION).rockspec+ + +* +LUAFOO_SUBDIR+ with +foo-$(FOO_VERSION_WITHOUT_ROCKSPEC_REVISION)+ + +* +LUAFOO_BUILD_OPT+ contains the build option for +luarocks build+ call. + The default is empty. + +With the LuaRocks infrastructure, only 2 steps use +luarocks+ : +extract and install target. +luarocks+ handles building and install +in the same step. + +The step +patch+ is handled by the generic infrastructure. +The step +configure+ and +build+ stay empty.
docs/manual/adding-packages.txt +2 -0
@@ -18,6 +18,8 @@ include::adding-packages-autotools.txt[] include::adding-packages-cmake.txt[] +include::adding-packages-luarocks.txt[] + include::adding-packages-hooks.txt[] include::adding-packages-gettext.txt[]
Signature · 1 line
1.7.9.5
PATCH v2 10/10 manual: adding packages luarocks
Quoted 71 lines · Francois Perrad
--- docs/manual/adding-packages-luarocks.txt | 91 ++++++++++++++++++++++++++++++ docs/manual/adding-packages.txt | 2 + 2 files changed, 93 insertions(+) create mode 100644 docs/manual/adding-packages-luarocks.txtdocs/manual/adding-packages-luarocks.txt new file +59
-0@@ -0,0 +1,91 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Infrastructure for LuaRocks-based packages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[[luarocks-package-tutorial]] + ++luarocks-package+ tutorial +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +First, let's see how to write a +.mk+ file for a LuaRocks-based package, +with an example : + +------------------------ +01: ################################################################################ +02: # +03: # luafoo +04: # +05: ################################################################################ +06: +07: LUAFOO_VERSION = 1.0.2-1 +08: LUAFOO_DEPENDENCIES = foo +09: +10: LUAFOO_BUILD_OPT += FOO_INCDIR=$(STAGING_DIR)/usr/include +11: LUAFOO_BUILD_OPT += FOO_LIBDIR=$(STAGING_DIR)/usr/lib +12: +13: $(eval $(luarocks-package)) +------------------------ + +On line 7, we declare the version of the package (the same as in the rockspec, +which is the concatenation of the upstream version and the rockspec revision). + +On line 8, we declare our dependencies, so that they are built +before the build process of our package starts. + +On line 10-11, we tell Buildroot to pass custom options to LuaRocks when it is +building the package. + +Finally, on line 13, we invoke the +luarocks-package+ +macro that generates all the Makefile rules that actually allows the +package to be built. + +[[luarocks-package-reference]] + ++luarocks-package+ reference +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +LuaRocks is a deployment and management system for Lua modules. + +LuaRocks supports various +build.type+ : +builtin+, +make+, +cmake+. +This infrastructure supports only the +builtin+ mode, +the +make+ & +cmake+ modes could be directly handled by generic & cmake infrastructure. + +The main macro of the LuaRocks package infrastructure is ++luarocks-package+. It is similar to the +generic-package+ macro. +The +host-luarocks-package+ macro is not available, +only the +luarocks-package+ macro is available. +
docs/manual/adding-packages-luarocks.txt line 69
Quoted 10 lines
docs/manual/adding-packages-luarocks.txt new file +10
-0+Just like the generic infrastructure, the LuaRocks infrastructure works +by defining a number of variables before calling the +luarocks-package+ +macro. + +First, all the package metadata information variables that exist in +the generic infrastructure also exist in the LuaRocks infrastructure: ++LUAFOO_VERSION+, +LUAFOO_SOURCE+, +LUAFOO_SITE+, ++LUAFOO_DEPENDENCIES+. + +Two of them are populate by the LuaRocks infrastructure (for the
populated
docs/manual/adding-packages-luarocks.txt line 77
Quoted 8 lines
docs/manual/adding-packages-luarocks.txt new file +8
-0++download+ step) : + +* +LUAFOO_SITE+ with the +BR2_LUAROCKS_MIRROR+ value + +* +LUAFOO_SOURCE+ with +foo-$(FOO_VERSION).src.rock+ + +A few additional variables, specific to the LuaRocks infrastructure, are +also defined. They could be overrided in specific cases.
overridden
docs/manual/adding-packages-luarocks.txt line 83
Quoted 6 lines
docs/manual/adding-packages-luarocks.txt new file +6
-0+ +* +LUAFOO_ROCKSPEC+ with +foo-$(FOO_VERSION).rockspec+ + +* +LUAFOO_SUBDIR+ with +foo-$(FOO_VERSION_WITHOUT_ROCKSPEC_REVISION)+ + +* +LUAFOO_BUILD_OPT+ contains the build option for +luarocks build+ call.
options
for the
docs/manual/adding-packages-luarocks.txt line 87
Quoted 4 lines
docs/manual/adding-packages-luarocks.txt new file +4
-0+ The default is empty. + +With the LuaRocks infrastructure, only 2 steps use +luarocks+ : +extract and install target. +luarocks+ handles building and install
maybe this should be: 'install-target' to make it more clear?
Quoted 24 lines
docs/manual/adding-packages-luarocks.txt new file +4
-0+in the same step. + +The step +patch+ is handled by the generic infrastructure. +The step +configure+ and +build+ stay empty.docs/manual/adding-packages.txt +2
-1@@ -18,6 +18,8 @@ include::adding-packages-autotools.txt[] include::adding-packages-cmake.txt[] +include::adding-packages-luarocks.txt[] + include::adding-packages-hooks.txt[] include::adding-packages-gettext.txt[] --1.7.9.5
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot