Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package
@ 2013-11-14 20:17 Francois Perrad
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 02/10] luajit: allow to build Lua extensions without lua Francois Perrad
                   ` (9 more replies)
  0 siblings, 10 replies; 19+ messages in thread
From: Francois Perrad @ 2013-11-14 20:17 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..c45f7f6 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -353,6 +353,7 @@ source "package/jamvm/Config.in"
 source "package/jimtcl/Config.in"
 source "package/lua/Config.in"
 source "package/luajit/Config.in"
+source "package/luainterpreter/Config.in"
 if BR2_PACKAGE_LUA || BR2_PACKAGE_LUAJIT
 menu "Lua libraries/modules"
 source "package/cgilua/Config.in"
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..5297ccc
--- /dev/null
+++ b/package/luainterpreter/luainterpreter.mk
@@ -0,0 +1,18 @@
+#############################################################
+#
+# Virtual package for luainterpreter
+#
+#############################################################
+
+LUAINTERPRETER_VERSION = 5.1
+LUAINTERPRETER_SOURCE =
+
+ifeq ($(BR2_PACKAGE_LUA),y)
+LUAINTERPRETER_DEPENDENCIES = lua
+endif
+
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+LUAINTERPRETER_DEPENDENCIES = luajit
+endif
+
+$(eval $(generic-package))
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] 19+ messages in thread

* [Buildroot] [pkg-luarocks infra V3 02/10] luajit: allow to build Lua extensions without lua
  2013-11-14 20:17 [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package Francois Perrad
@ 2013-11-14 20:17 ` Francois Perrad
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 03/10] lua: remove a too invasive patch Francois Perrad
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 19+ messages in thread
From: Francois Perrad @ 2013-11-14 20:17 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] 19+ messages in thread

* [Buildroot] [pkg-luarocks infra V3 03/10] lua: remove a too invasive patch
  2013-11-14 20:17 [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package Francois Perrad
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 02/10] luajit: allow to build Lua extensions without lua Francois Perrad
@ 2013-11-14 20:17 ` Francois Perrad
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 04/10] lua*: restore version in module paths Francois Perrad
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 19+ messages in thread
From: Francois Perrad @ 2013-11-14 20:17 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] 19+ messages in thread

* [Buildroot] [pkg-luarocks infra V3 04/10] lua*: restore version in module paths
  2013-11-14 20:17 [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package Francois Perrad
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 02/10] luajit: allow to build Lua extensions without lua Francois Perrad
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 03/10] lua: remove a too invasive patch Francois Perrad
@ 2013-11-14 20:17 ` Francois Perrad
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 05/10] luarocks: new package Francois Perrad
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 19+ messages in thread
From: Francois Perrad @ 2013-11-14 20:17 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] 19+ messages in thread

* [Buildroot] [pkg-luarocks infra V3 05/10] luarocks: new package
  2013-11-14 20:17 [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package Francois Perrad
                   ` (2 preceding siblings ...)
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 04/10] lua*: restore version in module paths Francois Perrad
@ 2013-11-14 20:17 ` Francois Perrad
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 06/10] luarocks: new infrastructure Francois Perrad
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 19+ messages in thread
From: Francois Perrad @ 2013-11-14 20:17 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] 19+ messages in thread

* [Buildroot] [pkg-luarocks infra V3 06/10] luarocks: new infrastructure
  2013-11-14 20:17 [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package Francois Perrad
                   ` (3 preceding siblings ...)
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 05/10] luarocks: new package Francois Perrad
@ 2013-11-14 20:17 ` Francois Perrad
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 07/10] lua-cjson: restore official name Francois Perrad
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 19+ messages in thread
From: Francois Perrad @ 2013-11-14 20:17 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] 19+ messages in thread

