* [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package
@ 2013-11-15 13:07 Francois Perrad
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 02/10] luajit: allow to build Lua extensions without lua Francois Perrad
` (10 more replies)
0 siblings, 11 replies; 33+ messages in thread
From: Francois Perrad @ 2013-11-15 13:07 UTC (permalink / raw)
To: buildroot
luainterpreter is lua or luajit
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
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
diff --git a/package/Config.in b/package/Config.in
index 311cc6c..a8ebb27 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -352,6 +352,7 @@ source "package/haserl/Config.in"
source "package/jamvm/Config.in"
source "package/jimtcl/Config.in"
source "package/lua/Config.in"
+source "package/luainterpreter/Config.in"
source "package/luajit/Config.in"
if BR2_PACKAGE_LUA || BR2_PACKAGE_LUAJIT
menu "Lua libraries/modules"
diff --git a/package/lbase64/Config.in b/package/lbase64/Config.in
index bd8503a..ca9dd5d 100644
--- a/package/lbase64/Config.in
+++ b/package/lbase64/Config.in
@@ -1,5 +1,6 @@
config BR2_PACKAGE_LBASE64
bool "lbase64"
+ depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
help
A base64 library for Lua
diff --git a/package/lbase64/lbase64.mk b/package/lbase64/lbase64.mk
index 87dda40..ab726ef 100644
--- a/package/lbase64/lbase64.mk
+++ b/package/lbase64/lbase64.mk
@@ -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) \
diff --git a/package/lua-ev/Config.in b/package/lua-ev/Config.in
index 1e89c27..2f9c486 100644
--- a/package/lua-ev/Config.in
+++ b/package/lua-ev/Config.in
@@ -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.
diff --git a/package/lua-ev/lua-ev.mk b/package/lua-ev/lua-ev.mk
index 0beece4..e6a12c8 100644
--- a/package/lua-ev/lua-ev.mk
+++ b/package/lua-ev/lua-ev.mk
@@ -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"
diff --git a/package/lua-msgpack-native/Config.in b/package/lua-msgpack-native/Config.in
index 8894ee5..1014298 100644
--- a/package/lua-msgpack-native/Config.in
+++ b/package/lua-msgpack-native/Config.in
@@ -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
diff --git a/package/lua-msgpack-native/lua-msgpack-native.mk b/package/lua-msgpack-native/lua-msgpack-native.mk
index 9065916..6f85f89 100644
--- a/package/lua-msgpack-native/lua-msgpack-native.mk
+++ b/package/lua-msgpack-native/lua-msgpack-native.mk
@@ -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
diff --git a/package/lua/Config.in b/package/lua/Config.in
index 8c05d08..3c1b2f2 100644
--- a/package/lua/Config.in
+++ b/package/lua/Config.in
@@ -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.
diff --git a/package/luacjson/Config.in b/package/luacjson/Config.in
index 8a5624f..d3665c0 100644
--- a/package/luacjson/Config.in
+++ b/package/luacjson/Config.in
@@ -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
diff --git a/package/luacjson/luacjson.mk b/package/luacjson/luacjson.mk
index f976ec6..d1f1ebb 100644
--- a/package/luacjson/luacjson.mk
+++ b/package/luacjson/luacjson.mk
@@ -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
diff --git a/package/luaexpat/Config.in b/package/luaexpat/Config.in
index 186c5c9..f8db318 100644
--- a/package/luaexpat/Config.in
+++ b/package/luaexpat/Config.in
@@ -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.
diff --git a/package/luaexpat/luaexpat.mk b/package/luaexpat/luaexpat.mk
index 5c45f34..e0fa043 100644
--- a/package/luaexpat/luaexpat.mk
+++ b/package/luaexpat/luaexpat.mk
@@ -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
diff --git a/package/luafilesystem/Config.in b/package/luafilesystem/Config.in
index 7c130f8..489ebf3 100644
--- a/package/luafilesystem/Config.in
+++ b/package/luafilesystem/Config.in
@@ -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.
diff --git a/package/luafilesystem/luafilesystem.mk b/package/luafilesystem/luafilesystem.mk
index 2f7b4d8..edd7203 100644
--- a/package/luafilesystem/luafilesystem.mk
+++ b/package/luafilesystem/luafilesystem.mk
@@ -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)
diff --git a/package/luainterpreter/Config.in b/package/luainterpreter/Config.in
new file mode 100644
index 0000000..d85d7e8
--- /dev/null
+++ b/package/luainterpreter/Config.in
@@ -0,0 +1,2 @@
+config BR2_PACKAGE_HAS_LUA_INTERPRETER
+ bool
diff --git a/package/luainterpreter/luainterpreter.mk b/package/luainterpreter/luainterpreter.mk
new file mode 100644
index 0000000..6e2ccfe
--- /dev/null
+++ b/package/luainterpreter/luainterpreter.mk
@@ -0,0 +1,18 @@
+#############################################################
+#
+# Virtual package for luainterpreter
+#
+#############################################################
+
+LUAINTERPRETER_VERSION = virtual
+LUAINTERPRETER_SOURCE =
+
+ifeq ($(BR2_PACKAGE_LUA),y)
+LUAINTERPRETER_DEPENDENCIES = lua
+endif
+
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+LUAINTERPRETER_DEPENDENCIES = luajit
+endif
+
+$(eval $(generic-package))
diff --git a/package/luajit/Config.in b/package/luajit/Config.in
index 23b2650..97013e4 100644
--- a/package/luajit/Config.in
+++ b/package/luajit/Config.in
@@ -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
diff --git a/package/luaposix/Config.in b/package/luaposix/Config.in
index 922fd9e..74eedb6 100644
--- a/package/luaposix/Config.in
+++ b/package/luaposix/Config.in
@@ -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
diff --git a/package/luaposix/luaposix.mk b/package/luaposix/luaposix.mk
index cbcdf32..b398c8c 100644
--- a/package/luaposix/luaposix.mk
+++ b/package/luaposix/luaposix.mk
@@ -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)
diff --git a/package/luasec/Config.in b/package/luasec/Config.in
index 2d303c1..ed55df7 100644
--- a/package/luasec/Config.in
+++ b/package/luasec/Config.in
@@ -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.
diff --git a/package/luasec/luasec.mk b/package/luasec/luasec.mk
index 053309f..3fb7060 100644
--- a/package/luasec/luasec.mk
+++ b/package/luasec/luasec.mk
@@ -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)" \
diff --git a/package/luasocket/Config.in b/package/luasocket/Config.in
index 4526303..619d649 100644
--- a/package/luasocket/Config.in
+++ b/package/luasocket/Config.in
@@ -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.
diff --git a/package/luasocket/luasocket.mk b/package/luasocket/luasocket.mk
index b0c0be5..20ad8bf 100644
--- a/package/luasocket/luasocket.mk
+++ b/package/luasocket/luasocket.mk
@@ -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
diff --git a/package/luasql/Config.in b/package/luasql/Config.in
index 4dd011a..96e04fb 100644
--- a/package/luasql/Config.in
+++ b/package/luasql/Config.in
@@ -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.
diff --git a/package/luasql/luasql.mk b/package/luasql/luasql.mk
index 6fbdccc..12fd02c 100644
--- a/package/luasql/luasql.mk
+++ b/package/luasql/luasql.mk
@@ -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)" \
diff --git a/package/rings/Config.in b/package/rings/Config.in
index d1f1efe..b1d41f3 100644
--- a/package/rings/Config.in
+++ b/package/rings/Config.in
@@ -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.
diff --git a/package/rings/rings.mk b/package/rings/rings.mk
index 610ded0..67a4916 100644
--- a/package/rings/rings.mk
+++ b/package/rings/rings.mk
@@ -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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 02/10] luajit: allow to build Lua extensions without lua
2013-11-15 13:07 [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package Francois Perrad
@ 2013-11-15 13:07 ` Francois Perrad
2013-12-22 17:23 ` Thomas Petazzoni
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 03/10] lua: remove a too invasive patch Francois Perrad
` (9 subsequent siblings)
10 siblings, 1 reply; 33+ messages in thread
From: Francois Perrad @ 2013-11-15 13:07 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
package/luajit/luajit-05-install-inc.patch | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 package/luajit/luajit-05-install-inc.patch
diff --git a/package/luajit/luajit-05-install-inc.patch b/package/luajit/luajit-05-install-inc.patch
new file mode 100644
index 0000000..1fd11b1
--- /dev/null
+++ b/package/luajit/luajit-05-install-inc.patch
@@ -0,0 +1,17 @@
+Install includes like lua's ones
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+
+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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 03/10] lua: remove a too invasive patch
2013-11-15 13:07 [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package Francois Perrad
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 02/10] luajit: allow to build Lua extensions without lua Francois Perrad
@ 2013-11-15 13:07 ` Francois Perrad
2013-12-22 17:24 ` Thomas Petazzoni
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 04/10] lua*: restore version in module paths Francois Perrad
` (8 subsequent siblings)
10 siblings, 1 reply; 33+ messages in thread
From: Francois Perrad @ 2013-11-15 13:07 UTC (permalink / raw)
To: buildroot
the static version of luac is enough
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
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
diff --git a/package/lua/lua-03-shared-libs-for-luac.patch b/package/lua/lua-03-shared-libs-for-luac.patch
deleted file mode 100644
index 33f9183..0000000
--- a/package/lua/lua-03-shared-libs-for-luac.patch
+++ /dev/null
@@ -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 <francois.perrad@gadz.org>
-
-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)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 04/10] lua*: restore version in module paths
2013-11-15 13:07 [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package Francois Perrad
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 02/10] luajit: allow to build Lua extensions without lua Francois Perrad
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 03/10] lua: remove a too invasive patch Francois Perrad
@ 2013-11-15 13:07 ` Francois Perrad
2013-12-22 17:26 ` Thomas Petazzoni
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 05/10] luarocks: new package Francois Perrad
` (7 subsequent siblings)
10 siblings, 1 reply; 33+ messages in thread
From: Francois Perrad @ 2013-11-15 13:07 UTC (permalink / raw)
To: buildroot
(like in upstream)
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
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
diff --git a/package/cgilua/cgilua.mk b/package/cgilua/cgilua.mk
index e327fed..663cbc4 100644
--- a/package/cgilua/cgilua.mk
+++ b/package/cgilua/cgilua.mk
@@ -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))
diff --git a/package/copas/copas.mk b/package/copas/copas.mk
index e100f49..99aacbc 100644
--- a/package/copas/copas.mk
+++ b/package/copas/copas.mk
@@ -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))
diff --git a/package/coxpcall/coxpcall.mk b/package/coxpcall/coxpcall.mk
index 275dcde..58bea22 100644
--- a/package/coxpcall/coxpcall.mk
+++ b/package/coxpcall/coxpcall.mk
@@ -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))
diff --git a/package/lbase64/lbase64.mk b/package/lbase64/lbase64.mk
index ab726ef..b055fdf 100644
--- a/package/lbase64/lbase64.mk
+++ b/package/lbase64/lbase64.mk
@@ -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
diff --git a/package/lua-ev/lua-ev.mk b/package/lua-ev/lua-ev.mk
index e6a12c8..77065cd 100644
--- a/package/lua-ev/lua-ev.mk
+++ b/package/lua-ev/lua-ev.mk
@@ -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))
diff --git a/package/lua-msgpack-native/lua-msgpack-native.mk b/package/lua-msgpack-native/lua-msgpack-native.mk
index 6f85f89..2ea2da4 100644
--- a/package/lua-msgpack-native/lua-msgpack-native.mk
+++ b/package/lua-msgpack-native/lua-msgpack-native.mk
@@ -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
diff --git a/package/lua/lua-01-root-path.patch b/package/lua/lua-01-root-path.patch
index f82c9c5..fd0da6e 100644
--- a/package/lua/lua-01-root-path.patch
+++ b/package/lua/lua-01-root-path.patch
@@ -1,5 +1,4 @@
Adjust installation location to /usr.
-Remove version in module paths.
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
@@ -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"
diff --git a/package/luabitop/luabitop.mk b/package/luabitop/luabitop.mk
index c61e826..653aacd 100644
--- a/package/luabitop/luabitop.mk
+++ b/package/luabitop/luabitop.mk
@@ -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
diff --git a/package/luacjson/luacjson.mk b/package/luacjson/luacjson.mk
index d1f1ebb..f973278 100644
--- a/package/luacjson/luacjson.mk
+++ b/package/luacjson/luacjson.mk
@@ -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))
diff --git a/package/luaexpat/luaexpat.mk b/package/luaexpat/luaexpat.mk
index e0fa043..9c11620 100644
--- a/package/luaexpat/luaexpat.mk
+++ b/package/luaexpat/luaexpat.mk
@@ -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
diff --git a/package/luaexpatutils/luaexpatutils.mk b/package/luaexpatutils/luaexpatutils.mk
index 391031b..99e1910 100644
--- a/package/luaexpatutils/luaexpatutils.mk
+++ b/package/luaexpatutils/luaexpatutils.mk
@@ -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))
diff --git a/package/luafilesystem/luafilesystem.mk b/package/luafilesystem/luafilesystem.mk
index edd7203..06a8199 100644
--- a/package/luafilesystem/luafilesystem.mk
+++ b/package/luafilesystem/luafilesystem.mk
@@ -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
diff --git a/package/luajit/luajit-01-root-path.patch b/package/luajit/luajit-01-root-path.patch
deleted file mode 100644
index cc2f04f..0000000
--- a/package/luajit/luajit-01-root-path.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Adjust installation location to /usr
-
-Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-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 \
diff --git a/package/luaposix/luaposix.mk b/package/luaposix/luaposix.mk
index b398c8c..b018995 100644
--- a/package/luaposix/luaposix.mk
+++ b/package/luaposix/luaposix.mk
@@ -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
diff --git a/package/luasec/luasec.mk b/package/luasec/luasec.mk
index 3fb7060..8ae9c02 100644
--- a/package/luasec/luasec.mk
+++ b/package/luasec/luasec.mk
@@ -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))
diff --git a/package/luasocket/luasocket.mk b/package/luasocket/luasocket.mk
index 20ad8bf..1fbc5c9 100644
--- a/package/luasocket/luasocket.mk
+++ b/package/luasocket/luasocket.mk
@@ -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
diff --git a/package/luasql/luasql.mk b/package/luasql/luasql.mk
index 12fd02c..7352e03 100644
--- a/package/luasql/luasql.mk
+++ b/package/luasql/luasql.mk
@@ -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))
diff --git a/package/orbit/orbit.mk b/package/orbit/orbit.mk
index ba1142f..7115896 100644
--- a/package/orbit/orbit.mk
+++ b/package/orbit/orbit.mk
@@ -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
diff --git a/package/rings/rings.mk b/package/rings/rings.mk
index 67a4916..e5f3d4f 100644
--- a/package/rings/rings.mk
+++ b/package/rings/rings.mk
@@ -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
diff --git a/package/wsapi/wsapi.mk b/package/wsapi/wsapi.mk
index c70502b..743d4b9 100644
--- a/package/wsapi/wsapi.mk
+++ b/package/wsapi/wsapi.mk
@@ -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))
diff --git a/package/xavante/xavante.mk b/package/xavante/xavante.mk
index dd2a707..069092d 100644
--- a/package/xavante/xavante.mk
+++ b/package/xavante/xavante.mk
@@ -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))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 05/10] luarocks: new package
2013-11-15 13:07 [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package Francois Perrad
` (2 preceding siblings ...)
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 04/10] lua*: restore version in module paths Francois Perrad
@ 2013-11-15 13:07 ` Francois Perrad
2013-12-22 17:28 ` Thomas Petazzoni
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 06/10] luarocks: new infrastructure Francois Perrad
` (6 subsequent siblings)
10 siblings, 1 reply; 33+ messages in thread
From: Francois Perrad @ 2013-11-15 13:07 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
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
diff --git a/package/luarocks/luarocks-build-minimal.patch b/package/luarocks/luarocks-build-minimal.patch
new file mode 100644
index 0000000..3a4794e
--- /dev/null
+++ b/package/luarocks/luarocks-build-minimal.patch
@@ -0,0 +1,17 @@
+hack for buildroot which needs independant steps : download, unpack, build
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+
+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
diff --git a/package/luarocks/luarocks-unpack.patch b/package/luarocks/luarocks-unpack.patch
new file mode 100644
index 0000000..0f036ee
--- /dev/null
+++ b/package/luarocks/luarocks-unpack.patch
@@ -0,0 +1,24 @@
+allows unpack in existing directory
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+
+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
+
diff --git a/package/luarocks/luarocks.mk b/package/luarocks/luarocks.mk
new file mode 100644
index 0000000..d996ccc
--- /dev/null
+++ b/package/luarocks/luarocks.mk
@@ -0,0 +1,42 @@
+################################################################################
+#
+# luarocks
+#
+################################################################################
+
+LUAROCKS_VERSION = 2.1.1
+LUAROCKS_SITE = http://luarocks.org/releases/
+LUAROCKS_LICENSE = MIT
+LUAROCKS_LICENSE_FILES = COPYING
+
+HOST_LUAROCKS_DEPENDENCIES = host-lua luainterpreter
+
+LUAROCKS_CONFIG_DIR = $(HOST_DIR)/usr/etc/luarocks
+LUAROCKS_CONFIG_FILE = $(LUAROCKS_CONFIG_DIR)/config-5.1.lua
+
+define HOST_LUAROCKS_CONFIGURE_CMDS
+ cd $(@D) && ./configure \
+ --prefix=$(TARGET_DIR)/usr \
+ --sysconfdir=$(LUAROCKS_CONFIG_DIR) \
+ --with-lua=$(HOST_DIR)/usr \
+ --with-lua-include=$(STAGING_DIR)/usr/include \
+ --with-lua-lib=$(STAGING_DIR)/usr/lib
+ @echo "$(@D)/config.unix generated"
+endef
+
+define HOST_LUAROCKS_INSTALL_CMDS
+ $(MAKE1) -C $(@D) install \
+ PREFIX=$(HOST_DIR)/usr
+ echo "-- BR cross-compilation" >> $(LUAROCKS_CONFIG_FILE)
+ echo "variables = {" >> $(LUAROCKS_CONFIG_FILE)
+ echo " CC = [[$(TARGET_CC)]]," >> $(LUAROCKS_CONFIG_FILE)
+ echo " LD = [[$(TARGET_CC)]]," >> $(LUAROCKS_CONFIG_FILE)
+ echo " CFLAGS = [[$(TARGET_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)
+ echo "gcc_rpath = false" >> $(LUAROCKS_CONFIG_FILE)
+endef
+
+$(eval $(host-generic-package))
+
--
1.7.9.5
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 06/10] luarocks: new infrastructure
2013-11-15 13:07 [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package Francois Perrad
` (3 preceding siblings ...)
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 05/10] luarocks: new package Francois Perrad
@ 2013-11-15 13:07 ` Francois Perrad
2013-12-22 17:31 ` Thomas Petazzoni
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 07/10] lua-cjson: restore official name Francois Perrad
` (5 subsequent siblings)
10 siblings, 1 reply; 33+ messages in thread
From: Francois Perrad @ 2013-11-15 13:07 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
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
diff --git a/Config.in b/Config.in
index d87e0f0..cb41c36 100644
--- a/Config.in
+++ b/Config.in
@@ -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
diff --git a/Makefile b/Makefile
index c7a0a6d..0dde760 100644
--- a/Makefile
+++ b/Makefile
@@ -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' | \
diff --git a/package/Makefile.in b/package/Makefile.in
index 612f3c7..f7fd8f9 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -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
diff --git a/package/pkg-luarocks.mk b/package/pkg-luarocks.mk
new file mode 100644
index 0000000..2a20413
--- /dev/null
+++ b/package/pkg-luarocks.mk
@@ -0,0 +1,71 @@
+################################################################################
+# LuaRocks package infrastructure
+# see http://luarocks.org/
+#
+# This file implements an infrastructure that eases development of
+# package .mk files for LuaRocks packages.
+# LuaRocks supports various build.type : builtin, make, cmake.
+# This luarocks infrastructure supports only the builtin mode,
+# the make & cmake modes could be directly handled by generic & cmake infrastructure.
+#
+# See the Buildroot documentation for details on the usage of this
+# infrastructure
+#
+# In terms of implementation, this LuaRocks infrastructure requires
+# the .mk file to only specify metadata informations about the
+# package: name, version, etc.
+#
+################################################################################
+
+LUAROCKS_RUN = $(HOST_DIR)/usr/bin/luarocks
+
+################################################################################
+# inner-luarocks-package -- defines how the configuration, compilation and
+# installation of a LuaRocks package should be done, implements a few hooks to
+# tune the build process and calls the generic package infrastructure to
+# generate the necessary make targets
+#
+# argument 1 is the lowercase package name
+# argument 2 is the uppercase package name, including an HOST_ prefix
+# for host packages
+# argument 3 is the uppercase package name, without the HOST_ prefix
+# for host packages
+# argument 4 is the package directory prefix
+# argument 5 is the type (target or host)
+################################################################################
+
+define inner-luarocks-package
+
+$(2)_BUILD_OPT ?=
+$(2)_SUBDIR ?= $(1)-$(shell echo "$($(3)_VERSION)" | sed -e "s/-[0-9]$$//")
+$(2)_ROCKSPEC ?= $(1)-$($(3)_VERSION).rockspec
+$(2)_SOURCE ?= $(1)-$($(3)_VERSION).src.rock
+$(2)_SITE ?= $(call qstrip,$(BR2_LUAROCKS_MIRROR))
+
+#
+# Extract step
+#
+$(2)_EXTRACT_CMDS ?= \
+ cd $$($(2)_DIR)/.. && $(LUAROCKS_RUN) unpack $(DL_DIR)/$$($(2)_SOURCE)
+
+# $(2)_DEPENDENCIES are handled for configure step (too late)
+$(1)-extract: host-luarocks
+
+#
+# Build/install step.
+#
+$(2)_INSTALL_TARGET_CMDS ?= \
+ cd $$($(2)_SRCDIR) && $(LUAROCKS_RUN) build --minimal $$($(2)_ROCKSPEC) $$($(2)_BUILD_OPT)
+
+# Call the generic package infrastructure to generate the necessary
+# make targets
+$(call inner-generic-package,$(1),$(2),$(3),$(4),$(5))
+
+endef
+
+################################################################################
+# luarocks-package -- the target generator macro for LuaRocks packages
+################################################################################
+
+luarocks-package = $(call inner-luarocks-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target)
+# host-luarocks-package not supported
--
1.7.9.5
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 07/10] lua-cjson: restore official name
2013-11-15 13:07 [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package Francois Perrad
` (4 preceding siblings ...)
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 06/10] luarocks: new infrastructure Francois Perrad
@ 2013-11-15 13:07 ` Francois Perrad
2013-12-22 17:32 ` Thomas Petazzoni
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 08/10] luasql-sqlite3: renamed like with LuaRocks Francois Perrad
` (4 subsequent siblings)
10 siblings, 1 reply; 33+ messages in thread
From: Francois Perrad @ 2013-11-15 13:07 UTC (permalink / raw)
To: buildroot
(need by LuaRocks)
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
Config.in.legacy | 10 ++++++++++
package/Config.in | 2 +-
package/{luacjson => lua-cjson}/Config.in | 4 ++--
.../luacjson.mk => lua-cjson/lua-cjson.mk} | 21 ++++++++++----------
4 files changed, 23 insertions(+), 14 deletions(-)
rename package/{luacjson => lua-cjson}/Config.in (90%)
rename package/{luacjson/luacjson.mk => lua-cjson/lua-cjson.mk} (56%)
diff --git a/Config.in.legacy b/Config.in.legacy
index 587afe1..a7fa821 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -99,6 +99,16 @@ comment "----------------------------------------------------"
endif
###############################################################################
+comment "Legacy options removed in 2014.02"
+
+config BR2_PACKAGE_LUACJSON
+ bool "luacjson has been replaced by lua-cjson"
+ select BR2_PACKAGE_LUA_CJSON
+ select BR2_LEGACY
+ help
+ The option has been renamed BR2_PACKAGE_LUA_CJSON.
+
+###############################################################################
comment "Legacy options removed in 2013.11"
config BR2_PACKAGE_QT_JAVASCRIPTCORE
diff --git a/package/Config.in b/package/Config.in
index a8ebb27..ea8d524 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/luacjson/Config.in b/package/lua-cjson/Config.in
similarity index 90%
rename from package/luacjson/Config.in
rename to package/lua-cjson/Config.in
index d3665c0..8129fab 100644
--- a/package/luacjson/Config.in
+++ b/package/lua-cjson/Config.in
@@ -1,5 +1,5 @@
-config BR2_PACKAGE_LUACJSON
- bool "luacjson"
+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:
diff --git a/package/luacjson/luacjson.mk b/package/lua-cjson/lua-cjson.mk
similarity index 56%
rename from package/luacjson/luacjson.mk
rename to package/lua-cjson/lua-cjson.mk
index f973278..0969547 100644
--- a/package/luacjson/luacjson.mk
+++ b/package/lua-cjson/lua-cjson.mk
@@ -1,17 +1,16 @@
################################################################################
#
-# luacjson
+# lua-cjson
#
################################################################################
-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
+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 LUACJSON_BUILD_CMDS
+define LUA_CJSON_BUILD_CMDS
$(MAKE) -C $(@D) \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
@@ -20,15 +19,15 @@ define LUACJSON_BUILD_CMDS
PREFIX=$(STAGING_DIR)/usr
endef
-define LUACJSON_INSTALL_TARGET_CMDS
+define LUA_CJSON_INSTALL_TARGET_CMDS
$(MAKE) DESTDIR="$(TARGET_DIR)" PREFIX="/usr" -C $(@D) install
endef
-define LUACJSON_CLEAN_CMDS
+define LUA_CJSON_CLEAN_CMDS
$(MAKE) -C $(@D) clean
endef
-define LUACJSON_UNINSTALL_TARGET_CMDS
+define LUA_CJSON_UNINSTALL_TARGET_CMDS
rm -f $(TARGET_DIR)/usr/lib/lua/5.1/cjson.so
endef
--
1.7.9.5
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 08/10] luasql-sqlite3: renamed like with LuaRocks
2013-11-15 13:07 [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package Francois Perrad
` (5 preceding siblings ...)
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 07/10] lua-cjson: restore official name Francois Perrad
@ 2013-11-15 13:07 ` Francois Perrad
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 09/10] lua*: refactor with luarocks infrastructure Francois Perrad
` (3 subsequent siblings)
10 siblings, 0 replies; 33+ messages in thread
From: Francois Perrad @ 2013-11-15 13:07 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
Config.in.legacy | 7 ++++++
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 ------------------------------
6 files changed, 49 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
diff --git a/Config.in.legacy b/Config.in.legacy
index a7fa821..8d9073e 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -101,6 +101,13 @@ endif
###############################################################################
comment "Legacy options removed in 2014.02"
+config BR2_PACKAGE_LUASQL
+ bool "luasql has been replaced by luasql-sqlite3"
+ select BR2_PACKAGE_LUASQL_SQLITE3
+ select BR2_LEGACY
+ help
+ The option has been renamed BR2_PACKAGE_LUASQL_SQLITE3.
+
config BR2_PACKAGE_LUACJSON
bool "luacjson has been replaced by lua-cjson"
select BR2_PACKAGE_LUA_CJSON
diff --git a/package/Config.in b/package/Config.in
index ea8d524..0ca8ac1 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/luasql-sqlite3/Config.in b/package/luasql-sqlite3/Config.in
new file mode 100644
index 0000000..3876f3d
--- /dev/null
+++ b/package/luasql-sqlite3/Config.in
@@ -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
+
diff --git a/package/luasql-sqlite3/luasql-sqlite3.mk b/package/luasql-sqlite3/luasql-sqlite3.mk
new file mode 100644
index 0000000..b114f02
--- /dev/null
+++ b/package/luasql-sqlite3/luasql-sqlite3.mk
@@ -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))
diff --git a/package/luasql/Config.in b/package/luasql/Config.in
deleted file mode 100644
index 96e04fb..0000000
--- a/package/luasql/Config.in
+++ /dev/null
@@ -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
diff --git a/package/luasql/luasql.mk b/package/luasql/luasql.mk
deleted file mode 100644
index 7352e03..0000000
--- a/package/luasql/luasql.mk
+++ /dev/null
@@ -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))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 09/10] lua*: refactor with luarocks infrastructure
2013-11-15 13:07 [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package Francois Perrad
` (6 preceding siblings ...)
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 08/10] luasql-sqlite3: renamed like with LuaRocks Francois Perrad
@ 2013-11-15 13:07 ` Francois Perrad
2013-12-22 17:34 ` Thomas Petazzoni
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 10/10] manual: adding packages luarocks Francois Perrad
` (2 subsequent siblings)
10 siblings, 1 reply; 33+ messages in thread
From: Francois Perrad @ 2013-11-15 13:07 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
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
diff --git a/package/cgilua/cgilua.mk b/package/cgilua/cgilua.mk
index 663cbc4..bdb1411 100644
--- a/package/cgilua/cgilua.mk
+++ b/package/cgilua/cgilua.mk
@@ -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))
diff --git a/package/copas/copas.mk b/package/copas/copas.mk
index 99aacbc..3021139 100644
--- a/package/copas/copas.mk
+++ b/package/copas/copas.mk
@@ -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))
diff --git a/package/lbase64/lbase64.mk b/package/lbase64/lbase64.mk
index b055fdf..4289f58 100644
--- a/package/lbase64/lbase64.mk
+++ b/package/lbase64/lbase64.mk
@@ -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))
diff --git a/package/lua-cjson/lua-cjson.mk b/package/lua-cjson/lua-cjson.mk
index 0969547..16cb974 100644
--- a/package/lua-cjson/lua-cjson.mk
+++ b/package/lua-cjson/lua-cjson.mk
@@ -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))
diff --git a/package/luabitop/luabitop.mk b/package/luabitop/luabitop.mk
index 653aacd..4368c94 100644
--- a/package/luabitop/luabitop.mk
+++ b/package/luabitop/luabitop.mk
@@ -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))
diff --git a/package/luaexpat/luaexpat.mk b/package/luaexpat/luaexpat.mk
index 9c11620..d507c2a 100644
--- a/package/luaexpat/luaexpat.mk
+++ b/package/luaexpat/luaexpat.mk
@@ -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))
diff --git a/package/luafilesystem/luafilesystem-without_large_file.patch b/package/luafilesystem/luafilesystem-without_large_file.patch
index b1f41c0..5b24b99 100644
--- a/package/luafilesystem/luafilesystem-without_large_file.patch
+++ b/package/luafilesystem/luafilesystem-without_large_file.patch
@@ -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
diff --git a/package/luafilesystem/luafilesystem.mk b/package/luafilesystem/luafilesystem.mk
index 06a8199..7943201 100644
--- a/package/luafilesystem/luafilesystem.mk
+++ b/package/luafilesystem/luafilesystem.mk
@@ -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))
diff --git a/package/luasec/luasec.mk b/package/luasec/luasec.mk
index 8ae9c02..354e805 100644
--- a/package/luasec/luasec.mk
+++ b/package/luasec/luasec.mk
@@ -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))
diff --git a/package/luasql-sqlite3/luasql-sqlite3.mk b/package/luasql-sqlite3/luasql-sqlite3.mk
index b114f02..0e7ae6a 100644
--- a/package/luasql-sqlite3/luasql-sqlite3.mk
+++ b/package/luasql-sqlite3/luasql-sqlite3.mk
@@ -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))
diff --git a/package/orbit/orbit-01-fix-installation.patch b/package/orbit/orbit-01-fix-installation.patch
deleted file mode 100644
index ae50ad9..0000000
--- a/package/orbit/orbit-01-fix-installation.patch
+++ /dev/null
@@ -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 <thomas.petazzoni@free-electrons.com>
-
-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
diff --git a/package/orbit/orbit.mk b/package/orbit/orbit.mk
index 7115896..e5a8676 100644
--- a/package/orbit/orbit.mk
+++ b/package/orbit/orbit.mk
@@ -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))
diff --git a/package/rings/rings.mk b/package/rings/rings.mk
index e5f3d4f..c23f879 100644
--- a/package/rings/rings.mk
+++ b/package/rings/rings.mk
@@ -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))
diff --git a/package/wsapi/wsapi.mk b/package/wsapi/wsapi.mk
index 743d4b9..f1ea9b5 100644
--- a/package/wsapi/wsapi.mk
+++ b/package/wsapi/wsapi.mk
@@ -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))
diff --git a/package/xavante/xavante.mk b/package/xavante/xavante.mk
index 069092d..c8d4d93 100644
--- a/package/xavante/xavante.mk
+++ b/package/xavante/xavante.mk
@@ -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))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 10/10] manual: adding packages luarocks
2013-11-15 13:07 [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package Francois Perrad
` (7 preceding siblings ...)
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 09/10] lua*: refactor with luarocks infrastructure Francois Perrad
@ 2013-11-15 13:07 ` Francois Perrad
2013-12-22 17:40 ` Thomas Petazzoni
2013-12-22 20:02 ` Yann E. MORIN
2013-12-22 17:22 ` [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package Thomas Petazzoni
2013-12-22 17:37 ` Yann E. MORIN
10 siblings, 2 replies; 33+ messages in thread
From: Francois Perrad @ 2013-11-15 13:07 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
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
diff --git a/docs/manual/adding-packages-luarocks.txt b/docs/manual/adding-packages-luarocks.txt
new file mode 100644
index 0000000..a2e5559
--- /dev/null
+++ b/docs/manual/adding-packages-luarocks.txt
@@ -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 overridden 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 options for the +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.
diff --git a/docs/manual/adding-packages.txt b/docs/manual/adding-packages.txt
index ae76e74..b9ac058 100644
--- a/docs/manual/adding-packages.txt
+++ b/docs/manual/adding-packages.txt
@@ -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
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package
2013-11-15 13:07 [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package Francois Perrad
` (8 preceding siblings ...)
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 10/10] manual: adding packages luarocks Francois Perrad
@ 2013-12-22 17:22 ` Thomas Petazzoni
2013-12-22 20:44 ` Yann E. MORIN
2013-12-22 17:37 ` Yann E. MORIN
10 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-12-22 17:22 UTC (permalink / raw)
To: buildroot
Dear Francois Perrad,
On Fri, 15 Nov 2013 14:07:30 +0100, Francois Perrad wrote:
> luainterpreter is lua or luajit
It would be good to have slightly more verbose commit logs. Something
like:
"""
This commit introduces the 'luainterpreter' package, which serves as a
virtual package depending either on the 'lua' package or the 'luajit'
package depending on which interpreter is selected.
In order to achieve this, it also updates all the existing Lua packages
to depend on luainterpreter... blablabla.
"""
> diff --git a/package/Config.in b/package/Config.in
> index 311cc6c..a8ebb27 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -352,6 +352,7 @@ source "package/haserl/Config.in"
> source "package/jamvm/Config.in"
> source "package/jimtcl/Config.in"
> source "package/lua/Config.in"
> +source "package/luainterpreter/Config.in"
> source "package/luajit/Config.in"
> if BR2_PACKAGE_LUA || BR2_PACKAGE_LUAJIT
Why not replace this condition by:
if BR2_PACKAGE_HAS_LUA_INTERPRETER
so that you can remove the "depends on BR2_PACKAGE_HAS_LUA_INTERPRETER"
in all of the Lua packages.
> menu "Lua libraries/modules"
> diff --git a/package/lbase64/Config.in b/package/lbase64/Config.in
> index bd8503a..ca9dd5d 100644
> --- a/package/lbase64/Config.in
> +++ b/package/lbase64/Config.in
> @@ -1,5 +1,6 @@
> config BR2_PACKAGE_LBASE64
> bool "lbase64"
> + depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
Like this one.
> help
> A base64 library for Lua
>
> diff --git a/package/lbase64/lbase64.mk b/package/lbase64/lbase64.mk
> index 87dda40..ab726ef 100644
> --- a/package/lbase64/lbase64.mk
> +++ b/package/lbase64/lbase64.mk
> @@ -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) \
> diff --git a/package/lua-ev/Config.in b/package/lua-ev/Config.in
> index 1e89c27..2f9c486 100644
> --- a/package/lua-ev/Config.in
> +++ b/package/lua-ev/Config.in
> @@ -1,5 +1,6 @@
> config BR2_PACKAGE_LUA_EV
> bool "lua-ev"
> + depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
This one. And so on.
> diff --git a/package/luainterpreter/luainterpreter.mk b/package/luainterpreter/luainterpreter.mk
> new file mode 100644
> index 0000000..6e2ccfe
> --- /dev/null
> +++ b/package/luainterpreter/luainterpreter.mk
> @@ -0,0 +1,18 @@
> +#############################################################
> +#
> +# Virtual package for luainterpreter
> +#
> +#############################################################
No need for a special comment. Just "luainterpreter" is sufficient.
> +LUAINTERPRETER_VERSION = virtual
> +LUAINTERPRETER_SOURCE =
> +
> +ifeq ($(BR2_PACKAGE_LUA),y)
> +LUAINTERPRETER_DEPENDENCIES = lua
> +endif
> +
> +ifeq ($(BR2_PACKAGE_LUAJIT),y)
> +LUAINTERPRETER_DEPENDENCIES = luajit
> +endif
> +
> +$(eval $(generic-package))
This should probably be converted to use the new virtual package scheme
proposed by Yann. But Yann is telling me on IRC that he has already
done so.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 02/10] luajit: allow to build Lua extensions without lua
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 02/10] luajit: allow to build Lua extensions without lua Francois Perrad
@ 2013-12-22 17:23 ` Thomas Petazzoni
2014-01-07 14:11 ` François Perrad
0 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-12-22 17:23 UTC (permalink / raw)
To: buildroot
Dear Francois Perrad,
On Fri, 15 Nov 2013 14:07:31 +0100, Francois Perrad wrote:
>
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
> package/luajit/luajit-05-install-inc.patch | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
> create mode 100644 package/luajit/luajit-05-install-inc.patch
I don't understand what are the consequence of this patch or why it is
needed. Could you expand the commit log a little bit?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 03/10] lua: remove a too invasive patch
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 03/10] lua: remove a too invasive patch Francois Perrad
@ 2013-12-22 17:24 ` Thomas Petazzoni
2013-12-22 17:30 ` Yann E. MORIN
0 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-12-22 17:24 UTC (permalink / raw)
To: buildroot
Dear Francois Perrad,
On Fri, 15 Nov 2013 14:07:32 +0100, Francois Perrad wrote:
> the static version of luac is enough
>
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
> 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
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Peter, can you apply this patch right now? It is independent from the
rest of the series, and would allow to reduce the size of the series.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 04/10] lua*: restore version in module paths
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 04/10] lua*: restore version in module paths Francois Perrad
@ 2013-12-22 17:26 ` Thomas Petazzoni
0 siblings, 0 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2013-12-22 17:26 UTC (permalink / raw)
To: buildroot
Dear Francois Perrad,
On Fri, 15 Nov 2013 14:07:33 +0100, Francois Perrad wrote:
> (like in upstream)
>
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
> 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
Is this patch really necessary, since in the next patches you remove
all of this code when converting the Lua packages to the Lua package
infrastructure?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 05/10] luarocks: new package
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 05/10] luarocks: new package Francois Perrad
@ 2013-12-22 17:28 ` Thomas Petazzoni
2013-12-22 20:45 ` Yann E. MORIN
2013-12-23 7:56 ` François Perrad
0 siblings, 2 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2013-12-22 17:28 UTC (permalink / raw)
To: buildroot
Dear Francois Perrad,
On Fri, 15 Nov 2013 14:07:34 +0100, Francois Perrad wrote:
>
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
> package/luarocks/luarocks-build-minimal.patch | 17 ++++++++++
> package/luarocks/luarocks-unpack.patch | 24 ++++++++++++++
We want patches to be numbered:
luarocks-001-<foo>.patch
luarocks-002-<bar>.patch
This guarantees that they are applied in the right order.
> 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
>
> diff --git a/package/luarocks/luarocks-build-minimal.patch b/package/luarocks/luarocks-build-minimal.patch
> new file mode 100644
> index 0000000..3a4794e
> --- /dev/null
> +++ b/package/luarocks/luarocks-build-minimal.patch
> @@ -0,0 +1,17 @@
> +hack for buildroot which needs independant steps : download, unpack, build
> +
> +Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> +
> +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
> diff --git a/package/luarocks/luarocks-unpack.patch b/package/luarocks/luarocks-unpack.patch
> new file mode 100644
> index 0000000..0f036ee
> --- /dev/null
> +++ b/package/luarocks/luarocks-unpack.patch
> @@ -0,0 +1,24 @@
> +allows unpack in existing directory
> +
> +Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> +
> +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
> +
Any chance these patches make it their way upstream?
> diff --git a/package/luarocks/luarocks.mk b/package/luarocks/luarocks.mk
> new file mode 100644
> index 0000000..d996ccc
> --- /dev/null
> +++ b/package/luarocks/luarocks.mk
> @@ -0,0 +1,42 @@
> +################################################################################
> +#
> +# luarocks
> +#
> +################################################################################
> +
> +LUAROCKS_VERSION = 2.1.1
> +LUAROCKS_SITE = http://luarocks.org/releases/
> +LUAROCKS_LICENSE = MIT
> +LUAROCKS_LICENSE_FILES = COPYING
> +
> +HOST_LUAROCKS_DEPENDENCIES = host-lua luainterpreter
> +
> +LUAROCKS_CONFIG_DIR = $(HOST_DIR)/usr/etc/luarocks
> +LUAROCKS_CONFIG_FILE = $(LUAROCKS_CONFIG_DIR)/config-5.1.lua
> +
> +define HOST_LUAROCKS_CONFIGURE_CMDS
> + cd $(@D) && ./configure \
> + --prefix=$(TARGET_DIR)/usr \
> + --sysconfdir=$(LUAROCKS_CONFIG_DIR) \
> + --with-lua=$(HOST_DIR)/usr \
> + --with-lua-include=$(STAGING_DIR)/usr/include \
> + --with-lua-lib=$(STAGING_DIR)/usr/lib
> + @echo "$(@D)/config.unix generated"
This echo is probably not needed.
> +endef
> +
> +define HOST_LUAROCKS_INSTALL_CMDS
> + $(MAKE1) -C $(@D) install \
> + PREFIX=$(HOST_DIR)/usr
> + echo "-- BR cross-compilation" >> $(LUAROCKS_CONFIG_FILE)
> + echo "variables = {" >> $(LUAROCKS_CONFIG_FILE)
> + echo " CC = [[$(TARGET_CC)]]," >> $(LUAROCKS_CONFIG_FILE)
> + echo " LD = [[$(TARGET_CC)]]," >> $(LUAROCKS_CONFIG_FILE)
> + echo " CFLAGS = [[$(TARGET_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)
> + echo "gcc_rpath = false" >> $(LUAROCKS_CONFIG_FILE)
> +endef
> +
> +$(eval $(host-generic-package))
> +
Other than that, it looks ok to me.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 03/10] lua: remove a too invasive patch
2013-12-22 17:24 ` Thomas Petazzoni
@ 2013-12-22 17:30 ` Yann E. MORIN
0 siblings, 0 replies; 33+ messages in thread
From: Yann E. MORIN @ 2013-12-22 17:30 UTC (permalink / raw)
To: buildroot
Francois, All,
On 2013-12-22 18:24 +0100, Thomas Petazzoni spake thusly:
> On Fri, 15 Nov 2013 14:07:32 +0100, Francois Perrad wrote:
> > the static version of luac is enough
> >
> > Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> > ---
> > 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
>
> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Peter, can you apply this patch right now? It is independent from the
> rest of the series, and would allow to reduce the size of the series.
Yes, please! ;-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 06/10] luarocks: new infrastructure
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 06/10] luarocks: new infrastructure Francois Perrad
@ 2013-12-22 17:31 ` Thomas Petazzoni
2013-12-22 20:47 ` Yann E. MORIN
2013-12-23 8:20 ` François Perrad
0 siblings, 2 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2013-12-22 17:31 UTC (permalink / raw)
To: buildroot
Dear Francois Perrad,
On Fri, 15 Nov 2013 14:07:35 +0100, Francois Perrad wrote:
>
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
> 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
>
> diff --git a/Config.in b/Config.in
> index d87e0f0..cb41c36 100644
> --- a/Config.in
> +++ b/Config.in
> @@ -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
> diff --git a/Makefile b/Makefile
> index c7a0a6d..0dde760 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -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' | \
> diff --git a/package/Makefile.in b/package/Makefile.in
> index 612f3c7..f7fd8f9 100644
> --- a/package/Makefile.in
> +++ b/package/Makefile.in
> @@ -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
> diff --git a/package/pkg-luarocks.mk b/package/pkg-luarocks.mk
> new file mode 100644
> index 0000000..2a20413
> --- /dev/null
> +++ b/package/pkg-luarocks.mk
> @@ -0,0 +1,71 @@
> +################################################################################
> +# LuaRocks package infrastructure
> +# see http://luarocks.org/
> +#
> +# This file implements an infrastructure that eases development of
> +# package .mk files for LuaRocks packages.
> +# LuaRocks supports various build.type : builtin, make, cmake.
> +# This luarocks infrastructure supports only the builtin mode,
> +# the make & cmake modes could be directly handled by generic & cmake infrastructure.
> +#
> +# See the Buildroot documentation for details on the usage of this
> +# infrastructure
> +#
> +# In terms of implementation, this LuaRocks infrastructure requires
> +# the .mk file to only specify metadata informations about the
> +# package: name, version, etc.
> +#
> +################################################################################
> +
> +LUAROCKS_RUN = $(HOST_DIR)/usr/bin/luarocks
This variable could probably be provided by
package/luarocks/luarocks.mk.
> +
> +################################################################################
> +# inner-luarocks-package -- defines how the configuration, compilation and
> +# installation of a LuaRocks package should be done, implements a few hooks to
> +# tune the build process and calls the generic package infrastructure to
> +# generate the necessary make targets
> +#
> +# argument 1 is the lowercase package name
> +# argument 2 is the uppercase package name, including an HOST_ prefix
> +# for host packages
> +# argument 3 is the uppercase package name, without the HOST_ prefix
> +# for host packages
> +# argument 4 is the package directory prefix
> +# argument 5 is the type (target or host)
> +################################################################################
> +
> +define inner-luarocks-package
> +
> +$(2)_BUILD_OPT ?=
> +$(2)_SUBDIR ?= $(1)-$(shell echo "$($(3)_VERSION)" | sed -e "s/-[0-9]$$//")
Can we avoid this subdir for all packages?
> +$(2)_ROCKSPEC ?= $(1)-$($(3)_VERSION).rockspec
> +$(2)_SOURCE ?= $(1)-$($(3)_VERSION).src.rock
> +$(2)_SITE ?= $(call qstrip,$(BR2_LUAROCKS_MIRROR))
> +
> +#
> +# Extract step
> +#
> +$(2)_EXTRACT_CMDS ?= \
> + cd $$($(2)_DIR)/.. && $(LUAROCKS_RUN) unpack $(DL_DIR)/$$($(2)_SOURCE)
> +
> +# $(2)_DEPENDENCIES are handled for configure step (too late)
> +$(1)-extract: host-luarocks
Ok, I see the problem. However I believe I'd still like to see
host-luarocks added to $(2)_DEPENDENCIES so that the dependency graph
is correct, and "make source" / "make external-deps" properly show
luarocks.
> +#
> +# Build/install step.
> +#
> +$(2)_INSTALL_TARGET_CMDS ?= \
> + cd $$($(2)_SRCDIR) && $(LUAROCKS_RUN) build --minimal $$($(2)_ROCKSPEC) $$($(2)_BUILD_OPT)
Maybe the extract and install target steps could be written using a
define ... endef block instead, for better readability?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 07/10] lua-cjson: restore official name
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 07/10] lua-cjson: restore official name Francois Perrad
@ 2013-12-22 17:32 ` Thomas Petazzoni
0 siblings, 0 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2013-12-22 17:32 UTC (permalink / raw)
To: buildroot
Dear Francois Perrad,
On Fri, 15 Nov 2013 14:07:36 +0100, Francois Perrad wrote:
> (need by LuaRocks)
>
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
> Config.in.legacy | 10 ++++++++++
> package/Config.in | 2 +-
> package/{luacjson => lua-cjson}/Config.in | 4 ++--
> .../luacjson.mk => lua-cjson/lua-cjson.mk} | 21 ++++++++++----------
> 4 files changed, 23 insertions(+), 14 deletions(-)
> rename package/{luacjson => lua-cjson}/Config.in (90%)
> rename package/{luacjson/luacjson.mk => lua-cjson/lua-cjson.mk} (56%)
This looks good to me.
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 09/10] lua*: refactor with luarocks infrastructure
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 09/10] lua*: refactor with luarocks infrastructure Francois Perrad
@ 2013-12-22 17:34 ` Thomas Petazzoni
0 siblings, 0 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2013-12-22 17:34 UTC (permalink / raw)
To: buildroot
Dear Francois Perrad,
On Fri, 15 Nov 2013 14:07:38 +0100, Francois Perrad wrote:
>
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
> 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
This generally looks good, but I have one question (related to a
question I've asked earlier on the luarocks infrastructure itself).
> LBASE64_LICENSE = Public domain
> -LBASE64_LICENSE_FILES = README
> -LBASE64_DEPENDENCIES = luainterpreter
> +LBASE64_LICENSE_FILES = $(LBASE64_SUBDIR)/README
Can we avoid this subdirectory in all packages, to make things easier?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package
2013-11-15 13:07 [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package Francois Perrad
` (9 preceding siblings ...)
2013-12-22 17:22 ` [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package Thomas Petazzoni
@ 2013-12-22 17:37 ` Yann E. MORIN
2013-12-22 20:56 ` Yann E. MORIN
10 siblings, 1 reply; 33+ messages in thread
From: Yann E. MORIN @ 2013-12-22 17:37 UTC (permalink / raw)
To: buildroot
Francois, All,
On 2013-11-15 14:07 +0100, Francois Perrad spake thusly:
> luainterpreter is lua or luajit
As you may have guessed from Thomas replies, I've been working with that
lua series of yours, and rebased it on-top of current master.
I also converted it to the new 'pacakge-defined providers' scheme for
virtual package, that we are switching to.
To avoid duplicated work, I'll apply all of Thomas suggestions I can
deal with, and will push the update series for you to take back and
reply to Thomas comments I did not address.
I'll get you posted when that's been done.
Note: I'm not really interested in lua, but I find it interesting we
have this infra applied. So, don't expect me to be too much active in
this series, besides this bump. ;-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 10/10] manual: adding packages luarocks
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 10/10] manual: adding packages luarocks Francois Perrad
@ 2013-12-22 17:40 ` Thomas Petazzoni
2013-12-22 20:51 ` Yann E. MORIN
2013-12-22 20:02 ` Yann E. MORIN
1 sibling, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-12-22 17:40 UTC (permalink / raw)
To: buildroot
Dear Francois Perrad,
On Fri, 15 Nov 2013 14:07:39 +0100, Francois Perrad wrote:
> +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
Maybe add LUAFOO_LICENSE and LUAFOO_LICENSE_FILES here.
> +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).
Maybe indicate that the upstream version and the rockspec version are
separated by a '-' sign ?
> +On line 8, we declare our dependencies, so that they are built
> +before the build process of our package starts.
Maybe mention that dependencies are only needed for packages that link
against native libraries?
> +On line 10-11, we tell Buildroot to pass custom options to LuaRocks when it is
> +building the package.
Ditto here?
> +
> +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.
LuaRocks is a deployment and management system for Lua modules, and
supports various +build.type+: +builtin+, +make+ and +cmake+. In the
contetx of Buildroot, the +luarocks-package+ infrastructure only
supports the +builtin+ mode. LuaRocks packages that use the +make+ or
+cmake+ build mechanisms should instead be packaged using the
+generic-package+ and +cmake-package+ infrastructures in Buildroot,
respectively.
> +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.
The main macro of the LuaRocks package infrastructure is
+luarocks-package+: like +generic-package+ it works by defining a
number of variables providing meta informations about the package, and
then calling +luarocks-package+. It is worth mentioning that building
LuaRocks packages for the host is not supported, so the macro
+host-luarocks-package+ is not implemented.
> +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+.
LUAFOO_LICENSE, LUAFOO_LICENSE_FILES
> +Two of them are populate by the LuaRocks infrastructure (for the
populated
> ++download+ step) :
> +
> +* +LUAFOO_SITE+ with the +BR2_LUAROCKS_MIRROR+ value
> +
> +* +LUAFOO_SOURCE+ with +foo-$(FOO_VERSION).src.rock+
If they are populated by the LuaRocks infrastructure, then there is no
point to mention them here.
> +A few additional variables, specific to the LuaRocks infrastructure, are
> +also defined. They could be overridden in specific cases.
> +
> +* +LUAFOO_ROCKSPEC+ with +foo-$(FOO_VERSION).rockspec+
What does "with" means? I guess it means it is the default value, but
it should be explained.
> +
> +* +LUAFOO_SUBDIR+ with +foo-$(FOO_VERSION_WITHOUT_ROCKSPEC_REVISION)+
Ditto.
> +
> +* +LUAFOO_BUILD_OPT+ contains the build options for the +luarocks build+ call.
> + The default is empty.
What is it useful for.
> +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.
These last two paragraphs are not needed I believe: they give internal
details of how the infrastructure works, which are transparent to the
user of the infrastructure.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 10/10] manual: adding packages luarocks
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 10/10] manual: adding packages luarocks Francois Perrad
2013-12-22 17:40 ` Thomas Petazzoni
@ 2013-12-22 20:02 ` Yann E. MORIN
2013-12-22 20:52 ` Yann E. MORIN
1 sibling, 1 reply; 33+ messages in thread
From: Yann E. MORIN @ 2013-12-22 20:02 UTC (permalink / raw)
To: buildroot
Francois, All,
On 2013-11-15 14:07 +0100, Francois Perrad spake thusly:
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
> 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
>
> diff --git a/docs/manual/adding-packages-luarocks.txt b/docs/manual/adding-packages-luarocks.txt
> new file mode 100644
> index 0000000..a2e5559
> --- /dev/null
> +++ b/docs/manual/adding-packages-luarocks.txt
> @@ -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
I wonder if we should not split this in two:
- LUAFOO_VERSION: the version of the package itself, as released by
upstream
- LUAFOO_ROCKS_VERSION: the version of the LuaRocks packaging
Then, the ifnrastrucutre would just concatenate the two version strings.
In my opinion, I think this is better to separate them: it makes it
explixit what the package version is, and what the packaging version is.
> +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
I wonder if those two are good example of _BUILD_OPT, since they are
(probably) already handled by the LuaRocks infrastrucutre.
And since no converted Lua package so far needed any of the above, and
the build was successfull on my machine (not run-time tested, though), I
guess they are not needed.
Maybe a very generic exampel should be used, such as:
LUAFOO_BUILD_OPT += --enable-option
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package
2013-12-22 17:22 ` [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package Thomas Petazzoni
@ 2013-12-22 20:44 ` Yann E. MORIN
0 siblings, 0 replies; 33+ messages in thread
From: Yann E. MORIN @ 2013-12-22 20:44 UTC (permalink / raw)
To: buildroot
Francois, All,
On 2013-12-22 18:22 +0100, Thomas Petazzoni spake thusly:
> On Fri, 15 Nov 2013 14:07:30 +0100, Francois Perrad wrote:
> > luainterpreter is lua or luajit
>
> It would be good to have slightly more verbose commit logs. Something
> like:
>
> """
> This commit introduces the 'luainterpreter' package, which serves as a
> virtual package depending either on the 'lua' package or the 'luajit'
> package depending on which interpreter is selected.
>
> In order to achieve this, it also updates all the existing Lua packages
> to depend on luainterpreter... blablabla.
> """
I've tried to be a bit more verbose in the commit log.
To be reviewed.
> > diff --git a/package/Config.in b/package/Config.in
> > index 311cc6c..a8ebb27 100644
> > --- a/package/Config.in
> > +++ b/package/Config.in
> > @@ -352,6 +352,7 @@ source "package/haserl/Config.in"
> > source "package/jamvm/Config.in"
> > source "package/jimtcl/Config.in"
> > source "package/lua/Config.in"
> > +source "package/luainterpreter/Config.in"
> > source "package/luajit/Config.in"
> > if BR2_PACKAGE_LUA || BR2_PACKAGE_LUAJIT
>
> Why not replace this condition by:
>
> if BR2_PACKAGE_HAS_LUA_INTERPRETER
Done.
> so that you can remove the "depends on BR2_PACKAGE_HAS_LUA_INTERPRETER"
> in all of the Lua packages.
Doh, I forgot that one... :-(
> > diff --git a/package/luainterpreter/luainterpreter.mk b/package/luainterpreter/luainterpreter.mk
> > new file mode 100644
> > index 0000000..6e2ccfe
> > --- /dev/null
> > +++ b/package/luainterpreter/luainterpreter.mk
> > @@ -0,0 +1,18 @@
> > +#############################################################
> > +#
> > +# Virtual package for luainterpreter
> > +#
> > +#############################################################
>
> No need for a special comment. Just "luainterpreter" is sufficient.
Done.
> > +LUAINTERPRETER_VERSION = virtual
> > +LUAINTERPRETER_SOURCE =
> > +
> > +ifeq ($(BR2_PACKAGE_LUA),y)
> > +LUAINTERPRETER_DEPENDENCIES = lua
> > +endif
> > +
> > +ifeq ($(BR2_PACKAGE_LUAJIT),y)
> > +LUAINTERPRETER_DEPENDENCIES = luajit
> > +endif
> > +
> > +$(eval $(generic-package))
>
> This should probably be converted to use the new virtual package scheme
> proposed by Yann. But Yann is telling me on IRC that he has already
> done so.
Yep, done.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 05/10] luarocks: new package
2013-12-22 17:28 ` Thomas Petazzoni
@ 2013-12-22 20:45 ` Yann E. MORIN
2013-12-23 7:56 ` François Perrad
1 sibling, 0 replies; 33+ messages in thread
From: Yann E. MORIN @ 2013-12-22 20:45 UTC (permalink / raw)
To: buildroot
Francois, All,
On 2013-12-22 18:28 +0100, Thomas Petazzoni spake thusly:
> On Fri, 15 Nov 2013 14:07:34 +0100, Francois Perrad wrote:
> >
> > Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> > ---
> > package/luarocks/luarocks-build-minimal.patch | 17 ++++++++++
> > package/luarocks/luarocks-unpack.patch | 24 ++++++++++++++
>
> We want patches to be numbered:
>
> luarocks-001-<foo>.patch
> luarocks-002-<bar>.patch
Done.
[--SNIP--]
> > diff --git a/package/luarocks/luarocks.mk b/package/luarocks/luarocks.mk
> > new file mode 100644
> > index 0000000..d996ccc
> > --- /dev/null
> > +++ b/package/luarocks/luarocks.mk
> > @@ -0,0 +1,42 @@
> > +################################################################################
> > +#
> > +# luarocks
> > +#
> > +################################################################################
> > +
> > +LUAROCKS_VERSION = 2.1.1
> > +LUAROCKS_SITE = http://luarocks.org/releases/
> > +LUAROCKS_LICENSE = MIT
> > +LUAROCKS_LICENSE_FILES = COPYING
> > +
> > +HOST_LUAROCKS_DEPENDENCIES = host-lua luainterpreter
> > +
> > +LUAROCKS_CONFIG_DIR = $(HOST_DIR)/usr/etc/luarocks
> > +LUAROCKS_CONFIG_FILE = $(LUAROCKS_CONFIG_DIR)/config-5.1.lua
> > +
> > +define HOST_LUAROCKS_CONFIGURE_CMDS
> > + cd $(@D) && ./configure \
> > + --prefix=$(TARGET_DIR)/usr \
> > + --sysconfdir=$(LUAROCKS_CONFIG_DIR) \
> > + --with-lua=$(HOST_DIR)/usr \
> > + --with-lua-include=$(STAGING_DIR)/usr/include \
> > + --with-lua-lib=$(STAGING_DIR)/usr/lib
> > + @echo "$(@D)/config.unix generated"
>
> This echo is probably not needed.
Done.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 06/10] luarocks: new infrastructure
2013-12-22 17:31 ` Thomas Petazzoni
@ 2013-12-22 20:47 ` Yann E. MORIN
2013-12-23 8:20 ` François Perrad
1 sibling, 0 replies; 33+ messages in thread
From: Yann E. MORIN @ 2013-12-22 20:47 UTC (permalink / raw)
To: buildroot
Francois, All,
On 2013-12-22 18:31 +0100, Thomas Petazzoni spake thusly:
> On Fri, 15 Nov 2013 14:07:35 +0100, Francois Perrad wrote:
[--SNIP--]
> > diff --git a/package/pkg-luarocks.mk b/package/pkg-luarocks.mk
> > new file mode 100644
> > index 0000000..2a20413
> > --- /dev/null
> > +++ b/package/pkg-luarocks.mk
> > @@ -0,0 +1,71 @@
> > +################################################################################
> > +# LuaRocks package infrastructure
> > +# see http://luarocks.org/
> > +#
> > +# This file implements an infrastructure that eases development of
> > +# package .mk files for LuaRocks packages.
> > +# LuaRocks supports various build.type : builtin, make, cmake.
> > +# This luarocks infrastructure supports only the builtin mode,
> > +# the make & cmake modes could be directly handled by generic & cmake infrastructure.
> > +#
> > +# See the Buildroot documentation for details on the usage of this
> > +# infrastructure
> > +#
> > +# In terms of implementation, this LuaRocks infrastructure requires
> > +# the .mk file to only specify metadata informations about the
> > +# package: name, version, etc.
> > +#
> > +################################################################################
> > +
> > +LUAROCKS_RUN = $(HOST_DIR)/usr/bin/luarocks
>
> This variable could probably be provided by
> package/luarocks/luarocks.mk.
Done.
[--SNIP--]
> > +$(2)_ROCKSPEC ?= $(1)-$($(3)_VERSION).rockspec
> > +$(2)_SOURCE ?= $(1)-$($(3)_VERSION).src.rock
> > +$(2)_SITE ?= $(call qstrip,$(BR2_LUAROCKS_MIRROR))
> > +
> > +#
> > +# Extract step
> > +#
> > +$(2)_EXTRACT_CMDS ?= \
> > + cd $$($(2)_DIR)/.. && $(LUAROCKS_RUN) unpack $(DL_DIR)/$$($(2)_SOURCE)
> > +
> > +# $(2)_DEPENDENCIES are handled for configure step (too late)
> > +$(1)-extract: host-luarocks
>
> Ok, I see the problem. However I believe I'd still like to see
> host-luarocks added to $(2)_DEPENDENCIES so that the dependency graph
> is correct, and "make source" / "make external-deps" properly show
> luarocks.
Done.
I've also rephrased the comment, and moved things around to be a bit
more logical (in my eyes, at least).
> > +#
> > +# Build/install step.
> > +#
> > +$(2)_INSTALL_TARGET_CMDS ?= \
> > + cd $$($(2)_SRCDIR) && $(LUAROCKS_RUN) build --minimal $$($(2)_ROCKSPEC) $$($(2)_BUILD_OPT)
>
> Maybe the extract and install target steps could be written using a
> define ... endef block instead, for better readability?
Done.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 10/10] manual: adding packages luarocks
2013-12-22 17:40 ` Thomas Petazzoni
@ 2013-12-22 20:51 ` Yann E. MORIN
0 siblings, 0 replies; 33+ messages in thread
From: Yann E. MORIN @ 2013-12-22 20:51 UTC (permalink / raw)
To: buildroot
Francois, All,
On 2013-12-22 18:40 +0100, Thomas Petazzoni spake thusly:
> On Fri, 15 Nov 2013 14:07:39 +0100, Francois Perrad wrote:
>
> > +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
>
> Maybe add LUAFOO_LICENSE and LUAFOO_LICENSE_FILES here.
Done.
> > +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).
>
> Maybe indicate that the upstream version and the rockspec version are
> separated by a '-' sign ?
Done.
Plus my previous comment still stands: provide two versions, one for the
upstream version of the package, one for the LuaRocks packaging.
> > +On line 8, we declare our dependencies, so that they are built
> > +before the build process of our package starts.
>
> Maybe mention that dependencies are only needed for packages that link
> against native libraries?
Done.
> > +On line 10-11, we tell Buildroot to pass custom options to LuaRocks when it is
> > +building the package.
>
> Ditto here?
Ditto.
> > +
> > +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.
>
> LuaRocks is a deployment and management system for Lua modules, and
> supports various +build.type+: +builtin+, +make+ and +cmake+. In the
> contetx of Buildroot, the +luarocks-package+ infrastructure only
> supports the +builtin+ mode. LuaRocks packages that use the +make+ or
> +cmake+ build mechanisms should instead be packaged using the
> +generic-package+ and +cmake-package+ infrastructures in Buildroot,
> respectively.
Done.
> > +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.
>
> The main macro of the LuaRocks package infrastructure is
> +luarocks-package+: like +generic-package+ it works by defining a
> number of variables providing meta informations about the package, and
> then calling +luarocks-package+. It is worth mentioning that building
> LuaRocks packages for the host is not supported, so the macro
> +host-luarocks-package+ is not implemented.
Done.
> > +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+.
>
> LUAFOO_LICENSE, LUAFOO_LICENSE_FILES
Done.
> > +Two of them are populate by the LuaRocks infrastructure (for the
>
> populated
Done.
> > ++download+ step) :
> > +
> > +* +LUAFOO_SITE+ with the +BR2_LUAROCKS_MIRROR+ value
> > +
> > +* +LUAFOO_SOURCE+ with +foo-$(FOO_VERSION).src.rock+
>
> If they are populated by the LuaRocks infrastructure, then there is no
> point to mention them here.
I've added some wording: in case they do not come from the LuaRocks
official mirror, or the BR2_LUAROCKS_MIRROR.
> > +A few additional variables, specific to the LuaRocks infrastructure, are
> > +also defined. They could be overridden in specific cases.
> > +
> > +* +LUAFOO_ROCKSPEC+ with +foo-$(FOO_VERSION).rockspec+
>
> What does "with" means? I guess it means it is the default value, but
> it should be explained.
Fixed.
> > +
> > +* +LUAFOO_SUBDIR+ with +foo-$(FOO_VERSION_WITHOUT_ROCKSPEC_REVISION)+
>
> Ditto.
Ditto.
> > +
> > +* +LUAFOO_BUILD_OPT+ contains the build options for the +luarocks build+ call.
> > + The default is empty.
>
> What is it useful for.
The same as for the Python infra's _BUILD_OPT, I guess? ;-)
> > +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.
>
> These last two paragraphs are not needed I believe: they give internal
> details of how the infrastructure works, which are transparent to the
> user of the infrastructure.
Done.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 10/10] manual: adding packages luarocks
2013-12-22 20:02 ` Yann E. MORIN
@ 2013-12-22 20:52 ` Yann E. MORIN
0 siblings, 0 replies; 33+ messages in thread
From: Yann E. MORIN @ 2013-12-22 20:52 UTC (permalink / raw)
To: buildroot
Francois, All,
On 2013-12-22 21:02 +0100, Yann E. MORIN spake thusly:
> On 2013-11-15 14:07 +0100, Francois Perrad spake thusly:
> > Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> > ---
> > 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
> >
> > diff --git a/docs/manual/adding-packages-luarocks.txt b/docs/manual/adding-packages-luarocks.txt
> > new file mode 100644
> > index 0000000..a2e5559
> > --- /dev/null
> > +++ b/docs/manual/adding-packages-luarocks.txt
> > @@ -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
>
> I wonder if we should not split this in two:
> - LUAFOO_VERSION: the version of the package itself, as released by
> upstream
> - LUAFOO_ROCKS_VERSION: the version of the LuaRocks packaging
>
> Then, the ifnrastrucutre would just concatenate the two version strings.
> In my opinion, I think this is better to separate them: it makes it
> explixit what the package version is, and what the packaging version is.
Since I just forgot to do it, I'll let you implement it on your side if
you agree with that. ;-)
> > +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
>
> I wonder if those two are good example of _BUILD_OPT, since they are
> (probably) already handled by the LuaRocks infrastrucutre.
>
> And since no converted Lua package so far needed any of the above, and
> the build was successfull on my machine (not run-time tested, though), I
> guess they are not needed.
>
> Maybe a very generic exampel should be used, such as:
> LUAFOO_BUILD_OPT += --enable-option
Francois, care to provide a proper example of a _BUILD_OPT ?
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package
2013-12-22 17:37 ` Yann E. MORIN
@ 2013-12-22 20:56 ` Yann E. MORIN
0 siblings, 0 replies; 33+ messages in thread
From: Yann E. MORIN @ 2013-12-22 20:56 UTC (permalink / raw)
To: buildroot
Francois, All,
On 2013-12-22 18:37 +0100, Yann E. MORIN spake thusly:
> On 2013-11-15 14:07 +0100, Francois Perrad spake thusly:
> > luainterpreter is lua or luajit
>
> As you may have guessed from Thomas replies, I've been working with that
> lua series of yours, and rebased it on-top of current master.
>
> I also converted it to the new 'pacakge-defined providers' scheme for
> virtual package, that we are switching to.
>
> To avoid duplicated work, I'll apply all of Thomas suggestions I can
> deal with, and will push the update series for you to take back and
> reply to Thomas comments I did not address.
>
> I'll get you posted when that's been done.
So, I've pushed my branch to:
git://gitorious.org/buildroot/buildroot.git yem/lua-infra
which you can pull from, or alternatively, apply the patches that have
been sent to the list.
I replied on Thomas' suggestions to indicate what I've done, so you can
see what is missing. Basically, I did not address Thomas' comments that
deals with the actual LuaRocks infrastructure (such as a the _SUB_DIR
stuff), since I don;t really know what to do about those, and you are
probably more knowledgeable than I in this matter. ;-)
Thank you for your initial work, and I hope we can see this updated and
merged soon! :-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 05/10] luarocks: new package
2013-12-22 17:28 ` Thomas Petazzoni
2013-12-22 20:45 ` Yann E. MORIN
@ 2013-12-23 7:56 ` François Perrad
2013-12-23 8:21 ` Thomas Petazzoni
1 sibling, 1 reply; 33+ messages in thread
From: François Perrad @ 2013-12-23 7:56 UTC (permalink / raw)
To: buildroot
2013/12/22 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Francois Perrad,
>
> On Fri, 15 Nov 2013 14:07:34 +0100, Francois Perrad wrote:
>>
>> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>> ---
>> package/luarocks/luarocks-build-minimal.patch | 17 ++++++++++
>> package/luarocks/luarocks-unpack.patch | 24 ++++++++++++++
>
> We want patches to be numbered:
>
> luarocks-001-<foo>.patch
> luarocks-002-<bar>.patch
>
> This guarantees that they are applied in the right order.
>
>> 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
>>
>> diff --git a/package/luarocks/luarocks-build-minimal.patch b/package/luarocks/luarocks-build-minimal.patch
>> new file mode 100644
>> index 0000000..3a4794e
>> --- /dev/null
>> +++ b/package/luarocks/luarocks-build-minimal.patch
>> @@ -0,0 +1,17 @@
>> +hack for buildroot which needs independant steps : download, unpack, build
>> +
>> +Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>> +
>> +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
>> diff --git a/package/luarocks/luarocks-unpack.patch b/package/luarocks/luarocks-unpack.patch
>> new file mode 100644
>> index 0000000..0f036ee
>> --- /dev/null
>> +++ b/package/luarocks/luarocks-unpack.patch
>> @@ -0,0 +1,24 @@
>> +allows unpack in existing directory
>> +
>> +Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>> +
>> +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
>> +
>
> Any chance these patches make it their way upstream?
>
With the next release of LuaRocks, these patches will be removed.
See https://github.com/keplerproject/luarocks/commit/a1f62e69ee7fdb1dfd6dc36aad48e1306a70bb14
and the whole discussion
http://sourceforge.net/mailarchive/message.php?msg_id=31645659
Fran?ois
>> diff --git a/package/luarocks/luarocks.mk b/package/luarocks/luarocks.mk
>> new file mode 100644
>> index 0000000..d996ccc
>> --- /dev/null
>> +++ b/package/luarocks/luarocks.mk
>> @@ -0,0 +1,42 @@
>> +################################################################################
>> +#
>> +# luarocks
>> +#
>> +################################################################################
>> +
>> +LUAROCKS_VERSION = 2.1.1
>> +LUAROCKS_SITE = http://luarocks.org/releases/
>> +LUAROCKS_LICENSE = MIT
>> +LUAROCKS_LICENSE_FILES = COPYING
>> +
>> +HOST_LUAROCKS_DEPENDENCIES = host-lua luainterpreter
>> +
>> +LUAROCKS_CONFIG_DIR = $(HOST_DIR)/usr/etc/luarocks
>> +LUAROCKS_CONFIG_FILE = $(LUAROCKS_CONFIG_DIR)/config-5.1.lua
>> +
>> +define HOST_LUAROCKS_CONFIGURE_CMDS
>> + cd $(@D) && ./configure \
>> + --prefix=$(TARGET_DIR)/usr \
>> + --sysconfdir=$(LUAROCKS_CONFIG_DIR) \
>> + --with-lua=$(HOST_DIR)/usr \
>> + --with-lua-include=$(STAGING_DIR)/usr/include \
>> + --with-lua-lib=$(STAGING_DIR)/usr/lib
>> + @echo "$(@D)/config.unix generated"
>
> This echo is probably not needed.
>
>> +endef
>> +
>> +define HOST_LUAROCKS_INSTALL_CMDS
>> + $(MAKE1) -C $(@D) install \
>> + PREFIX=$(HOST_DIR)/usr
>> + echo "-- BR cross-compilation" >> $(LUAROCKS_CONFIG_FILE)
>> + echo "variables = {" >> $(LUAROCKS_CONFIG_FILE)
>> + echo " CC = [[$(TARGET_CC)]]," >> $(LUAROCKS_CONFIG_FILE)
>> + echo " LD = [[$(TARGET_CC)]]," >> $(LUAROCKS_CONFIG_FILE)
>> + echo " CFLAGS = [[$(TARGET_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)
>> + echo "gcc_rpath = false" >> $(LUAROCKS_CONFIG_FILE)
>> +endef
>> +
>> +$(eval $(host-generic-package))
>> +
>
> Other than that, it looks ok to me.
>
> 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
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 06/10] luarocks: new infrastructure
2013-12-22 17:31 ` Thomas Petazzoni
2013-12-22 20:47 ` Yann E. MORIN
@ 2013-12-23 8:20 ` François Perrad
1 sibling, 0 replies; 33+ messages in thread
From: François Perrad @ 2013-12-23 8:20 UTC (permalink / raw)
To: buildroot
2013/12/22 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Francois Perrad,
>
> On Fri, 15 Nov 2013 14:07:35 +0100, Francois Perrad wrote:
>>
>> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>> ---
>> 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
>>
>> diff --git a/Config.in b/Config.in
>> index d87e0f0..cb41c36 100644
>> --- a/Config.in
>> +++ b/Config.in
>> @@ -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
>> diff --git a/Makefile b/Makefile
>> index c7a0a6d..0dde760 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -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' | \
>> diff --git a/package/Makefile.in b/package/Makefile.in
>> index 612f3c7..f7fd8f9 100644
>> --- a/package/Makefile.in
>> +++ b/package/Makefile.in
>> @@ -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
>> diff --git a/package/pkg-luarocks.mk b/package/pkg-luarocks.mk
>> new file mode 100644
>> index 0000000..2a20413
>> --- /dev/null
>> +++ b/package/pkg-luarocks.mk
>> @@ -0,0 +1,71 @@
>> +################################################################################
>> +# LuaRocks package infrastructure
>> +# see http://luarocks.org/
>> +#
>> +# This file implements an infrastructure that eases development of
>> +# package .mk files for LuaRocks packages.
>> +# LuaRocks supports various build.type : builtin, make, cmake.
>> +# This luarocks infrastructure supports only the builtin mode,
>> +# the make & cmake modes could be directly handled by generic & cmake infrastructure.
>> +#
>> +# See the Buildroot documentation for details on the usage of this
>> +# infrastructure
>> +#
>> +# In terms of implementation, this LuaRocks infrastructure requires
>> +# the .mk file to only specify metadata informations about the
>> +# package: name, version, etc.
>> +#
>> +################################################################################
>> +
>> +LUAROCKS_RUN = $(HOST_DIR)/usr/bin/luarocks
>
> This variable could probably be provided by
> package/luarocks/luarocks.mk.
>
>> +
>> +################################################################################
>> +# inner-luarocks-package -- defines how the configuration, compilation and
>> +# installation of a LuaRocks package should be done, implements a few hooks to
>> +# tune the build process and calls the generic package infrastructure to
>> +# generate the necessary make targets
>> +#
>> +# argument 1 is the lowercase package name
>> +# argument 2 is the uppercase package name, including an HOST_ prefix
>> +# for host packages
>> +# argument 3 is the uppercase package name, without the HOST_ prefix
>> +# for host packages
>> +# argument 4 is the package directory prefix
>> +# argument 5 is the type (target or host)
>> +################################################################################
>> +
>> +define inner-luarocks-package
>> +
>> +$(2)_BUILD_OPT ?=
>> +$(2)_SUBDIR ?= $(1)-$(shell echo "$($(3)_VERSION)" | sed -e "s/-[0-9]$$//")
>
> Can we avoid this subdir for all packages?
No, the `rock` format implies this structure with a subdirectory.
Note: the name of the subdirectory is not 'standardized' by LuaRocks,
so in some package, this value is overloaded.
Fran?ois
>
>> +$(2)_ROCKSPEC ?= $(1)-$($(3)_VERSION).rockspec
>> +$(2)_SOURCE ?= $(1)-$($(3)_VERSION).src.rock
>> +$(2)_SITE ?= $(call qstrip,$(BR2_LUAROCKS_MIRROR))
>> +
>> +#
>> +# Extract step
>> +#
>> +$(2)_EXTRACT_CMDS ?= \
>> + cd $$($(2)_DIR)/.. && $(LUAROCKS_RUN) unpack $(DL_DIR)/$$($(2)_SOURCE)
>> +
>> +# $(2)_DEPENDENCIES are handled for configure step (too late)
>> +$(1)-extract: host-luarocks
>
> Ok, I see the problem. However I believe I'd still like to see
> host-luarocks added to $(2)_DEPENDENCIES so that the dependency graph
> is correct, and "make source" / "make external-deps" properly show
> luarocks.
>
>> +#
>> +# Build/install step.
>> +#
>> +$(2)_INSTALL_TARGET_CMDS ?= \
>> + cd $$($(2)_SRCDIR) && $(LUAROCKS_RUN) build --minimal $$($(2)_ROCKSPEC) $$($(2)_BUILD_OPT)
>
> Maybe the extract and install target steps could be written using a
> define ... endef block instead, for better readability?
>
> 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
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 05/10] luarocks: new package
2013-12-23 7:56 ` François Perrad
@ 2013-12-23 8:21 ` Thomas Petazzoni
0 siblings, 0 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2013-12-23 8:21 UTC (permalink / raw)
To: buildroot
Dear Fran?ois Perrad,
On Mon, 23 Dec 2013 08:56:29 +0100, Fran?ois Perrad wrote:
> > Any chance these patches make it their way upstream?
> >
>
> With the next release of LuaRocks, these patches will be removed.
> See https://github.com/keplerproject/luarocks/commit/a1f62e69ee7fdb1dfd6dc36aad48e1306a70bb14
> and the whole discussion
> http://sourceforge.net/mailarchive/message.php?msg_id=31645659
Absolutely excellent, thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 02/10] luajit: allow to build Lua extensions without lua
2013-12-22 17:23 ` Thomas Petazzoni
@ 2014-01-07 14:11 ` François Perrad
2014-01-10 2:34 ` Thomas Petazzoni
0 siblings, 1 reply; 33+ messages in thread
From: François Perrad @ 2014-01-07 14:11 UTC (permalink / raw)
To: buildroot
2013/12/22 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Francois Perrad,
>
> On Fri, 15 Nov 2013 14:07:31 +0100, Francois Perrad wrote:
>>
>> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>> ---
>> package/luajit/luajit-05-install-inc.patch | 17 +++++++++++++++++
>> 1 file changed, 17 insertions(+)
>> create mode 100644 package/luajit/luajit-05-install-inc.patch
>
> I don't understand what are the consequence of this patch or why it is
> needed. Could you expand the commit log a little bit?
>
A Lua native module, like LuaFileSystem, needs the Lua includes at compile time.
Both lua package and luajit package supply these files.
The lua package installs them in /usr/include, and luafilesystem, like
other Lua modules, expects them at this place.
In LuaJIT upstream, these files are installed
/usr/include/luajit-2.0.2 in order to not override the Lua ones if
they are already installed.
Before the introduction of virtual package luainterpreter,
luafilesystem depends on lua package.
Now, it depends on luainterpreter. When luainterpreter is supplied by
luajit, the include from LuaJIT must be installed in the same place as
Lua one's.
So, the patch luajit-05-install-inc.patch contains the comment :
"Install includes like lua's ones"
Fran?ois
> 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
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [pkg-luarocks infra V4 02/10] luajit: allow to build Lua extensions without lua
2014-01-07 14:11 ` François Perrad
@ 2014-01-10 2:34 ` Thomas Petazzoni
0 siblings, 0 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2014-01-10 2:34 UTC (permalink / raw)
To: buildroot
Dear Fran?ois Perrad,
On Tue, 7 Jan 2014 15:11:16 +0100, Fran?ois Perrad wrote:
> A Lua native module, like LuaFileSystem, needs the Lua includes at compile time.
> Both lua package and luajit package supply these files.
> The lua package installs them in /usr/include, and luafilesystem, like
> other Lua modules, expects them at this place.
> In LuaJIT upstream, these files are installed
> /usr/include/luajit-2.0.2 in order to not override the Lua ones if
> they are already installed.
> Before the introduction of virtual package luainterpreter,
> luafilesystem depends on lua package.
> Now, it depends on luainterpreter. When luainterpreter is supplied by
> luajit, the include from LuaJIT must be installed in the same place as
> Lua one's.
Ok, now it makes a lot of sense.
> So, the patch luajit-05-install-inc.patch contains the comment :
> "Install includes like lua's ones"
I think your patch description would have been immensely better if you
had included an explanation like you did above!
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
end of thread, other threads:[~2014-01-10 2:34 UTC | newest]
Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-15 13:07 [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package Francois Perrad
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 02/10] luajit: allow to build Lua extensions without lua Francois Perrad
2013-12-22 17:23 ` Thomas Petazzoni
2014-01-07 14:11 ` François Perrad
2014-01-10 2:34 ` Thomas Petazzoni
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 03/10] lua: remove a too invasive patch Francois Perrad
2013-12-22 17:24 ` Thomas Petazzoni
2013-12-22 17:30 ` Yann E. MORIN
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 04/10] lua*: restore version in module paths Francois Perrad
2013-12-22 17:26 ` Thomas Petazzoni
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 05/10] luarocks: new package Francois Perrad
2013-12-22 17:28 ` Thomas Petazzoni
2013-12-22 20:45 ` Yann E. MORIN
2013-12-23 7:56 ` François Perrad
2013-12-23 8:21 ` Thomas Petazzoni
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 06/10] luarocks: new infrastructure Francois Perrad
2013-12-22 17:31 ` Thomas Petazzoni
2013-12-22 20:47 ` Yann E. MORIN
2013-12-23 8:20 ` François Perrad
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 07/10] lua-cjson: restore official name Francois Perrad
2013-12-22 17:32 ` Thomas Petazzoni
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 08/10] luasql-sqlite3: renamed like with LuaRocks Francois Perrad
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 09/10] lua*: refactor with luarocks infrastructure Francois Perrad
2013-12-22 17:34 ` Thomas Petazzoni
2013-11-15 13:07 ` [Buildroot] [pkg-luarocks infra V4 10/10] manual: adding packages luarocks Francois Perrad
2013-12-22 17:40 ` Thomas Petazzoni
2013-12-22 20:51 ` Yann E. MORIN
2013-12-22 20:02 ` Yann E. MORIN
2013-12-22 20:52 ` Yann E. MORIN
2013-12-22 17:22 ` [Buildroot] [pkg-luarocks infra V4 01/10] luainterpreter: create virtual package Thomas Petazzoni
2013-12-22 20:44 ` Yann E. MORIN
2013-12-22 17:37 ` Yann E. MORIN
2013-12-22 20:56 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox