summaryrefslogtreecommitdiff
path: root/package/luarocks
diff options
context:
space:
mode:
authorFrancois Perrad <fperrad@gmail.com>2014-07-19 16:38:57 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-07-27 10:44:50 +0200
commit513b1b9b7525a4444637210148fd58350a223cc2 (patch)
tree17590e0349ee7b3d677aa3e5e53354a96799f310 /package/luarocks
parentf93de3fb20469d16d54db83be647c3bdf1f57dee (diff)
luarocks: allow to work with host-luainterpreter
when we embed luajit on target, we use luarocks with host-luajit instead of host-lua, in order to use the same interpreter on the both side. Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/luarocks')
-rw-r--r--package/luarocks/luarocks.mk18
1 files changed, 12 insertions, 6 deletions
diff --git a/package/luarocks/luarocks.mk b/package/luarocks/luarocks.mk
index 5f7f3952e..80b9e9fb6 100644
--- a/package/luarocks/luarocks.mk
+++ b/package/luarocks/luarocks.mk
@@ -9,16 +9,22 @@ LUAROCKS_SITE = http://luarocks.org/releases/
LUAROCKS_LICENSE = MIT
LUAROCKS_LICENSE_FILES = COPYING
-HOST_LUAROCKS_DEPENDENCIES = host-lua
+HOST_LUAROCKS_DEPENDENCIES = host-luainterpreter
LUAROCKS_CONFIG_DIR = $(HOST_DIR)/usr/etc/luarocks
LUAROCKS_CONFIG_FILE = $(LUAROCKS_CONFIG_DIR)/config-$(LUAINTERPRETER_ABIVER).lua
+HOST_LUAROCKS_CONF_OPT = \
+ --prefix=$(HOST_DIR)/usr \
+ --sysconfdir=$(LUAROCKS_CONFIG_DIR) \
+ --with-lua=$(HOST_DIR)/usr
+
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+HOST_LUAROCKS_CONF_OPT += --lua-suffix=jit
+endif
+
define HOST_LUAROCKS_CONFIGURE_CMDS
- cd $(@D) && ./configure \
- --prefix=$(HOST_DIR)/usr \
- --sysconfdir=$(LUAROCKS_CONFIG_DIR) \
- --with-lua=$(HOST_DIR)/usr
+ cd $(@D) && ./configure $(HOST_LUAROCKS_CONF_OPT)
endef
define HOST_LUAROCKS_INSTALL_CMDS
@@ -44,4 +50,4 @@ endef
$(eval $(host-generic-package))
LUAROCKS_RUN = LUA_PATH="$(HOST_DIR)/usr/share/lua/$(LUAINTERPRETER_ABIVER)/?.lua" \
- $(HOST_DIR)/usr/bin/lua $(HOST_DIR)/usr/bin/luarocks
+ $(LUA_RUN) $(HOST_DIR)/usr/bin/luarocks