* [Buildroot] [pkg-luarocks infra V3 07/10] lua-cjson: restore official name
  2013-11-14 20:17 [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package Francois Perrad
                   ` (4 preceding siblings ...)
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 06/10] luarocks: new infrastructure Francois Perrad
@ 2013-11-14 20:17 ` Francois Perrad
  2013-11-15  7:47   ` Thomas De Schampheleire
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 08/10] luasql-sqlite3: renamed like with LuaRocks Francois Perrad
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 19+ messages in thread
From: Francois Perrad @ 2013-11-14 20:17 UTC (permalink / raw)
  To: buildroot

(need by LuaRocks)

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 Config.in.legacy               |    7 +++++++
 package/Config.in              |    2 +-
 package/lua-cjson/Config.in    |   14 ++++++++++++++
 package/lua-cjson/lua-cjson.mk |   34 ++++++++++++++++++++++++++++++++++
 package/luacjson/Config.in     |   14 --------------
 package/luacjson/luacjson.mk   |   35 -----------------------------------
 6 files changed, 56 insertions(+), 50 deletions(-)
 create mode 100644 package/lua-cjson/Config.in
 create mode 100644 package/lua-cjson/lua-cjson.mk
 delete mode 100644 package/luacjson/Config.in
 delete mode 100644 package/luacjson/luacjson.mk

diff --git a/Config.in.legacy b/Config.in.legacy
index 587afe1..52bcf0a 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -98,6 +98,13 @@ comment "build, or run, in unpredictable ways.               "
 comment "----------------------------------------------------"
 endif
 
+config BR2_PACKAGE_LUACJSON
+	bool "luacjson"
+	select BR2_PACKAGE_LUA_CJSON
+	select BR2_LEGACY
+	help
+	  The package luacjson was renamed lua-cjson
+
 ###############################################################################
 comment "Legacy options removed in 2013.11"
 
diff --git a/package/Config.in b/package/Config.in
index c45f7f6..59ddd19 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/lua-cjson/Config.in b/package/lua-cjson/Config.in
new file mode 100644
index 0000000..8129fab
--- /dev/null
+++ b/package/lua-cjson/Config.in
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_LUA_CJSON
+	bool "lua-cjson"
+	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+	help
+	  The Lua CJSON module provides JSON support for Lua. It features:
+	  - Fast, standards compliant encoding/parsing routines
+	  - Full support for JSON with UTF-8, including decoding surrogate pairs
+	  - Optional run-time support for common exceptions to the JSON
+	    specification (infinity, NaN, ...)
+	  - No dependencies on other libraries
+
+	  (C-module)
+
+	  http://www.kyne.com.au/~mark/software/lua-cjson.php
diff --git a/package/lua-cjson/lua-cjson.mk b/package/lua-cjson/lua-cjson.mk
new file mode 100644
index 0000000..0969547
--- /dev/null
+++ b/package/lua-cjson/lua-cjson.mk
@@ -0,0 +1,34 @@
+################################################################################
+#
+# lua-cjson
+#
+################################################################################
+
+LUA_CJSON_VERSION       = 2.1.0
+LUA_CJSON_SITE          = http://www.kyne.com.au/~mark/software/download
+LUA_CJSON_DEPENDENCIES  = luainterpreter
+LUA_CJSON_LICENSE       = MIT
+LUA_CJSON_LICENSE_FILES = LICENSE
+
+define LUA_CJSON_BUILD_CMDS
+	$(MAKE) -C $(@D) \
+		CFLAGS="$(TARGET_CFLAGS)"   \
+		LDFLAGS="$(TARGET_LDFLAGS)" \
+		CC="$(TARGET_CC)"           \
+		LD="$(TARGET_LD)"           \
+		PREFIX=$(STAGING_DIR)/usr
+endef
+
+define LUA_CJSON_INSTALL_TARGET_CMDS
+	$(MAKE) DESTDIR="$(TARGET_DIR)" PREFIX="/usr" -C $(@D) install
+endef
+
+define LUA_CJSON_CLEAN_CMDS
+	$(MAKE) -C $(@D) clean
+endef
+
+define LUA_CJSON_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/usr/lib/lua/5.1/cjson.so
+endef
+
+$(eval $(generic-package))
diff --git a/package/luacjson/Config.in b/package/luacjson/Config.in
deleted file mode 100644
index d3665c0..0000000
--- a/package/luacjson/Config.in
+++ /dev/null
@@ -1,14 +0,0 @@
-config BR2_PACKAGE_LUACJSON
-	bool "luacjson"
-	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
-	help
-	  The Lua CJSON module provides JSON support for Lua. It features:
-	  - Fast, standards compliant encoding/parsing routines
-	  - Full support for JSON with UTF-8, including decoding surrogate pairs
-	  - Optional run-time support for common exceptions to the JSON
-	    specification (infinity, NaN, ...)
-	  - No dependencies on other libraries
-
-	  (C-module)
-
-	  http://www.kyne.com.au/~mark/software/lua-cjson.php
diff --git a/package/luacjson/luacjson.mk b/package/luacjson/luacjson.mk
deleted file mode 100644
index f973278..0000000
--- a/package/luacjson/luacjson.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-################################################################################
-#
-# luacjson
-#
-################################################################################
-
-LUACJSON_VERSION       = 2.1.0
-LUACJSON_SOURCE        = lua-cjson-$(LUACJSON_VERSION).tar.gz
-LUACJSON_SITE          = http://www.kyne.com.au/~mark/software/download
-LUACJSON_DEPENDENCIES  = luainterpreter
-LUACJSON_LICENSE       = MIT
-LUACJSON_LICENSE_FILES = LICENSE
-
-define LUACJSON_BUILD_CMDS
-	$(MAKE) -C $(@D) \
-		CFLAGS="$(TARGET_CFLAGS)"   \
-		LDFLAGS="$(TARGET_LDFLAGS)" \
-		CC="$(TARGET_CC)"           \
-		LD="$(TARGET_LD)"           \
-		PREFIX=$(STAGING_DIR)/usr
-endef
-
-define LUACJSON_INSTALL_TARGET_CMDS
-	$(MAKE) DESTDIR="$(TARGET_DIR)" PREFIX="/usr" -C $(@D) install
-endef
-
-define LUACJSON_CLEAN_CMDS
-	$(MAKE) -C $(@D) clean
-endef
-
-define LUACJSON_UNINSTALL_TARGET_CMDS
-	rm -f $(TARGET_DIR)/usr/lib/lua/5.1/cjson.so
-endef
-
-$(eval $(generic-package))
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [pkg-luarocks infra V3 08/10] luasql-sqlite3: renamed like with LuaRocks
  2013-11-14 20:17 [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package Francois Perrad
                   ` (5 preceding siblings ...)
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 07/10] lua-cjson: restore official name Francois Perrad
@ 2013-11-14 20:17 ` Francois Perrad
  2013-11-15  7:49   ` Thomas De Schampheleire
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 09/10] lua*: refactor with luarocks infrastructure Francois Perrad
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 19+ messages in thread
From: Francois Perrad @ 2013-11-14 20:17 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 52bcf0a..66cbde8 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -98,6 +98,13 @@ comment "build, or run, in unpredictable ways.               "
 comment "----------------------------------------------------"
 endif
 
