4427b29839
Luajit package has been recently updated to the latest commit in the
master branch [1]. Since then LUAJIT_VERSION doesn't contain the luajit
version anymore but a commit hash:
LUAJIT_VERSION = 05f1984e1a862e4b3d3c3b370c773492e2edf84a
Use pkg-config --variable=version luajit in luvi package to set
LUA_PATH correctly.
Fixes:
luajit: unknown luaJIT command or jit.* modules not installed
https://gitlab.com/buildroot.org/buildroot/-/jobs/1710552605
[1] 9450b53c8e
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
69 lines
2.0 KiB
Makefile
69 lines
2.0 KiB
Makefile
################################################################################
|
|
#
|
|
# luvi
|
|
#
|
|
################################################################################
|
|
|
|
LUVI_VERSION = 2.12.0
|
|
LUVI_SOURCE = luvi-src-v$(LUVI_VERSION).tar.gz
|
|
LUVI_SITE = https://github.com/luvit/luvi/releases/download/v$(LUVI_VERSION)
|
|
LUVI_LICENSE = Apache-2.0
|
|
LUVI_LICENSE_FILES = LICENSE.txt
|
|
LUVI_DEPENDENCIES = libuv luajit luv host-luajit host-pkgconf
|
|
|
|
# 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
|
|
else ifeq ($(BR2_aarch64),y)
|
|
LUVI_TARGET_ARCH = arm64
|
|
else ifeq ($(BR2_mips),y)
|
|
LUVI_TARGET_ARCH = mips
|
|
else ifeq ($(BR2_mipsel),y)
|
|
LUVI_TARGET_ARCH = mipsel
|
|
else
|
|
LUVI_TARGET_ARCH = $(BR2_ARCH)
|
|
endif
|
|
|
|
# LUAJIT_VERSION and the luajit installation path may not use the
|
|
# same value. Use the value from luajit.pc file.
|
|
LUVI_LUAJIT_VERSION = `$(PKG_CONFIG_HOST_BINARY) --variable=version luajit`
|
|
|
|
# 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) \
|
|
-DLUA_PATH=$(HOST_DIR)/share/luajit-$(LUVI_LUAJIT_VERSION)/?.lua
|
|
|
|
# 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))
|