lua-modules: choice between Lua 5.1.x & Lua 5.2.x
authorFrancois Perrad <fperrad@gmail.com>
Fri, 17 Jan 2014 17:47:36 +0000 (18:47 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 21 Jan 2014 22:27:50 +0000 (23:27 +0100)
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/lbase64/Config.in
package/lua-ev/lua-ev.mk
package/lua-msgpack-native/Config.in
package/lua-msgpack-native/lua-msgpack-native.mk
package/luaexpat/Config.in
package/luaexpatutils/Config.in
package/luaexpatutils/luaexpatutils.mk
package/luaposix/Config.in
package/luaposix/luaposix.mk
package/luarocks/luarocks.mk
package/luasec/Config.in

index ca9dd5dac2e7b562a45eb744829489d740f6bb90..4593ab9693945e59fcf01a6966979e225b533121 100644 (file)
@@ -1,7 +1,11 @@
 config BR2_PACKAGE_LBASE64
        bool "lbase64"
        depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+       depends on !BR2_PACKAGE_LUA_5_2
        help
          A base64 library for Lua
 
          http://luaforge.net/projects/lbase64/
+
+comment "lbase64 needs a Lua 5.1 interpreter"
+       depends on BR2_PACKAGE_LUA_5_2
index 1236d77d73cbc74ce60711d985f022f61de5f668..1b10a80fa2ea9c195d834caaa6fc1bfc2043dc70 100644 (file)
@@ -9,6 +9,6 @@ LUA_EV_SITE = $(call github,brimworks,lua-ev,$(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/5.1"
+LUA_EV_CONF_OPT = -DINSTALL_CMOD="/usr/lib/lua/$(LUAINTERPRETER_ABIVER)"
 
 $(eval $(cmake-package))
index 1014298c78224443875c50e5473ddb3b5bdb750c..498b30cb2b3d00e8a58f47f31b21da93586fc10e 100644 (file)
@@ -1,8 +1,12 @@
 config BR2_PACKAGE_LUA_MSGPACK_NATIVE
        bool "lua-msgpack-native"
        depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+       depends on !BR2_PACKAGE_LUA_5_2
        help
          This is a native, C language implementation of msgpack
          (http://msgpack.org) library/protocol for Lua language
 
          https://github.com/kengonakajima/lua-msgpack-native
+
+comment "lua-msgpack-native needs a Lua 5.1 interpreter"
+       depends on BR2_PACKAGE_LUA_5_2
index d4547aef6a8f6c776ee8f78e80abd9dc0db040d4..ceb453dc117ca345d95af1fc0474ace4343ae678 100644 (file)
@@ -15,7 +15,8 @@ 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/5.1/msgpack.so
+       $(INSTALL) -m 755 -D $(@D)/msgpack.so \
+               $(TARGET_DIR)/usr/lib/lua/$(LUAINTERPRETER_ABIVER)/msgpack.so
 endef
 
 $(eval $(generic-package))
index f8db318e828832974e36218d480f6947a38616ec..3394780c70c8fbe70e0bff9dc0bfd159fbcdfef3 100644 (file)
@@ -2,7 +2,11 @@ config BR2_PACKAGE_LUAEXPAT
        bool "luaexpat"
        select BR2_PACKAGE_EXPAT
        depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+       depends on !BR2_PACKAGE_LUA_5_2
        help
          LuaExpat is a SAX XML parser based on the Expat library.
 
          http://matthewwild.co.uk/projects/luaexpat/
+
+comment "luaexpat needs a Lua 5.1 interpreter"
+       depends on BR2_PACKAGE_LUA_5_2
index cb2887acaab3bc0d15148ca5cdfa0119f1785320..333f98dc32fcddf8e00e1c82f46bdc76457b6a34 100644 (file)
@@ -1,8 +1,12 @@
 config BR2_PACKAGE_LUAEXPATUTILS
        bool "luaexpatutils"
        select BR2_PACKAGE_LUAEXPAT
+       depends on !BR2_PACKAGE_LUA_5_2
        help
          lxp.doc is a module that provides useful features for working with
          XML formats in LOM format as used by the LuaExpat project from Kepler.
 
          https://github.com/stevedonovan/LuaExpatUtils
+
+comment "luaexpatutils needs a Lua 5.1 interpreter"
+       depends on BR2_PACKAGE_LUA_5_2
index 93cf6219555e8fa2a808bbcc7d62b856ad743545..9bfc6547166596f6b6812f1149239deecd95164c 100644 (file)
@@ -11,7 +11,7 @@ LUAEXPATUTILS_DEPENDENCIES = luaexpat
 
 define LUAEXPATUTILS_INSTALL_TARGET_CMDS
        $(INSTALL) -m 0644 -D $(@D)/lua/doc.lua \
-               $(TARGET_DIR)/usr/share/lua/5.1/lxp/doc.lua
+               $(TARGET_DIR)/usr/share/lua/$(LUAINTERPRETER_ABIVER)/lxp/doc.lua
 endef
 
 $(eval $(generic-package))
index cad6fe976a90c00a443f5150150524b804f67dc2..a95c8259ff9dc43c2df5ea720432954d2a225b98 100644 (file)
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_LUAPOSIX
        bool "luaposix"
        depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
-       select BR2_PACKAGE_LUABITOP if BR2_PACKAGE_LUA
+       select BR2_PACKAGE_LUABITOP if BR2_PACKAGE_LUA_5_1
        # LuaBitOp is already included in LuaJIT
        help
          luaposix is a POSIX binding, including curses, for Lua 5.1
index b018995d9e9f83d5726b24daa938d3b83c162d4a..77f5e6290e90d48180d5057c99d62c5ef1d7f9a4 100644 (file)
@@ -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/5.1" --datarootdir="/usr/share/lua/5.1"
+LUAPOSIX_CONF_OPT = --libdir="/usr/lib/lua/$(LUAINTERPRETER_ABIVER)" --datarootdir="/usr/share/lua/$(LUAINTERPRETER_ABIVER)"
 
 ifeq ($(BR2_PACKAGE_NCURSES),y)
     LUAPOSIX_DEPENDENCIES += ncurses
index 6cfd92e4cf1cd6450df4e2675a297e97fb712b82..88ab22a1889edae97e741a0f8ff01e06197cb3a4 100644 (file)
@@ -12,7 +12,7 @@ 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
+LUAROCKS_CONFIG_FILE = $(LUAROCKS_CONFIG_DIR)/config-$(LUAINTERPRETER_ABIVER).lua
 
 define HOST_LUAROCKS_CONFIGURE_CMDS
        cd $(@D) && ./configure \
@@ -41,5 +41,5 @@ endef
 
 $(eval $(host-generic-package))
 
-LUAROCKS_RUN = LUA_PATH="$(HOST_DIR)/usr/share/lua/5.1/?.lua" \
+LUAROCKS_RUN = LUA_PATH="$(HOST_DIR)/usr/share/lua/$(LUAINTERPRETER_ABIVER)/?.lua" \
        $(HOST_DIR)/usr/bin/lua $(HOST_DIR)/usr/bin/luarocks
index ed55df73ae866e8ee11881276bcf38f8d82b3179..48aa7662b9f93d775490fb267fffb6341cf5d5a8 100644 (file)
@@ -3,8 +3,12 @@ config BR2_PACKAGE_LUASEC
        select BR2_PACKAGE_OPENSSL
        select BR2_PACKAGE_LUASOCKET
        depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+       depends on !BR2_PACKAGE_LUA_5_2
        help
          LuaSec is a binding for OpenSSL library to provide TLS/SSL
          communication.
 
          http://www.inf.puc-rio.br/~brunoos/luasec/
+
+comment "luasec needs a Lua 5.1 interpreter"
+       depends on BR2_PACKAGE_LUA_5_2