2015-10-29 08:45:03 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# luvi
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2023-08-02 00:37:41 +02:00
|
|
|
LUVI_VERSION = 2.14.0
|
2019-09-11 20:19:01 +02:00
|
|
|
LUVI_SOURCE = luvi-src-v$(LUVI_VERSION).tar.gz
|
|
|
|
LUVI_SITE = https://github.com/luvit/luvi/releases/download/v$(LUVI_VERSION)
|
2015-10-29 08:45:03 +01:00
|
|
|
LUVI_LICENSE = Apache-2.0
|
|
|
|
LUVI_LICENSE_FILES = LICENSE.txt
|
2021-11-12 20:06:45 +01:00
|
|
|
LUVI_DEPENDENCIES = libuv luajit luv host-luajit host-pkgconf
|
2015-10-29 08:45:03 +01:00
|
|
|
|
|
|
|
# Dispatch all architectures of LuaJIT
|
|
|
|
ifeq ($(BR2_i386),y)
|
|
|
|
LUVI_TARGET_ARCH = x86
|
|
|
|
else ifeq ($(BR2_x86_64),y)
|
|
|
|
LUVI_TARGET_ARCH = x64
|
|
|
|
else ifeq ($(BR2_powerpc),y)
|
|
|
|
LUVI_TARGET_ARCH = ppc
|
|
|
|
else ifeq ($(BR2_arm)$(BR2_armeb),y)
|
|
|
|
LUVI_TARGET_ARCH = arm
|
2019-12-26 09:24:47 +01:00
|
|
|
else ifeq ($(BR2_aarch64),y)
|
|
|
|
LUVI_TARGET_ARCH = arm64
|
2024-03-03 11:30:00 +01:00
|
|
|
else ifeq ($(BR2_aarch64_be),y)
|
|
|
|
LUVI_TARGET_ARCH = arm64be
|
2016-01-18 17:09:35 +01:00
|
|
|
else ifeq ($(BR2_mips),y)
|
2015-10-29 08:45:03 +01:00
|
|
|
LUVI_TARGET_ARCH = mips
|
2016-01-18 17:09:35 +01:00
|
|
|
else ifeq ($(BR2_mipsel),y)
|
|
|
|
LUVI_TARGET_ARCH = mipsel
|
2015-10-29 08:45:03 +01:00
|
|
|
else
|
|
|
|
LUVI_TARGET_ARCH = $(BR2_ARCH)
|
|
|
|
endif
|
|
|
|
|
2021-11-12 20:06:45 +01:00
|
|
|
# LUAJIT_VERSION and the luajit installation path may not use the
|
|
|
|
# same value. Use the value from luajit.pc file.
|
2023-09-24 16:50:17 +02:00
|
|
|
LUVI_LUAJIT_MAJVER = `$(PKG_CONFIG_HOST_BINARY) --variable=majver luajit`
|
|
|
|
LUVI_LUAJIT_MINVER = `$(PKG_CONFIG_HOST_BINARY) --variable=minver luajit`
|
2021-11-12 20:06:45 +01:00
|
|
|
|
2015-10-29 08:45:03 +01:00
|
|
|
# Bundled lua bindings have to be linked statically into the luvi executable
|
|
|
|
LUVI_CONF_OPTS = \
|
|
|
|
-DBUILD_SHARED_LIBS=OFF \
|
|
|
|
-DWithSharedLibluv=ON \
|
|
|
|
-DTARGET_ARCH=$(LUVI_TARGET_ARCH) \
|
2023-09-24 16:50:17 +02:00
|
|
|
-DLUA_PATH=$(HOST_DIR)/share/luajit-$(LUVI_LUAJIT_MAJVER).$(LUVI_LUAJIT_MINVER)/?.lua
|
2015-10-29 08:45:03 +01:00
|
|
|
|
|
|
|
# Add "rex" module (PCRE via bundled lrexlib)
|
|
|
|
ifeq ($(BR2_PACKAGE_PCRE),y)
|
|
|
|
LUVI_DEPENDENCIES += pcre
|
|
|
|
LUVI_CONF_OPTS += -DWithPCRE=ON -DWithSharedPCRE=ON
|
|
|
|
else
|
|
|
|
LUVI_CONF_OPTS += -DWithPCRE=OFF -DWithSharedPCRE=OFF
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Add "ssl" module (via bundled lua-openssl)
|
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
|
|
|
LUVI_DEPENDENCIES += openssl
|
|
|
|
LUVI_CONF_OPTS += -DWithOpenSSL=ON -DWithOpenSSLASM=ON -DWithSharedOpenSSL=ON
|
|
|
|
else
|
|
|
|
LUVI_CONF_OPTS += -DWithOpenSSL=OFF -DWithOpenSSLASM=OFF -DWithSharedOpenSSL=OFF
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Add "zlib" module (via bundled lua-zlib)
|
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
|
|
|
LUVI_DEPENDENCIES += zlib
|
|
|
|
LUVI_CONF_OPTS += -DWithZLIB=ON -DWithSharedZLIB=ON
|
|
|
|
else
|
|
|
|
LUVI_CONF_OPTS += -DWithZLIB=OFF -DWithSharedZLIB=OFF
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(eval $(cmake-package))
|