+config BR2_PACKAGE_LUASQL
+	bool "luasql"
+	select BR2_PACKAGE_LUASQL_SQLITE3
+	select BR2_LEGACY
+	help
+	  The package luasql was renamed luasql-sqlite3
+
 config BR2_PACKAGE_LUACJSON
 	bool "luacjson"
 	select BR2_PACKAGE_LUA_CJSON
diff --git a/package/Config.in b/package/Config.in
index 59ddd19..9c926db 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] 19+ messages in thread

* [Buildroot] [pkg-luarocks infra V3 09/10] lua*: refactor with luarocks infrastructure
  2013-11-14 20:17 [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package Francois Perrad
                   ` (6 preceding siblings ...)
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 08/10] luasql-sqlite3: renamed like with LuaRocks Francois Perrad
@ 2013-11-14 20:17 ` Francois Perrad
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 10/10] manual: adding packages luarocks Francois Perrad
  2013-11-15  7:24 ` [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package Thomas De Schampheleire
  9 siblings, 0 replies; 19+ messages in thread
From: Francois Perrad @ 2013-11-14 20:17 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] 19+ messages in thread

* [Buildroot] [pkg-luarocks infra V3 10/10] manual: adding packages luarocks
  2013-11-14 20:17 [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package Francois Perrad
                   ` (7 preceding siblings ...)
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 09/10] lua*: refactor with luarocks infrastructure Francois Perrad
@ 2013-11-14 20:17 ` Francois Perrad
  2013-11-15  7:24 ` [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package Thomas De Schampheleire
  9 siblings, 0 replies; 19+ messages in thread
From: Francois Perrad @ 2013-11-14 20:17 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..d3a883b
--- /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 overrided in specific cases.
+
+* +LUAFOO_ROCKSPEC+ with +foo-$(FOO_VERSION).rockspec+
+
+* +LUAFOO_SUBDIR+ with +foo-$(FOO_VERSION_WITHOUT_ROCKSPEC_REVISION)+
+
+* +LUAFOO_BUILD_OPT+ contains the build option for +luarocks build+ call.
+  The default is empty.
+
+With the LuaRocks infrastructure, only 2 steps use +luarocks+ :
+extract and install target. +luarocks+ handles building and install
+in the same step.
+
+The step +patch+ is handled by the generic infrastructure.
+The step +configure+ and +build+ stay empty.
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] 19+ messages in thread

