Skip to contentSkip to conversation

luainterpreter: create virtual package

PATCH New Francois Perrad 4 participants 11 messages Aug 14, 2013 – Oct 1, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/2 luainterpreter: create virtual package

luainterpreter is lua or luajit

---
 package/Config.in                                |    1 +
 package/lbase64/Config.in                        |    1 +
 package/lbase64/lbase64.mk                       |    2 +-
 package/lua-ev/Config.in                         |    1 +
 package/lua-ev/lua-ev.mk                         |    2 +-
 package/lua-msgpack-native/Config.in             |    1 +
 package/lua-msgpack-native/lua-msgpack-native.mk |    2 +-
 package/lua/Config.in                            |    1 +
 package/luacjson/Config.in                       |    1 +
 package/luacjson/luacjson.mk                     |    2 +-
 package/luaexpat/Config.in                       |    1 +
 package/luaexpat/luaexpat.mk                     |    2 +-
 package/luafilesystem/Config.in                  |    1 +
 package/luafilesystem/luafilesystem.mk           |    2 +-
 package/luainterpreter/Config.in                 |    2 ++
 package/luainterpreter/luainterpreter.mk         |   18 ++++++++++++++++++
 package/luajit/Config.in                         |    1 +
 package/luaposix/Config.in                       |    1 +
 package/luaposix/luaposix.mk                     |    2 +-
 package/luasec/Config.in                         |    1 +
 package/luasec/luasec.mk                         |    2 +-
 package/luasocket/Config.in                      |    1 +
 package/luasocket/luasocket.mk                   |    2 +-
 package/luasql/Config.in                         |    1 +
 package/luasql/luasql.mk                         |    2 +-
 package/rings/Config.in                          |    1 +
 package/rings/rings.mk                           |    2 +-
 27 files changed, 45 insertions(+), 11 deletions(-)
 create mode 100644 package/luainterpreter/Config.in
 create mode 100644 package/luainterpreter/luainterpreter.mk
package/Config.in +1 -0
index 86961e9..98b5bcf 100644
@@ -320,6 +320,7 @@ source "package/jamvm/Config.in"
 source "package/jimtcl/Config.in"
 source "package/lua/Config.in"
 source "package/luajit/Config.in"
+source "package/luainterpreter/Config.in"
 if BR2_PACKAGE_LUA || BR2_PACKAGE_LUAJIT
 menu "LUA libraries/modules"
 source "package/cgilua/Config.in"
package/lbase64/Config.in +1 -0
index bd8503a..ca9dd5d 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LBASE64
 	bool "lbase64"
+	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
 	help
 	  A base64 library for Lua
 
package/lbase64/lbase64.mk +1 -1
index 87dda40..ab726ef 100644
@@ -9,7 +9,7 @@ LBASE64_SITE = http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/5.1
 LBASE64_SOURCE = lbase64.tar.gz
 LBASE64_LICENSE = Public domain
 LBASE64_LICENSE_FILES = README
-LBASE64_DEPENDENCIES = lua
+LBASE64_DEPENDENCIES = luainterpreter
 
 define LBASE64_BUILD_CMDS
        $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
package/lua-ev/Config.in +1 -0
index 1e89c27..2f9c486 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUA_EV
 	bool "lua-ev"
+	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
 	select BR2_PACKAGE_LIBEV
 	help
 	  Get access to the libev library from Lua.
package/lua-ev/lua-ev.mk +1 -1
index 2b03936..f4bfe12 100644
@@ -6,7 +6,7 @@
 
 LUA_EV_VERSION = 458165b
 LUA_EV_SITE = http://github.com/brimworks/lua-ev/tarball/$(LUA_EV_VERSION)
-LUA_EV_DEPENDENCIES = lua libev
+LUA_EV_DEPENDENCIES = luainterpreter libev
 LUA_EV_LICENSE = MIT
 LUA_EV_LICENSE_FILES = README
 LUA_EV_CONF_OPT = -DINSTALL_CMOD="/usr/lib/lua"
package/lua-msgpack-native/Config.in +1 -0
index 8894ee5..1014298 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUA_MSGPACK_NATIVE
 	bool "lua-msgpack-native"
