mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@26c91a9
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LUAROCKS_VERSION = 3.1.3
|
||||
LUAROCKS_VERSION = 3.4.0
|
||||
LUAROCKS_SITE = http://luarocks.org/releases
|
||||
LUAROCKS_LICENSE = MIT
|
||||
LUAROCKS_LICENSE_FILES = COPYING
|
||||
@@ -12,11 +12,9 @@ LUAROCKS_LICENSE_FILES = COPYING
|
||||
HOST_LUAROCKS_DEPENDENCIES = host-luainterpreter
|
||||
|
||||
LUAROCKS_CONFIG_DIR = $(HOST_DIR)/etc
|
||||
LUAROCKS_CONFIG_FILE = $(LUAROCKS_CONFIG_DIR)/luarocks/config-$(LUAINTERPRETER_ABIVER).lua
|
||||
LUAROCKS_CFLAGS = $(TARGET_CFLAGS) -fPIC
|
||||
ifeq ($(BR2_PACKAGE_LUA_5_3),y)
|
||||
LUAROCKS_CFLAGS += -DLUA_COMPAT_5_2
|
||||
endif
|
||||
LUAROCKS_CONFIG_FILE_DEFAULT = $(LUAROCKS_CONFIG_DIR)/luarocks/config-$(LUAINTERPRETER_ABIVER).lua
|
||||
LUAROCKS_CONFIG_FILE = $(LUAROCKS_CONFIG_DIR)/luarocks/config.lua
|
||||
HOST_LUAROCKS_CONFIG_FILE = $(LUAROCKS_CONFIG_DIR)/luarocks/host-config.lua
|
||||
|
||||
define LUAROCKS_ADDON_EXTRACT
|
||||
mkdir $(@D)/src/luarocks/cmd/external
|
||||
@@ -34,20 +32,18 @@ define HOST_LUAROCKS_CONFIGURE_CMDS
|
||||
endef
|
||||
|
||||
define HOST_LUAROCKS_INSTALL_CMDS
|
||||
rm -f $(LUAROCKS_CONFIG_FILE)
|
||||
rm -f $(LUAROCKS_CONFIG_FILE_DEFAULT)
|
||||
$(MAKE1) -C $(@D) install
|
||||
cat $(HOST_LUAROCKS_PKGDIR)/luarocks-br-config.lua >> $(LUAROCKS_CONFIG_FILE)
|
||||
cp $(LUAROCKS_CONFIG_FILE_DEFAULT) $(LUAROCKS_CONFIG_FILE)
|
||||
echo "-- BR cross-compilation" >> $(LUAROCKS_CONFIG_FILE)
|
||||
echo "gcc_rpath = false" >> $(LUAROCKS_CONFIG_FILE)
|
||||
echo "wrap_bin_scripts = false" >> $(LUAROCKS_CONFIG_FILE)
|
||||
cp $(LUAROCKS_CONFIG_FILE_DEFAULT) $(HOST_LUAROCKS_CONFIG_FILE)
|
||||
rm -f $(LUAROCKS_CONFIG_FILE_DEFAULT)
|
||||
endef
|
||||
|
||||
$(eval $(host-generic-package))
|
||||
|
||||
LUAROCKS_RUN_ENV = \
|
||||
LUA_PATH="$(HOST_DIR)/share/lua/$(LUAINTERPRETER_ABIVER)/?.lua" \
|
||||
TARGET_CC="$(TARGET_CC)" \
|
||||
TARGET_CFLAGS="$(LUAROCKS_CFLAGS)" \
|
||||
TARGET_LDFLAGS="$(TARGET_LDFLAGS)"
|
||||
LUAROCKS_RUN_CMD = $(LUA_RUN) $(HOST_DIR)/bin/luarocks
|
||||
|
||||
define LUAROCKS_FINALIZE_TARGET
|
||||
rm -rf $(TARGET_DIR)/usr/lib/luarocks
|
||||
endef
|
||||
|
||||
Reference in New Issue
Block a user