|
|
@ -10,27 +10,34 @@ LUA_DIR = lua-$(LUA_VERSION) |
|
|
|
LUA_SOURCE = lua-$(LUA_VERSION).tar.gz |
|
|
|
LUA_SITE = https://www.lua.org |
|
|
|
|
|
|
|
$(DL_DIR)/$(LUA_SOURCE): |
|
|
|
$(download) $(LUA_SITE)/ftp/$(LUA_SOURCE) |
|
|
|
|
|
|
|
LUA_DEPENDENCIES = ncurses |
|
|
|
|
|
|
|
lua: $(LUA_DEPENDENCIES) $(DL_DIR)/$(LUA_SOURCE) | $(TARGET_DIR) |
|
|
|
$(REMOVE)/$(LUA_DIR) |
|
|
|
$(UNTAR)/$(LUA_SOURCE) |
|
|
|
$(call APPLY_PATCHES,$(PKG_PATCHES_DIR)) |
|
|
|
$(CHDIR)/$(LUA_DIR); \
|
|
|
|
$(MAKE) linux \
|
|
|
|
LUA_MAKE_ARGS = \
|
|
|
|
linux |
|
|
|
|
|
|
|
LUA_MAKE_OPTS = \
|
|
|
|
PKG_VERSION=$(LUA_VERSION) \
|
|
|
|
$(TARGET_CONFIGURE_ENVIRONMENT) \
|
|
|
|
AR="$(TARGET_AR) rcu" \
|
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
|
|
|
; \
|
|
|
|
$(MAKE) install INSTALL_TOP=$(TARGET_prefix) INSTALL_MAN=$(TARGET_DIR)$(REMOVE_man1dir); \
|
|
|
|
$(MAKE) pc INSTALL_TOP=$(TARGET_prefix) > $(TARGET_libdir)/pkgconfig/lua.pc |
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" |
|
|
|
|
|
|
|
LUA_MAKE_INSTALL_OPTS = \
|
|
|
|
INSTALL_TOP=$(TARGET_prefix) \
|
|
|
|
INSTALL_MAN=$(TARGET_DIR)$(REMOVE_man1dir) |
|
|
|
|
|
|
|
define LUA_MAKE_PC |
|
|
|
$(CHDIR)/$($(PKG)_DIR); \
|
|
|
|
$($(PKG)_MAKE) pc INSTALL_TOP=$(TARGET_prefix) > $(TARGET_libdir)/pkgconfig/lua.pc |
|
|
|
endef |
|
|
|
LUA_POST_COMPILE_HOOKS += LUA_MAKE_PC |
|
|
|
|
|
|
|
define LUA_TARGET_CLEANUP |
|
|
|
$(TARGET_RM) $(TARGET_bindir)/luac |
|
|
|
$(REMOVE)/$(LUA_DIR) |
|
|
|
$(call TOUCH) |
|
|
|
endef |
|
|
|
LUA_TARGET_FINALIZE_HOOKS += LUA_TARGET_CLEANUP |
|
|
|
|
|
|
|
lua: | $(TARGET_DIR) |
|
|
|
$(call generic-package) |
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
@ -39,20 +46,17 @@ HOST_LUA_DIR = lua-$(HOST_LUA_VERSION) |
|
|
|
HOST_LUA_SOURCE = lua-$(HOST_LUA_VERSION).tar.gz |
|
|
|
HOST_LUA_SITE = http://www.lua.org/ftp |
|
|
|
|
|
|
|
#$(DL_DIR)/$(HOST_LUA_SOURCE):
|
|
|
|
# $(download) $(HOST_LUA_SITE)/$(HOST_LUA_SOURCE)
|
|
|
|
|
|
|
|
HOST_LUA_PATCH = lua-01-fix-LUA_ROOT.patch |
|
|
|
HOST_LUA_PATCH += lua-01-remove-readline.patch |
|
|
|
|
|
|
|
HOST_LUA_MAKE_ARGS = \
|
|
|
|
linux |
|
|
|
|
|
|
|
HOST_LUA_MAKE_INSTALL_OPTS = \
|
|
|
|
INSTALL_TOP=$(HOST_DIR) \
|
|
|
|
INSTALL_MAN=$(HOST_DIR)/share/man/man1 |
|
|
|
|
|
|
|
HOST_LUA = $(HOST_DIR)/bin/lua |
|
|
|
|
|
|
|
host-lua: $(DL_DIR)/$(HOST_LUA_SOURCE) | $(HOST_DIR) |
|
|
|
$(REMOVE)/$(PKG_DIR) |
|
|
|
$(UNTAR)/$(PKG_SOURCE) |
|
|
|
$(call APPLY_PATCHES,$(PKG_PATCH)) |
|
|
|
$(CHDIR)/$(PKG_DIR); \
|
|
|
|
$(MAKE) linux; \
|
|
|
|
$(MAKE) install INSTALL_TOP=$(HOST_DIR) INSTALL_MAN=$(HOST_DIR)/share/man/man1 |
|
|
|
$(REMOVE)/$(PKG_DIR) |
|
|
|
$(call TOUCH) |
|
|
|
host-lua: | $(HOST_DIR) |
|
|
|
$(call host-generic-package) |
|
|
|