+++ /dev/null
--- BR cross-compilation
-local function getenv (name) return os_getenv(name) or '' end
-external_deps_dirs = { getenv('STAGING_DIR') .. [[/usr]] }
-gcc_rpath = false
-wrap_bin_scripts = false
+++ /dev/null
--- BR host compilation
-local function getenv (name) return os_getenv(name) or '' end
-external_deps_dirs = { getenv('HOST_DIR') }
define HOST_LUAROCKS_INSTALL_CMDS
rm -f $(LUAROCKS_CONFIG_FILE_DEFAULT)
$(MAKE1) -C $(@D) install
- cat $(LUAROCKS_CONFIG_FILE_DEFAULT) $(HOST_LUAROCKS_PKGDIR)/luarocks-br-config.lua \
- > $(LUAROCKS_CONFIG_FILE)
- cat $(LUAROCKS_CONFIG_FILE_DEFAULT) $(HOST_LUAROCKS_PKGDIR)/luarocks-br-host-config.lua \
- > $(HOST_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
LUAROCKS_CONFIG=$$(LUAROCKS_CONFIG_FILE) \
$$(LUAROCKS_RUN_CMD) make --keep --deps-mode none \
--tree "$$(TARGET_DIR)/usr" \
+ DEPS_DIR="$$(STAGING_DIR)/usr" \
LUA_INCDIR="$$(STAGING_DIR)/usr/include" \
LUA_LIBDIR="$$(STAGING_DIR)/usr/lib" \
CC=$$(TARGET_CC) \
cd $$($(2)_SRCDIR) && \
LUAROCKS_CONFIG=$$(HOST_LUAROCKS_CONFIG_FILE) \
$$(LUAROCKS_RUN_CMD) make --keep --deps-mode none \
+ DEPS_DIR="$$(HOST_DIR)" \
CFLAGS="$$(HOST_LUAROCKS_CFLAGS)" \
LIBFLAG="-shared $$(HOST_LDFLAGS)" \
$$($(2)_BUILD_OPTS) $$($(2)_ROCKSPEC)