* [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package
  2013-11-14 20:17 [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package Francois Perrad
                   ` (8 preceding siblings ...)
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 10/10] manual: adding packages luarocks Francois Perrad
@ 2013-11-15  7:24 ` Thomas De Schampheleire
  2013-11-15  8:44   ` Thomas Petazzoni
  9 siblings, 1 reply; 19+ messages in thread
From: Thomas De Schampheleire @ 2013-11-15  7:24 UTC (permalink / raw)
  To: buildroot

Hi Francois,

On Thu, Nov 14, 2013 at 9:17 PM, Francois Perrad <fperrad@gmail.com> wrote:
> 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..c45f7f6 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -353,6 +353,7 @@ source "package/jamvm/Config.in"
>  source "package/jimtcl/Config.in"
>  source "package/lua/Config.in"
>  source "package/luajit/Config.in"
> +source "package/luainterpreter/Config.in"

Entries in Config.in are supposed to be ordered alphabetically.
Although in this case luainterpreter does not provide a visible entry,
I would still order this file to avoid confusion... So that is lua,
luainterpreter, luajit.

>  if BR2_PACKAGE_LUA || BR2_PACKAGE_LUAJIT
>  menu "Lua libraries/modules"
>  source "package/cgilua/Config.in"
> 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

The meaning of BR2_PACKAGE_HAS_LUA_INTERPRETER is that the user has
selected one of lua or luajit, right?
Is the PACKAGE in there really needed? What about
BR2_HAS_LUA_INTERPRETER instead? This says that 'buildroot has a lua
interpreter' and not that 'a package has a lua interpreter'.

[..]

> diff --git a/package/luainterpreter/luainterpreter.mk b/package/luainterpreter/luainterpreter.mk
> new file mode 100644
> index 0000000..5297ccc
> --- /dev/null
> +++ b/package/luainterpreter/luainterpreter.mk
> @@ -0,0 +1,18 @@
> +#############################################################
> +#
> +# Virtual package for luainterpreter
> +#
> +#############################################################
> +
> +LUAINTERPRETER_VERSION = 5.1

What is the meaning of this version? It seems to be the lua version,
but is this relevant for a virtual package?

[..]

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [pkg-luarocks infra V3 07/10] lua-cjson: restore official name
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 07/10] lua-cjson: restore official name Francois Perrad
@ 2013-11-15  7:47   ` Thomas De Schampheleire
  0 siblings, 0 replies; 19+ messages in thread
From: Thomas De Schampheleire @ 2013-11-15  7:47 UTC (permalink / raw)
  To: buildroot

On Thu, Nov 14, 2013 at 9:17 PM, Francois Perrad <fperrad@gmail.com> wrote:
> (need by LuaRocks)
>
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  Config.in.legacy               |    7 +++++++
>  package/Config.in              |    2 +-
>  package/lua-cjson/Config.in    |   14 ++++++++++++++
>  package/lua-cjson/lua-cjson.mk |   34 ++++++++++++++++++++++++++++++++++
>  package/luacjson/Config.in     |   14 --------------
>  package/luacjson/luacjson.mk   |   35 -----------------------------------
>  6 files changed, 56 insertions(+), 50 deletions(-)
>  create mode 100644 package/lua-cjson/Config.in
>  create mode 100644 package/lua-cjson/lua-cjson.mk
>  delete mode 100644 package/luacjson/Config.in
>  delete mode 100644 package/luacjson/luacjson.mk
>
> diff --git a/Config.in.legacy b/Config.in.legacy
> index 587afe1..52bcf0a 100644
> --- a/Config.in.legacy
> +++ b/Config.in.legacy
> @@ -98,6 +98,13 @@ comment "build, or run, in unpredictable ways.               "
>  comment "----------------------------------------------------"
>  endif
>
> +config BR2_PACKAGE_LUACJSON
> +       bool "luacjson"
> +       select BR2_PACKAGE_LUA_CJSON
> +       select BR2_LEGACY
> +       help
> +         The package luacjson was renamed lua-cjson
> +
>  ###############################################################################
>  comment "Legacy options removed in 2013.11"
>

I think you should already put a comment at the top to say "Legacy
options removed in 2014.02".


Best regards,
Thomas

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [pkg-luarocks infra V3 08/10] luasql-sqlite3: renamed like with LuaRocks
  2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 08/10] luasql-sqlite3: renamed like with LuaRocks Francois Perrad
@ 2013-11-15  7:49   ` Thomas De Schampheleire
  2013-11-15  8:20     ` Thomas Petazzoni
  0 siblings, 1 reply; 19+ messages in thread
From: Thomas De Schampheleire @ 2013-11-15  7:49 UTC (permalink / raw)
  To: buildroot

Hi Francois,

On Thu, Nov 14, 2013 at 9:17 PM, Francois Perrad <fperrad@gmail.com> wrote:
>
> 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
>

How have you moved this file? I don't see any indication of a
git-aware move, it seems to be an independent delete+add...

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [pkg-luarocks infra V3 08/10] luasql-sqlite3: renamed like with LuaRocks
  2013-11-15  7:49   ` Thomas De Schampheleire
@ 2013-11-15  8:20     ` Thomas Petazzoni
  0 siblings, 0 replies; 19+ messages in thread
From: Thomas Petazzoni @ 2013-11-15  8:20 UTC (permalink / raw)
  To: buildroot

Dear Thomas De Schampheleire,

On Fri, 15 Nov 2013 08:49:50 +0100, Thomas De Schampheleire wrote:

> How have you moved this file? I don't see any indication of a
> git-aware move, it seems to be an independent delete+add...

Regardless on how you move things (either git mv, or plain mv), git
format-patch -M should be able to detect renames. At least, that's my
understanding of the thing: git does track renames per se, but
format-patch can detect them when two files are quite similar, and then
encode the change as a rename + a small diff, rather than a full
removal + full addition.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package
  2013-11-15  7:24 ` [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package Thomas De Schampheleire
@ 2013-11-15  8:44   ` Thomas Petazzoni
  2013-11-15  9:11     ` Thomas De Schampheleire
  0 siblings, 1 reply; 19+ messages in thread
From: Thomas Petazzoni @ 2013-11-15  8:44 UTC (permalink / raw)
  To: buildroot

Dear Thomas De Schampheleire,

On Fri, 15 Nov 2013 08:24:59 +0100, Thomas De Schampheleire wrote:

> >  config BR2_PACKAGE_LBASE64
> >         bool "lbase64"
> > +       depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
> >         help
> >           A base64 library for Lua
> 
> The meaning of BR2_PACKAGE_HAS_LUA_INTERPRETER is that the user has
> selected one of lua or luajit, right?
> Is the PACKAGE in there really needed? What about
> BR2_HAS_LUA_INTERPRETER instead? This says that 'buildroot has a lua
> interpreter' and not that 'a package has a lua interpreter'.

On the other hand, we have:

 BR2_PACKAGE_HAS_OPENGL_EGL
 BR2_PACKAGE_HAS_OPENGL_ES
 BR2_PACKAGE_HAS_OPENVG
 BR2_PACKAGE_HAS_OPENMAX
 BR2_PACKAGE_HAS_POWERVR


> > +++ b/package/luainterpreter/luainterpreter.mk
> > @@ -0,0 +1,18 @@
> > +#############################################################
> > +#
> > +# Virtual package for luainterpreter
> > +#
> > +#############################################################
> > +
> > +LUAINTERPRETER_VERSION = 5.1
> 
> What is the meaning of this version? It seems to be the lua version,
> but is this relevant for a virtual package?

No, it is not relevant. Maybe we could have the policy of doing:

<foo>_VERSION = virtual
<foo>_SOURCE =

for virtual packages. This way instead of showing "unknown" in the ">>>
blabla unknown extracting" messages, we would have ">>> blabla virtual
extracting".

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package
  2013-11-15  8:44   ` Thomas Petazzoni
@ 2013-11-15  9:11     ` Thomas De Schampheleire
  2013-11-15  9:18       ` Thomas Petazzoni
  0 siblings, 1 reply; 19+ messages in thread
From: Thomas De Schampheleire @ 2013-11-15  9:11 UTC (permalink / raw)
  To: buildroot

Hi,

On Fri, Nov 15, 2013 at 9:44 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Thomas De Schampheleire,
>
> On Fri, 15 Nov 2013 08:24:59 +0100, Thomas De Schampheleire wrote:
>
>> >  config BR2_PACKAGE_LBASE64
>> >         bool "lbase64"
>> > +       depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
>> >         help
>> >           A base64 library for Lua
>>
>> The meaning of BR2_PACKAGE_HAS_LUA_INTERPRETER is that the user has
>> selected one of lua or luajit, right?
>> Is the PACKAGE in there really needed? What about
>> BR2_HAS_LUA_INTERPRETER instead? This says that 'buildroot has a lua
>> interpreter' and not that 'a package has a lua interpreter'.
>
> On the other hand, we have:
>
>  BR2_PACKAGE_HAS_OPENGL_EGL
>  BR2_PACKAGE_HAS_OPENGL_ES
>  BR2_PACKAGE_HAS_OPENVG
>  BR2_PACKAGE_HAS_OPENMAX
>  BR2_PACKAGE_HAS_POWERVR

Hm, I wasn't aware of that.
These also sound awkward to me, BR2_HAS_OPENGL_EGL etc. seems more logical...
Changing this would of course mean new legacy options...

>
>
>> > +++ b/package/luainterpreter/luainterpreter.mk
>> > @@ -0,0 +1,18 @@
>> > +#############################################################
>> > +#
>> > +# Virtual package for luainterpreter
>> > +#
>> > +#############################################################
>> > +
>> > +LUAINTERPRETER_VERSION = 5.1
>>
>> What is the meaning of this version? It seems to be the lua version,
>> but is this relevant for a virtual package?
>
> No, it is not relevant. Maybe we could have the policy of doing:
>
> <foo>_VERSION = virtual
> <foo>_SOURCE =
>
> for virtual packages. This way instead of showing "unknown" in the ">>>
> blabla unknown extracting" messages, we would have ">>> blabla virtual
> extracting".

Sounds good to me. This could also be used for the external toolchain then...

>>> toolchain undefined Extracting
>>> toolchain undefined Patching
>>> toolchain-external undefined Extracting
mkdir -p /home/tdescham/repo/contrib/buildroot-vim-sh-2/output/host/opt/ext-toolchain
bzcat /home/tdescham/repo/contrib/dl/br-sh4-full-2013.05-1.tar.bz2 |
tar --strip-components=1 --exclude='usr/lib/locale/*' -C
/home/tdescham/repo/contrib/buildroot-vim-sh-2/output/host/opt/ext-toolchain
 -xf -
>>> toolchain-external undefined Patching
>>> toolchain-external undefined Configuring
>>> toolchain-external undefined Building
>>> toolchain-external undefined Installing to staging directory
>>> toolchain-external undefined Copying external toolchain libraries to target...
>>> toolchain-external undefined Copying external toolchain sysroot to staging...
>>> toolchain-external undefined Building ext-toolchain wrapper



Best regards,
Thomas

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package
  2013-11-15  9:11     ` Thomas De Schampheleire
@ 2013-11-15  9:18       ` Thomas Petazzoni
  2013-11-15  9:49         ` Thomas De Schampheleire
  0 siblings, 1 reply; 19+ messages in thread
From: Thomas Petazzoni @ 2013-11-15  9:18 UTC (permalink / raw)
  To: buildroot

Dear Thomas De Schampheleire,

On Fri, 15 Nov 2013 10:11:12 +0100, Thomas De Schampheleire wrote:

> > On the other hand, we have:
> >
> >  BR2_PACKAGE_HAS_OPENGL_EGL
> >  BR2_PACKAGE_HAS_OPENGL_ES
> >  BR2_PACKAGE_HAS_OPENVG
> >  BR2_PACKAGE_HAS_OPENMAX
> >  BR2_PACKAGE_HAS_POWERVR
> 
> Hm, I wasn't aware of that.
> These also sound awkward to me, BR2_HAS_OPENGL_EGL etc. seems more logical...
> Changing this would of course mean new legacy options...

I don't think so, because those options are hidden options, they are
merely here to create a "disconnection" between providers of a feature
(i.e an OpenGL implementation) and consumers of a feature (i.e
applications or libraries using the OpenGL API). So I believe we can
rename them as much as we want.


> > for virtual packages. This way instead of showing "unknown" in the ">>>
> > blabla unknown extracting" messages, we would have ">>> blabla virtual
> > extracting".
> 
> Sounds good to me. This could also be used for the external toolchain then...

Of course, all virtual packages would have to be changed.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package
  2013-11-15  9:18       ` Thomas Petazzoni
@ 2013-11-15  9:49         ` Thomas De Schampheleire
  2013-11-15 12:56           ` Thomas Petazzoni
  0 siblings, 1 reply; 19+ messages in thread
From: Thomas De Schampheleire @ 2013-11-15  9:49 UTC (permalink / raw)
  To: buildroot

On Fri, Nov 15, 2013 at 10:18 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Thomas De Schampheleire,
>
> On Fri, 15 Nov 2013 10:11:12 +0100, Thomas De Schampheleire wrote:
>
>> > On the other hand, we have:
>> >
>> >  BR2_PACKAGE_HAS_OPENGL_EGL
>> >  BR2_PACKAGE_HAS_OPENGL_ES
>> >  BR2_PACKAGE_HAS_OPENVG
>> >  BR2_PACKAGE_HAS_OPENMAX
>> >  BR2_PACKAGE_HAS_POWERVR
>>
>> Hm, I wasn't aware of that.
>> These also sound awkward to me, BR2_HAS_OPENGL_EGL etc. seems more logical...
>> Changing this would of course mean new legacy options...
>
> I don't think so, because those options are hidden options, they are
> merely here to create a "disconnection" between providers of a feature
> (i.e an OpenGL implementation) and consumers of a feature (i.e
> applications or libraries using the OpenGL API). So I believe we can
> rename them as much as we want.

Ah, great!

But you haven't yet said whether you agree with my reasoning that the
PACKAGE in these names is not nice... What do you think about that?

>
>
>> > for virtual packages. This way instead of showing "unknown" in the ">>>
>> > blabla unknown extracting" messages, we would have ">>> blabla virtual
>> > extracting".
>>
>> Sounds good to me. This could also be used for the external toolchain then...
>
> Of course, all virtual packages would have to be changed.

Great again, we have a plan!

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package
  2013-11-15  9:49         ` Thomas De Schampheleire
@ 2013-11-15 12:56           ` Thomas Petazzoni
  0 siblings, 0 replies; 19+ messages in thread
From: Thomas Petazzoni @ 2013-11-15 12:56 UTC (permalink / raw)
  To: buildroot

Dear Thomas De Schampheleire,

On Fri, 15 Nov 2013 10:49:15 +0100, Thomas De Schampheleire wrote:

> > I don't think so, because those options are hidden options, they are
> > merely here to create a "disconnection" between providers of a feature
> > (i.e an OpenGL implementation) and consumers of a feature (i.e
> > applications or libraries using the OpenGL API). So I believe we can
> > rename them as much as we want.
> 
> Ah, great!
> 
> But you haven't yet said whether you agree with my reasoning that the
> PACKAGE in these names is not nice... What do you think about that?

I don't really have a strong feeling on this. I believe we started
using BR2_PACKAGE_HAS_<foo>, just because we are inside package/ so it
kind of makes sense to also use the BR2_PACKAGE_<something> namespace.

That being said, it is true that the wording BR2_PACKAGE_HAS_<foo>
seems to indicate that it is a specific package that has something, not
that the system has a whole has some given feature.

As I said, I don't feel really strongly about this. I don't think the
current BR2_PACKAGE_HAS_<something> is too bad either.

> >> > for virtual packages. This way instead of showing "unknown" in the ">>>
> >> > blabla unknown extracting" messages, we would have ">>> blabla virtual
> >> > extracting".
> >>
> >> Sounds good to me. This could also be used for the external toolchain then...
> >
> > Of course, all virtual packages would have to be changed.
> 
> Great again, we have a plan!

 :-)

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2013-11-15 12:56 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-14 20:17 [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package Francois Perrad
2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 02/10] luajit: allow to build Lua extensions without lua Francois Perrad
2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 03/10] lua: remove a too invasive patch Francois Perrad
2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 04/10] lua*: restore version in module paths Francois Perrad
2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 05/10] luarocks: new package Francois Perrad
2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 06/10] luarocks: new infrastructure Francois Perrad
2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 07/10] lua-cjson: restore official name Francois Perrad
2013-11-15  7:47   ` Thomas De Schampheleire
2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 08/10] luasql-sqlite3: renamed like with LuaRocks Francois Perrad
2013-11-15  7:49   ` Thomas De Schampheleire
2013-11-15  8:20     ` Thomas Petazzoni
2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 09/10] lua*: refactor with luarocks infrastructure Francois Perrad
2013-11-14 20:17 ` [Buildroot] [pkg-luarocks infra V3 10/10] manual: adding packages luarocks Francois Perrad
2013-11-15  7:24 ` [Buildroot] [pkg-luarocks infra V3 01/10] luainterpreter: create virtual package Thomas De Schampheleire
2013-11-15  8:44   ` Thomas Petazzoni
2013-11-15  9:11     ` Thomas De Schampheleire
2013-11-15  9:18       ` Thomas Petazzoni
2013-11-15  9:49         ` Thomas De Schampheleire
2013-11-15 12:56           ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox