From be3bcda92af173d46f24f51e6bc2aaaa4e78324a Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 31 Jan 2020 18:00:37 +0100 Subject: [PATCH] luarocks: fix site config for host build The host utility is used to build other lua modules for the target. For that, the site config needs to specify the correct arch/system type. Use target dependent build/staging dirs to avoid issue when switching between targets Signed-off-by: Felix Fietkau --- lang/luarocks/Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lang/luarocks/Makefile b/lang/luarocks/Makefile index 5ddc4328a..4c21e5c36 100644 --- a/lang/luarocks/Makefile +++ b/lang/luarocks/Makefile @@ -26,6 +26,9 @@ PKG_BUILD_DEPENDS:=lua/host HOST_BUILD_DEPENDS:=$(PKG_BUILD_DEPENDS) HOST_BUILD_PARALLEL:=1 +HOST_BUILD_PREFIX:=$(STAGING_DIR)/host +HOST_BUILD_DIR:=$(BUILD_DIR)/host/$(PKG_NAME)-$(PKG_VERSION) + include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk @@ -49,14 +52,18 @@ CONFIGURE_ARGS = \ --with-lua=$(STAGING_DIR_HOSTPKG) HOST_CONFIGURE_ARGS= \ - --prefix=$(STAGING_DIR_HOSTPKG) \ - --sysconfdir=$(STAGING_DIR_HOSTPKG)/etc \ + --prefix=$(STAGING_DIR)/host \ + --sysconfdir=$(STAGING_DIR)/host/etc \ --with-lua=$(STAGING_DIR_HOSTPKG) CONFIGURE_VARS = \ LUAROCKS_UNAME_S="Linux" \ LUAROCKS_UNAME_M="$(ARCH)" +HOST_CONFIGURE_VARS = \ + LUAROCKS_UNAME_S="Linux" \ + LUAROCKS_UNAME_M="$(ARCH)" + define Build/Compile $(call Build/Compile/Default,build) endef