+	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
 	help
 	  This is a native, C language implementation of msgpack
 	  (http://msgpack.org) library/protocol for Lua language
package/lua-msgpack-native/lua-msgpack-native.mk +1 -1
index 6ec923c..42ab8a6 100644
@@ -6,7 +6,7 @@
 
 LUA_MSGPACK_NATIVE_VERSION = 41cce91
 LUA_MSGPACK_NATIVE_SITE = http://github.com/kengonakajima/lua-msgpack-native/tarball/$(LUA_MSGPACK_NATIVE_VERSION)
-LUA_MSGPACK_NATIVE_DEPENDENCIES = lua
+LUA_MSGPACK_NATIVE_DEPENDENCIES = luainterpreter
 LUA_MSGPACK_NATIVE_LICENSE = Apache-2.0
 LUA_MSGPACK_NATIVE_LICENSE_FILES = LICENSE.txt
 
package/lua/Config.in +1 -0
index 4166730..cc62dee 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUA
 	bool "lua"
+	select BR2_PACKAGE_HAS_LUA_INTERPRETER
 	help
 	  Lua is a powerful, fast, light-weight, embeddable scripting language.
 
package/luacjson/Config.in +1 -0
index 8a5624f..d3665c0 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUACJSON
 	bool "luacjson"
+	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
 	help
 	  The Lua CJSON module provides JSON support for Lua. It features:
 	  - Fast, standards compliant encoding/parsing routines
package/luacjson/luacjson.mk +1 -1
index f976ec6..d1f1ebb 100644
@@ -7,7 +7,7 @@
 LUACJSON_VERSION       = 2.1.0
 LUACJSON_SOURCE        = lua-cjson-$(LUACJSON_VERSION).tar.gz
 LUACJSON_SITE          = http://www.kyne.com.au/~mark/software/download
-LUACJSON_DEPENDENCIES  = lua
+LUACJSON_DEPENDENCIES  = luainterpreter
 LUACJSON_LICENSE       = MIT
 LUACJSON_LICENSE_FILES = LICENSE
 
package/luaexpat/Config.in +1 -0
index 186c5c9..f8db318 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_LUAEXPAT
 	bool "luaexpat"
 	select BR2_PACKAGE_EXPAT
+	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
 	help
 	  LuaExpat is a SAX XML parser based on the Expat library.
 
package/luaexpat/luaexpat.mk +1 -1
index 5c45f34..e0fa043 100644
@@ -6,7 +6,7 @@
 
 LUAEXPAT_VERSION      = 1.2.0
 LUAEXPAT_SITE         = http://matthewwild.co.uk/projects/luaexpat
-LUAEXPAT_DEPENDENCIES = lua expat
+LUAEXPAT_DEPENDENCIES = luainterpreter expat
 LUAEXPAT_LICENSE      = MIT
 
 
package/luafilesystem/Config.in +1 -0
index 7c130f8..489ebf3 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUAFILESYSTEM
 	bool "luafilesystem"
+	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
 	help
 	  LuaFileSystem offers a portable way to access
 	  the underlying directory structure and file attributes.
package/luafilesystem/luafilesystem.mk +1 -1
index 2f7b4d8..edd7203 100644
@@ -6,7 +6,7 @@
 
 LUAFILESYSTEM_VERSION = 1.6.2
 LUAFILESYSTEM_SITE = http://github.com/downloads/keplerproject/luafilesystem
-LUAFILESYSTEM_DEPENDENCIES = lua
+LUAFILESYSTEM_DEPENDENCIES = luainterpreter
 LUAFILESYSTEM_LICENSE = MIT
 
 ifeq ($(BR2_LARGEFILE),y)
package/luainterpreter/Config.in new file +2 -0
new file mode 100644
index 0000000..d85d7e8
@@ -0,0 +1,2 @@
+config BR2_PACKAGE_HAS_LUA_INTERPRETER
+	bool
package/luainterpreter/luainterpreter.mk new file +18 -0
new file mode 100644
index 0000000..5297ccc
@@ -0,0 +1,18 @@
+#############################################################
+#
+# Virtual package for luainterpreter
+#
+#############################################################
+
+LUAINTERPRETER_VERSION = 5.1
+LUAINTERPRETER_SOURCE =
+
+ifeq ($(BR2_PACKAGE_LUA),y)
+LUAINTERPRETER_DEPENDENCIES = lua
+endif
+
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+LUAINTERPRETER_DEPENDENCIES = luajit
+endif
+
+$(eval $(generic-package))
package/luajit/Config.in +1 -0
index 23b2650..97013e4 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUAJIT
 	bool "luajit"
+	select BR2_PACKAGE_HAS_LUA_INTERPRETER
 	# Luajit is only available for some target architectures, and
 	# has some complexity wrt 32/64. See luajit.mk for details.
 	depends on BR2_i386 || (BR2_x86_64 && BR2_HOSTARCH='x86_64') || BR2_powerpc || BR2_arm || BR2_armeb
package/luaposix/Config.in +1 -0
index 412e07f..c47db06 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUAPOSIX
 	bool "luaposix"
+	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
 	help
 	  luaposix is a POSIX binding, including curses, for Lua 5.1
 	  and 5.2; Like most libraries it simply binds to C APIs on
package/luaposix/luaposix.mk +1 -1
index 1d1ee6a..8058f90 100644
@@ -8,7 +8,7 @@ LUAPOSIX_VERSION = 5.1.20
 LUAPOSIX_SITE = https://github.com/downloads/luaposix/luaposix
 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"
 LUAPOSIX_AUTORECONF = YES
 
package/luasec/Config.in +1 -0
index 2d303c1..ed55df7 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_LUASEC
 	bool "luasec"
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_LUASOCKET
+	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
 	help
 	  LuaSec is a binding for OpenSSL library to provide TLS/SSL
 	  communication.
package/luasec/luasec.mk +1 -1
index 053309f..3fb7060 100644
@@ -8,7 +8,7 @@ LUASEC_VERSION = 0.4.1
 LUASEC_SITE = http://www.inf.puc-rio.br/~brunoos/luasec/download/
 LUASEC_LICENSE = MIT
 LUASEC_LICENSE_FILES = LICENSE
-LUASEC_DEPENDENCIES = lua openssl
+LUASEC_DEPENDENCIES = luainterpreter openssl
 
 define LUASEC_BUILD_CMDS
 	$(MAKE) -C $(@D) CC="$(TARGET_CC)" LD="$(TARGET_CC)" \
package/luasocket/Config.in +1 -0
index 4526303..619d649 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUASOCKET
 	bool "luasocket"
+	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
 	help
 	  LuaSocket is the most comprehensive networking support library
 	  for the Lua language.
package/luasocket/luasocket.mk +1 -1
index b0c0be5..20ad8bf 100644
@@ -6,7 +6,7 @@
 
 LUASOCKET_VERSION = 2.0.2
 LUASOCKET_SITE = http://luaforge.net/frs/download.php/2664
-LUASOCKET_DEPENDENCIES = lua
+LUASOCKET_DEPENDENCIES = luainterpreter
 LUASOCKET_LICENSE = MIT
 LUASOCKET_LICENSE_FILES = LICENSE
 
package/luasql/Config.in +1 -0
index 4dd011a..96e04fb 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUASQL
 	bool "luasql"
+	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
 	help
 	  LuaSQL is a simple interface from Lua to a DBMS.
 
package/luasql/luasql.mk +1 -1
index 6fbdccc..12fd02c 100644
@@ -8,7 +8,7 @@ LUASQL_VERSION = v2.3.0
 LUASQL_SITE = https://github.com/keplerproject/luasql/tarball/$(LUASQL_VERSION)
 LUASQL_LICENSE = MIT
 LUASQL_LICENSE_FILES = README
-LUASQL_DEPENDENCIES = lua
+LUASQL_DEPENDENCIES = luainterpreter
 
 LUASQL_MAKE_FLAGS = \
 	CC="$(TARGET_CC)" \
package/rings/Config.in +1 -0
index d1f1efe..b1d41f3 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_RINGS
 	bool "rings"
+	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
 	help
 	  Provides a way to create new Lua states from within Lua.
 
package/rings/rings.mk +1 -1
index 610ded0..67a4916 100644
@@ -6,7 +6,7 @@
 
 RINGS_VERSION = 1.2.3
 RINGS_SITE = http://github.com/downloads/keplerproject/rings
-RINGS_DEPENDENCIES = lua
+RINGS_DEPENDENCIES = luainterpreter
 RINGS_LICENSE = MIT
 
 define RINGS_BUILD_CMDS
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v4 2/2 luajit: allow to build Lua extensions without lua

---
 package/luajit/luajit-05-install-inc.patch |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 package/luajit/luajit-05-install-inc.patch
package/luajit/luajit-05-install-inc.patch new file +17 -0
new file mode 100644
index 0000000..1fd11b1
@@ -0,0 +1,17 @@
+Install includes like lua's ones
+
+Signed-off-by: Francois Perrad <[email protected]>
+
+Index: b/Makefile
+===================================================================
+--- a/Makefile
++++ b/Makefile
+@@ -31,7 +31,7 @@ DPREFIX= $(DESTDIR)$(PREFIX)
+ INSTALL_BIN=   $(DPREFIX)/bin
+ INSTALL_LIB=   $(DPREFIX)/lib
+ INSTALL_SHARE= $(DPREFIX)/share
+-INSTALL_INC=   $(DPREFIX)/include/luajit-$(MAJVER).$(MINVER)
++INSTALL_INC=   $(DPREFIX)/include
+ 
+ INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(VERSION)
+ INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH v4 1/2 luainterpreter: create virtual package

In reply to Francois Perrad

ping

2013/8/14 Francois Perrad <[email protected]>:

Quoted 370 lines

luainterpreter is lua or luajit

---
 package/Config.in                                |    1 +
 package/lbase64/Config.in                        |    1 +
 package/lbase64/lbase64.mk                       |    2 +-
 package/lua-ev/Config.in                         |    1 +
 package/lua-ev/lua-ev.mk                         |    2 +-
 package/lua-msgpack-native/Config.in             |    1 +
 package/lua-msgpack-native/lua-msgpack-native.mk |    2 +-
 package/lua/Config.in                            |    1 +
 package/luacjson/Config.in                       |    1 +
 package/luacjson/luacjson.mk                     |    2 +-
 package/luaexpat/Config.in                       |    1 +
 package/luaexpat/luaexpat.mk                     |    2 +-
 package/luafilesystem/Config.in                  |    1 +
 package/luafilesystem/luafilesystem.mk           |    2 +-
 package/luainterpreter/Config.in                 |    2 ++
 package/luainterpreter/luainterpreter.mk         |   18 ++++++++++++++++++
 package/luajit/Config.in                         |    1 +
 package/luaposix/Config.in                       |    1 +
 package/luaposix/luaposix.mk                     |    2 +-
 package/luasec/Config.in                         |    1 +
 package/luasec/luasec.mk                         |    2 +-
 package/luasocket/Config.in                      |    1 +
 package/luasocket/luasocket.mk                   |    2 +-
 package/luasql/Config.in                         |    1 +
 package/luasql/luasql.mk                         |    2 +-
 package/rings/Config.in                          |    1 +
 package/rings/rings.mk                           |    2 +-
 27 files changed, 45 insertions(+), 11 deletions(-)
 create mode 100644 package/luainterpreter/Config.in
 create mode 100644 package/luainterpreter/luainterpreter.mk
package/Config.in +1 -0
index 86961e9..98b5bcf 100644
@@ -320,6 +320,7 @@ source "package/jamvm/Config.in"
 source "package/jimtcl/Config.in"
 source "package/lua/Config.in"
 source "package/luajit/Config.in"
+source "package/luainterpreter/Config.in"
 if BR2_PACKAGE_LUA || BR2_PACKAGE_LUAJIT
 menu "LUA libraries/modules"
 source "package/cgilua/Config.in"
package/lbase64/Config.in +1 -0
index bd8503a..ca9dd5d 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LBASE64
        bool "lbase64"
+       depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
        help
          A base64 library for Lua
 
package/lbase64/lbase64.mk +1 -1
index 87dda40..ab726ef 100644
@@ -9,7 +9,7 @@ LBASE64_SITE = http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/5.1
 LBASE64_SOURCE = lbase64.tar.gz
 LBASE64_LICENSE = Public domain
 LBASE64_LICENSE_FILES = README
-LBASE64_DEPENDENCIES = lua
+LBASE64_DEPENDENCIES = luainterpreter
 
 define LBASE64_BUILD_CMDS
        $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
package/lua-ev/Config.in +1 -0
index 1e89c27..2f9c486 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUA_EV
        bool "lua-ev"
+       depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
        select BR2_PACKAGE_LIBEV
        help
          Get access to the libev library from Lua.
package/lua-ev/lua-ev.mk +1 -1
index 2b03936..f4bfe12 100644
@@ -6,7 +6,7 @@
 
 LUA_EV_VERSION = 458165b
 LUA_EV_SITE = http://github.com/brimworks/lua-ev/tarball/$(LUA_EV_VERSION)
-LUA_EV_DEPENDENCIES = lua libev
+LUA_EV_DEPENDENCIES = luainterpreter libev
 LUA_EV_LICENSE = MIT
 LUA_EV_LICENSE_FILES = README
 LUA_EV_CONF_OPT = -DINSTALL_CMOD="/usr/lib/lua"
package/lua-msgpack-native/Config.in +1 -0
index 8894ee5..1014298 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUA_MSGPACK_NATIVE
        bool "lua-msgpack-native"
+       depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
        help
          This is a native, C language implementation of msgpack
          (http://msgpack.org) library/protocol for Lua language
package/lua-msgpack-native/lua-msgpack-native.mk +1 -1
index 6ec923c..42ab8a6 100644
@@ -6,7 +6,7 @@
 
 LUA_MSGPACK_NATIVE_VERSION = 41cce91
 LUA_MSGPACK_NATIVE_SITE = http://github.com/kengonakajima/lua-msgpack-native/tarball/$(LUA_MSGPACK_NATIVE_VERSION)
-LUA_MSGPACK_NATIVE_DEPENDENCIES = lua
+LUA_MSGPACK_NATIVE_DEPENDENCIES = luainterpreter
 LUA_MSGPACK_NATIVE_LICENSE = Apache-2.0
 LUA_MSGPACK_NATIVE_LICENSE_FILES = LICENSE.txt
 
package/lua/Config.in +1 -0
index 4166730..cc62dee 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUA
        bool "lua"
+       select BR2_PACKAGE_HAS_LUA_INTERPRETER
        help
          Lua is a powerful, fast, light-weight, embeddable scripting language.
 
package/luacjson/Config.in +1 -0
index 8a5624f..d3665c0 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUACJSON
        bool "luacjson"
+       depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
        help
          The Lua CJSON module provides JSON support for Lua. It features:
          - Fast, standards compliant encoding/parsing routines
package/luacjson/luacjson.mk +1 -1
index f976ec6..d1f1ebb 100644
@@ -7,7 +7,7 @@
 LUACJSON_VERSION       = 2.1.0
 LUACJSON_SOURCE        = lua-cjson-$(LUACJSON_VERSION).tar.gz
 LUACJSON_SITE          = http://www.kyne.com.au/~mark/software/download
-LUACJSON_DEPENDENCIES  = lua
+LUACJSON_DEPENDENCIES  = luainterpreter
 LUACJSON_LICENSE       = MIT
 LUACJSON_LICENSE_FILES = LICENSE
 
package/luaexpat/Config.in +1 -0
index 186c5c9..f8db318 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_LUAEXPAT
        bool "luaexpat"
        select BR2_PACKAGE_EXPAT
+       depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
        help
          LuaExpat is a SAX XML parser based on the Expat library.
 
package/luaexpat/luaexpat.mk +1 -1
index 5c45f34..e0fa043 100644
@@ -6,7 +6,7 @@
 
 LUAEXPAT_VERSION      = 1.2.0
 LUAEXPAT_SITE         = http://matthewwild.co.uk/projects/luaexpat
-LUAEXPAT_DEPENDENCIES = lua expat
+LUAEXPAT_DEPENDENCIES = luainterpreter expat
 LUAEXPAT_LICENSE      = MIT
 
 
package/luafilesystem/Config.in +1 -0
index 7c130f8..489ebf3 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUAFILESYSTEM
        bool "luafilesystem"
+       depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
        help
          LuaFileSystem offers a portable way to access
          the underlying directory structure and file attributes.
package/luafilesystem/luafilesystem.mk +1 -1
index 2f7b4d8..edd7203 100644
@@ -6,7 +6,7 @@
 
 LUAFILESYSTEM_VERSION = 1.6.2
 LUAFILESYSTEM_SITE = http://github.com/downloads/keplerproject/luafilesystem
-LUAFILESYSTEM_DEPENDENCIES = lua
+LUAFILESYSTEM_DEPENDENCIES = luainterpreter
 LUAFILESYSTEM_LICENSE = MIT
 
 ifeq ($(BR2_LARGEFILE),y)
package/luainterpreter/Config.in new file +2 -0
new file mode 100644
index 0000000..d85d7e8
@@ -0,0 +1,2 @@
+config BR2_PACKAGE_HAS_LUA_INTERPRETER
+       bool
package/luainterpreter/luainterpreter.mk new file +18 -0
new file mode 100644
index 0000000..5297ccc
@@ -0,0 +1,18 @@
+#############################################################
+#
+# Virtual package for luainterpreter
+#
+#############################################################
+
+LUAINTERPRETER_VERSION = 5.1
+LUAINTERPRETER_SOURCE =
+
+ifeq ($(BR2_PACKAGE_LUA),y)
+LUAINTERPRETER_DEPENDENCIES = lua
+endif
+
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+LUAINTERPRETER_DEPENDENCIES = luajit
+endif
+
+$(eval $(generic-package))
package/luajit/Config.in +1 -0
index 23b2650..97013e4 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUAJIT
        bool "luajit"
+       select BR2_PACKAGE_HAS_LUA_INTERPRETER
        # Luajit is only available for some target architectures, and
        # has some complexity wrt 32/64. See luajit.mk for details.
        depends on BR2_i386 || (BR2_x86_64 && BR2_HOSTARCH='x86_64') || BR2_powerpc || BR2_arm || BR2_armeb
package/luaposix/Config.in +1 -0
index 412e07f..c47db06 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUAPOSIX
        bool "luaposix"
+       depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
        help
          luaposix is a POSIX binding, including curses, for Lua 5.1
          and 5.2; Like most libraries it simply binds to C APIs on
package/luaposix/luaposix.mk +1 -1
index 1d1ee6a..8058f90 100644
@@ -8,7 +8,7 @@ LUAPOSIX_VERSION = 5.1.20
 LUAPOSIX_SITE = https://github.com/downloads/luaposix/luaposix
 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"
 LUAPOSIX_AUTORECONF = YES
 
package/luasec/Config.in +1 -0
index 2d303c1..ed55df7 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_LUASEC
        bool "luasec"
        select BR2_PACKAGE_OPENSSL
        select BR2_PACKAGE_LUASOCKET
+       depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
        help
          LuaSec is a binding for OpenSSL library to provide TLS/SSL
          communication.
package/luasec/luasec.mk +1 -1
index 053309f..3fb7060 100644
@@ -8,7 +8,7 @@ LUASEC_VERSION = 0.4.1
 LUASEC_SITE = http://www.inf.puc-rio.br/~brunoos/luasec/download/
 LUASEC_LICENSE = MIT
 LUASEC_LICENSE_FILES = LICENSE
-LUASEC_DEPENDENCIES = lua openssl
+LUASEC_DEPENDENCIES = luainterpreter openssl
 
 define LUASEC_BUILD_CMDS
        $(MAKE) -C $(@D) CC="$(TARGET_CC)" LD="$(TARGET_CC)" \
package/luasocket/Config.in +1 -0
index 4526303..619d649 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUASOCKET
        bool "luasocket"
+       depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
        help
          LuaSocket is the most comprehensive networking support library
          for the Lua language.
package/luasocket/luasocket.mk +1 -1
index b0c0be5..20ad8bf 100644
@@ -6,7 +6,7 @@
 
 LUASOCKET_VERSION = 2.0.2
 LUASOCKET_SITE = http://luaforge.net/frs/download.php/2664
-LUASOCKET_DEPENDENCIES = lua
+LUASOCKET_DEPENDENCIES = luainterpreter
 LUASOCKET_LICENSE = MIT
 LUASOCKET_LICENSE_FILES = LICENSE
 
package/luasql/Config.in +1 -0
index 4dd011a..96e04fb 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUASQL
        bool "luasql"
+       depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
        help
          LuaSQL is a simple interface from Lua to a DBMS.
 
package/luasql/luasql.mk +1 -1
index 6fbdccc..12fd02c 100644
@@ -8,7 +8,7 @@ LUASQL_VERSION = v2.3.0
 LUASQL_SITE = https://github.com/keplerproject/luasql/tarball/$(LUASQL_VERSION)
 LUASQL_LICENSE = MIT
 LUASQL_LICENSE_FILES = README
-LUASQL_DEPENDENCIES = lua
+LUASQL_DEPENDENCIES = luainterpreter
 
 LUASQL_MAKE_FLAGS = \
        CC="$(TARGET_CC)" \
package/rings/Config.in +1 -0
index d1f1efe..b1d41f3 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_RINGS
        bool "rings"
+       depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
        help
          Provides a way to create new Lua states from within Lua.
 
package/rings/rings.mk +1 -2
index 610ded0..67a4916 100644
@@ -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

#3 lore raw

PATCH v4 1/2 luainterpreter: create virtual package

In reply to Francois Perrad

Hi Francois,

Quoted 43 lines · Francois Perrad

luainterpreter is lua or luajit

---
 package/Config.in                                |    1 +
 package/lbase64/Config.in                        |    1 +
 package/lbase64/lbase64.mk                       |    2 +-
 package/lua-ev/Config.in                         |    1 +
 package/lua-ev/lua-ev.mk                         |    2 +-
 package/lua-msgpack-native/Config.in             |    1 +
 package/lua-msgpack-native/lua-msgpack-native.mk |    2 +-
 package/lua/Config.in                            |    1 +
 package/luacjson/Config.in                       |    1 +
 package/luacjson/luacjson.mk                     |    2 +-
 package/luaexpat/Config.in                       |    1 +
 package/luaexpat/luaexpat.mk                     |    2 +-
 package/luafilesystem/Config.in                  |    1 +
 package/luafilesystem/luafilesystem.mk           |    2 +-
 package/luainterpreter/Config.in                 |    2 ++
 package/luainterpreter/luainterpreter.mk         |   18 ++++++++++++++++++
 package/luajit/Config.in                         |    1 +
 package/luaposix/Config.in                       |    1 +
 package/luaposix/luaposix.mk                     |    2 +-
 package/luasec/Config.in                         |    1 +
 package/luasec/luasec.mk                         |    2 +-
 package/luasocket/Config.in                      |    1 +
 package/luasocket/luasocket.mk                   |    2 +-
 package/luasql/Config.in                         |    1 +
 package/luasql/luasql.mk                         |    2 +-
 package/rings/Config.in                          |    1 +
 package/rings/rings.mk                           |    2 +-
 27 files changed, 45 insertions(+), 11 deletions(-)
 create mode 100644 package/luainterpreter/Config.in
 create mode 100644 package/luainterpreter/luainterpreter.mk

[...]

package/luainterpreter/luainterpreter.mk new file +0 -0
new file mode 100644
index 0000000..5297ccc

package/luainterpreter/luainterpreter.mk line 7

Quoted 7 lines
package/luainterpreter/luainterpreter.mk new file +7 -0
@@ -0,0 +1,18 @@
+#############################################################
+#
+# Virtual package for luainterpreter
+#
+#############################################################
+
+LUAINTERPRETER_VERSION = 5.1

I was curious on your choice of version number for the virtual package. Is this intended to be used for API compatibility checks?

The reason that I'm asking is that I'm going to need to upgrade a project to Lua 5.2. There are enough API differences between Lua 5.1 and 5.2 that it would be useful to use your patch set and add Lua 5.2 as another luainterpreter. Using LUAINTERPRETER_VERSION sounds like one way of checking Lua API compatibility in other projects. Or did you have other thoughts?

Also, any word on the status of your patches?

Thanks,
Frank

Quoted 150 lines
package/luainterpreter/luainterpreter.mk new file +11 -0
+LUAINTERPRETER_SOURCE =
+
+ifeq ($(BR2_PACKAGE_LUA),y)
+LUAINTERPRETER_DEPENDENCIES = lua
+endif
+
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+LUAINTERPRETER_DEPENDENCIES = luajit
+endif
+
+$(eval $(generic-package))
package/luajit/Config.in +1 -0
index 23b2650..97013e4 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUAJIT
        bool "luajit"
+       select BR2_PACKAGE_HAS_LUA_INTERPRETER
        # Luajit is only available for some target architectures, and
        # has some complexity wrt 32/64. See luajit.mk for details.
        depends on BR2_i386 || (BR2_x86_64 && BR2_HOSTARCH='x86_64') || BR2_powerpc || BR2_arm || BR2_armeb
package/luaposix/Config.in +1 -0
index 412e07f..c47db06 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUAPOSIX
        bool "luaposix"
+       depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
        help
          luaposix is a POSIX binding, including curses, for Lua 5.1
          and 5.2; Like most libraries it simply binds to C APIs on
package/luaposix/luaposix.mk +1 -1
index 1d1ee6a..8058f90 100644
@@ -8,7 +8,7 @@ LUAPOSIX_VERSION = 5.1.20
 LUAPOSIX_SITE = https://github.com/downloads/luaposix/luaposix
 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"
 LUAPOSIX_AUTORECONF = YES
 
package/luasec/Config.in +1 -0
index 2d303c1..ed55df7 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_LUASEC
        bool "luasec"
        select BR2_PACKAGE_OPENSSL
        select BR2_PACKAGE_LUASOCKET
+       depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
        help
          LuaSec is a binding for OpenSSL library to provide TLS/SSL
          communication.
package/luasec/luasec.mk +1 -1
index 053309f..3fb7060 100644
@@ -8,7 +8,7 @@ LUASEC_VERSION = 0.4.1
 LUASEC_SITE = http://www.inf.puc-rio.br/~brunoos/luasec/download/
 LUASEC_LICENSE = MIT
 LUASEC_LICENSE_FILES = LICENSE
-LUASEC_DEPENDENCIES = lua openssl
+LUASEC_DEPENDENCIES = luainterpreter openssl
 
 define LUASEC_BUILD_CMDS
        $(MAKE) -C $(@D) CC="$(TARGET_CC)" LD="$(TARGET_CC)" \
package/luasocket/Config.in +1 -0
index 4526303..619d649 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUASOCKET
        bool "luasocket"
+       depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
        help
          LuaSocket is the most comprehensive networking support library
          for the Lua language.
package/luasocket/luasocket.mk +1 -1
index b0c0be5..20ad8bf 100644
@@ -6,7 +6,7 @@
 
 LUASOCKET_VERSION = 2.0.2
 LUASOCKET_SITE = http://luaforge.net/frs/download.php/2664
-LUASOCKET_DEPENDENCIES = lua
+LUASOCKET_DEPENDENCIES = luainterpreter
 LUASOCKET_LICENSE = MIT
 LUASOCKET_LICENSE_FILES = LICENSE
 
package/luasql/Config.in +1 -0
index 4dd011a..96e04fb 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LUASQL
        bool "luasql"
+       depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
        help
          LuaSQL is a simple interface from Lua to a DBMS.
 
package/luasql/luasql.mk +1 -1
index 6fbdccc..12fd02c 100644
@@ -8,7 +8,7 @@ LUASQL_VERSION = v2.3.0
 LUASQL_SITE = https://github.com/keplerproject/luasql/tarball/$(LUASQL_VERSION)
 LUASQL_LICENSE = MIT
 LUASQL_LICENSE_FILES = README
-LUASQL_DEPENDENCIES = lua
+LUASQL_DEPENDENCIES = luainterpreter
 
 LUASQL_MAKE_FLAGS = \
        CC="$(TARGET_CC)" \
package/rings/Config.in +1 -0
index d1f1efe..b1d41f3 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_RINGS
        bool "rings"
+       depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
        help
          Provides a way to create new Lua states from within Lua.
 
package/rings/rings.mk +1 -2
index 610ded0..67a4916 100644
@@ -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

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#4 lore raw

PATCH v4 1/2 luainterpreter: create virtual package

Dear Frank Hunleth,

Quoted 11 lines · Frank Hunleth

package/luainterpreter/luainterpreter.mk line 7

Quoted 7 lines
package/luainterpreter/luainterpreter.mk new file +7 -0
+#############################################################
+#
+# Virtual package for luainterpreter
+#
+#############################################################
+
+LUAINTERPRETER_VERSION = 5.1

I was curious on your choice of version number for the virtual package. Is this intended to be used for API compatibility checks?

Quoted 8 lines

The reason that I'm asking is that I'm going to need to upgrade a project to Lua 5.2. There are enough API differences between Lua 5.1 and 5.2 that it would be useful to use your patch set and add Lua 5.2 as another luainterpreter. Using LUAINTERPRETER_VERSION sounds like one way of checking Lua API compatibility in other projects. Or did you have other thoughts?

Also, any word on the status of your patches?

Having a "version" attached to a virtual package does not make sense, I believe.

If there are several incompatible versions of Lua that need to be supported in Buildroot, then they must be packaged as separate
packages: lua, lua52 for example, like we're doing for python vs. python4 and qt vs. qt5.

A virtual package should remain only have as dependencies packages that provide the same API, i.e that interchangeable.

(Note: I have no knowledge about Lua specifically, those statements are generic Buildroot rules.)

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH v4 1/2 luainterpreter: create virtual package

2013/9/30 Thomas Petazzoni <[email protected]>:

Quoted 15 lines

Dear Frank Hunleth,

Quoted 11 lines · Frank Hunleth

package/luainterpreter/luainterpreter.mk line 7

Quoted 7 lines
package/luainterpreter/luainterpreter.mk new file +7 -0
+#############################################################
+#
+# Virtual package for luainterpreter
+#
+#############################################################
+
+LUAINTERPRETER_VERSION = 5.1

I was curious on your choice of version number for the virtual package. Is this intended to be used for API compatibility checks?

A version for a virtual package is not mandatory.
A virtual package is used to create a OR dependency.
With luainterpreter, a Lua module (LuaSocket for example) depends on lua OR on luajit.
Both Lua 5.1.5 and LuaJIT 2.0.2 provides a Lua 5.1 ABI/API compatible interpreter.
The only effect of setting LUAINTERPRETER_VERSION is the name of the directory 'build/luainterpreter-5.1' instead of 'build/luainterpreter-undefined'.

I don't like name containing 'undefined', but I'll be fine with a BR convention what says :
- all virtual packages use 'virtual' as version.

I've already did some experiments with the Lua 5.2 serie in my own repository, see https://github.com/fperrad/br/tree/lua5.2

Fran?ois

Quoted 34 lines
Quoted 8 lines

The reason that I'm asking is that I'm going to need to upgrade a project to Lua 5.2. There are enough API differences between Lua 5.1 and 5.2 that it would be useful to use your patch set and add Lua 5.2 as another luainterpreter. Using LUAINTERPRETER_VERSION sounds like one way of checking Lua API compatibility in other projects. Or did you have other thoughts?

Also, any word on the status of your patches?

Having a "version" attached to a virtual package does not make sense, I believe.

If there are several incompatible versions of Lua that need to be supported in Buildroot, then they must be packaged as separate
packages: lua, lua52 for example, like we're doing for python vs. python4 and qt vs. qt5.

A virtual package should remain only have as dependencies packages that provide the same API, i.e that interchangeable.

(Note: I have no knowledge about Lua specifically, those statements are generic Buildroot rules.)

Best regards,

Thomas
--
Thomas Petazzoni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#6 lore raw

PATCH v4 1/2 luainterpreter: create virtual package

Dear Fran?ois Perrad,

Quoted 9 lines · Fran?ois Perrad

A version for a virtual package is not mandatory.
A virtual package is used to create a OR dependency.
With luainterpreter, a Lua module (LuaSocket for example) depends on lua OR on luajit.
Both Lua 5.1.5 and LuaJIT 2.0.2 provides a Lua 5.1 ABI/API compatible interpreter.
The only effect of setting LUAINTERPRETER_VERSION is the name of the directory 'build/luainterpreter-5.1' instead of 'build/luainterpreter-undefined'.

Ok, makes sense.

Quoted 3 lines

I don't like name containing 'undefined', but I'll be fine with a BR convention what says :
- all virtual packages use 'virtual' as version.

I probably haven't thought about all the implications, but it indeed looks like an interesting suggestion. Virtual packages are anyway something that we should progressively formalize through a new section in the documentation.

Quoted 2 lines

I've already did some experiments with the Lua 5.2 serie in my own repository, see https://github.com/fperrad/br/tree/lua5.2

So should we package Lua 5.1 and 5.2 separately, because Lua modules are only compatible with 5.1 or 5.2, or can we keep the same package for both Lua versions?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#7 lore raw

2013/10/1 Thomas Petazzoni <[email protected]>:

Quoted 25 lines

Dear Fran?ois Perrad,

Quoted 9 lines · Fran?ois Perrad

A version for a virtual package is not mandatory.
A virtual package is used to create a OR dependency.
With luainterpreter, a Lua module (LuaSocket for example) depends on lua OR on luajit.
Both Lua 5.1.5 and LuaJIT 2.0.2 provides a Lua 5.1 ABI/API compatible interpreter.
The only effect of setting LUAINTERPRETER_VERSION is the name of the directory 'build/luainterpreter-5.1' instead of 'build/luainterpreter-undefined'.

Ok, makes sense.

Quoted 3 lines

I don't like name containing 'undefined', but I'll be fine with a BR convention what says :
- all virtual packages use 'virtual' as version.

I probably haven't thought about all the implications, but it indeed looks like an interesting suggestion. Virtual packages are anyway something that we should progressively formalize through a new section in the documentation.

Quoted 7 lines
Quoted 2 lines

I've already did some experiments with the Lua 5.2 serie in my own repository, see https://github.com/fperrad/br/tree/lua5.2

So should we package Lua 5.1 and 5.2 separately, because Lua modules are only compatible with 5.1 or 5.2, or can we keep the same package for both Lua versions?

Lua 5.2.0 was released on December 2011 (see
https://raw.github.com/fperrad/graph-versions/gh-pages/slides/lua.png).
Since this, Lua module authors release new version which are compatible 5.1 and 5.2 (not a hard job, differences are small). But this process is not fast and not finished.

So, I think Lua 5.1.x and 5.2.x can be handled by the same package with a choice (like gcc, binutils)

Fran?ois

Quoted 7 lines

Thanks!

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

#8 lore raw

Dear Fran?ois Perrad,

Quoted 8 lines · Fran?ois Perrad

Lua 5.2.0 was released on December 2011 (see
https://raw.github.com/fperrad/graph-versions/gh-pages/slides/lua.png).
Since this, Lua module authors release new version which are compatible 5.1 and 5.2 (not a hard job, differences are small). But this process is not fast and not finished.

So, I think Lua 5.1.x and 5.2.x can be handled by the same package with a choice (like gcc, binutils)

Ok. But then Lua packages that are not yet compatible with 5.2.x will have to be marked "depends on !BR2_PACKAGE_LUA_5_2". Is this what you had in mind?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#9 lore raw

2013/10/1 Thomas Petazzoni <[email protected]>:

Quoted 10 lines

Dear Fran?ois Perrad,

Quoted 6 lines · Fran?ois Perrad

Lua 5.2.0 was released on December 2011 (see
https://raw.github.com/fperrad/graph-versions/gh-pages/slides/lua.png).
Since this, Lua module authors release new version which are compatible 5.1 and 5.2 (not a hard job, differences are small). But this process is not fast and not finished.

Quoted 6 lines
Quoted 2 lines

So, I think Lua 5.1.x and 5.2.x can be handled by the same package with a choice (like gcc, binutils)

Ok. But then Lua packages that are not yet compatible with 5.2.x will have to be marked "depends on !BR2_PACKAGE_LUA_5_2". Is this what you had in mind?

Yes.

Fran?ois

Quoted 8 lines

Thanks!

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

#10 lore raw

Dear Fran?ois Perrad,

Quoted 8 lines · Fran?ois Perrad
Quoted 6 lines
Quoted 2 lines

So, I think Lua 5.1.x and 5.2.x can be handled by the same package with a choice (like gcc, binutils)

Ok. But then Lua packages that are not yet compatible with 5.2.x will have to be marked "depends on !BR2_PACKAGE_LUA_5_2". Is this what you had in mind?

Yes.

Sounds good to me, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com