source "package/jamvm/Config.in"
source "package/jimtcl/Config.in"
source "package/lua/Config.in"
+source "package/luainterpreter/Config.in"
source "package/luajit/Config.in"
-if BR2_PACKAGE_LUA || BR2_PACKAGE_LUAJIT
+if BR2_PACKAGE_HAS_LUA_INTERPRETER
menu "Lua libraries/modules"
source "package/cgilua/Config.in"
source "package/copas/Config.in"
config BR2_PACKAGE_LBASE64
bool "lbase64"
+ depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
help
A base64 library for Lua
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) \
config BR2_PACKAGE_LUA_EV
bool "lua-ev"
+ depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
select BR2_PACKAGE_LIBEV
depends on !(BR2_avr32 || BR2_bfin) # libev
help
LUA_EV_VERSION = 458165bdfe0c6eadc788813925f11a0e6a823845
LUA_EV_SITE = $(call github,brimworks,lua-ev,$(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"
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
LUA_MSGPACK_NATIVE_VERSION = 41cce91ab6b54e4426c6d626a0ac41a02ec2096d
LUA_MSGPACK_NATIVE_SITE = $(call github,kengonakajima,lua-msgpack-native,$(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
config BR2_PACKAGE_LUA
bool "lua"
+ select BR2_PACKAGE_HAS_LUA_INTERPRETER
help
Lua is a powerful, fast, light-weight, embeddable scripting language.
if BR2_PACKAGE_LUA
+config BR2_PACKAGE_PROVIDES_LUA_INTERPRETER
+ default "lua"
+
choice
prompt "Lua Interpreter command-line editing"
default BR2_PACKAGE_LUA_INTERPRETER_EDITING_NONE
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
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
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.
LUAEXPAT_VERSION = 1.2.0
LUAEXPAT_SITE = http://matthewwild.co.uk/projects/luaexpat
-LUAEXPAT_DEPENDENCIES = lua expat
+LUAEXPAT_DEPENDENCIES = luainterpreter expat
LUAEXPAT_LICENSE = MIT
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.
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)
--- /dev/null
+config BR2_PACKAGE_HAS_LUA_INTERPRETER
+ bool
+
+config BR2_PACKAGE_PROVIDES_LUA_INTERPRETER
+ string
+ depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
--- /dev/null
+#############################################################
+#
+# luainterpreter
+#
+#############################################################
+
+LUAINTERPRETER_SOURCE =
+LUAINTERPRETER_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_LUA_INTERPRETER))
+
+$(eval $(generic-package))
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
deployed as a drop-in replacement.
http://luajit.org/
+
+if BR2_PACKAGE_LUAJIT
+
+config BR2_PACKAGE_PROVIDES_LUA_INTERPRETER
+ default "luajit"
+
+endif
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
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)
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.
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)" \
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.
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
config BR2_PACKAGE_LUASQL
bool "luasql"
+ depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
help
LuaSQL is a simple interface from Lua to a DBMS.
LUASQL_SITE = $(call github,keplerproject,luasql,$(LUASQL_VERSION))
LUASQL_LICENSE = MIT
LUASQL_LICENSE_FILES = README
-LUASQL_DEPENDENCIES = lua
+LUASQL_DEPENDENCIES = luainterpreter
LUASQL_MAKE_FLAGS = \
CC="$(TARGET_CC)" \
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.
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