1################################################################################ 2# 3# luvi 4# 5################################################################################ 6 7LUVI_VERSION = 2.12.0 8LUVI_SOURCE = luvi-src-v$(LUVI_VERSION).tar.gz 9LUVI_SITE = https://github.com/luvit/luvi/releases/download/v$(LUVI_VERSION) 10LUVI_LICENSE = Apache-2.0 11LUVI_LICENSE_FILES = LICENSE.txt 12LUVI_DEPENDENCIES = libuv luajit luv host-luajit host-pkgconf 13 14# Dispatch all architectures of LuaJIT 15ifeq ($(BR2_i386),y) 16LUVI_TARGET_ARCH = x86 17else ifeq ($(BR2_x86_64),y) 18LUVI_TARGET_ARCH = x64 19else ifeq ($(BR2_powerpc),y) 20LUVI_TARGET_ARCH = ppc 21else ifeq ($(BR2_arm)$(BR2_armeb),y) 22LUVI_TARGET_ARCH = arm 23else ifeq ($(BR2_aarch64),y) 24LUVI_TARGET_ARCH = arm64 25else ifeq ($(BR2_mips),y) 26LUVI_TARGET_ARCH = mips 27else ifeq ($(BR2_mipsel),y) 28LUVI_TARGET_ARCH = mipsel 29else 30LUVI_TARGET_ARCH = $(BR2_ARCH) 31endif 32 33# LUAJIT_VERSION and the luajit installation path may not use the 34# same value. Use the value from luajit.pc file. 35LUVI_LUAJIT_VERSION = `$(PKG_CONFIG_HOST_BINARY) --variable=version luajit` 36 37# Bundled lua bindings have to be linked statically into the luvi executable 38LUVI_CONF_OPTS = \ 39 -DBUILD_SHARED_LIBS=OFF \ 40 -DWithSharedLibluv=ON \ 41 -DTARGET_ARCH=$(LUVI_TARGET_ARCH) \ 42 -DLUA_PATH=$(HOST_DIR)/share/luajit-$(LUVI_LUAJIT_VERSION)/?.lua 43 44# Add "rex" module (PCRE via bundled lrexlib) 45ifeq ($(BR2_PACKAGE_PCRE),y) 46LUVI_DEPENDENCIES += pcre 47LUVI_CONF_OPTS += -DWithPCRE=ON -DWithSharedPCRE=ON 48else 49LUVI_CONF_OPTS += -DWithPCRE=OFF -DWithSharedPCRE=OFF 50endif 51 52# Add "ssl" module (via bundled lua-openssl) 53ifeq ($(BR2_PACKAGE_OPENSSL),y) 54LUVI_DEPENDENCIES += openssl 55LUVI_CONF_OPTS += -DWithOpenSSL=ON -DWithOpenSSLASM=ON -DWithSharedOpenSSL=ON 56else 57LUVI_CONF_OPTS += -DWithOpenSSL=OFF -DWithOpenSSLASM=OFF -DWithSharedOpenSSL=OFF 58endif 59 60# Add "zlib" module (via bundled lua-zlib) 61ifeq ($(BR2_PACKAGE_ZLIB),y) 62LUVI_DEPENDENCIES += zlib 63LUVI_CONF_OPTS += -DWithZLIB=ON -DWithSharedZLIB=ON 64else 65LUVI_CONF_OPTS += -DWithZLIB=OFF -DWithSharedZLIB=OFF 66endif 67 68$(eval $(cmake-package)) 69