Commit 0848e9e8 authored by Jörg Krause's avatar Jörg Krause Committed by Thomas Petazzoni
Browse files

luvi: new package



Add package luvi version v2.3.5.

luvi extends LuaJIT with asynchronous I/O and several optional modules to run
Lua applications and build self-contained binaries.

Signed-off-by: default avatarJörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent b2ec7830
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -521,6 +521,7 @@ menu "Lua libraries/modules"
	source "package/luasql-sqlite3/Config.in"
	source "package/lunit/Config.in"
	source "package/luv/Config.in"
	source "package/luvi/Config.in"
	source "package/lzlib/Config.in"
	source "package/orbit/Config.in"
	source "package/rings/Config.in"

package/luvi/Config.in

0 → 100644
+30 −0
Original line number Diff line number Diff line
config BR2_PACKAGE_LUVI
	bool "luvi"
	depends on BR2_TOOLCHAIN_HAS_THREADS # libuv
	depends on BR2_USE_MMU # libuv
	depends on !BR2_STATIC_LIBS # libuv
	depends on BR2_PACKAGE_LUAJIT
	select BR2_PACKAGE_LIBUV
	select BR2_PACKAGE_LUV
	help
	  A project in-between luv and luvit. The goal of this is to make
	  building luvit and derivatives much easier.

	  luvi extends LuaJIT with asynchronous I/O and several optional
	  modules to run Lua applications and build self-contained binaries
	  on systems that don't have a compiler.

	  The luvi core can be extended with several Lua modules by adding its
	  bundled Lua binding libraries. To get the Lua module...
	    * 'rex' select PCRE (BR2_PACKAGE_PCRE)
	    * 'ssl' select OpenSSL (BR2_PACKAGE_OPENSSL)
	    * 'zlib' select zlib (BR2_PACKAGE_ZLIB)

	  https://github.com/luvit/luvi

comment "luvi needs a toolchain w/ threads, dynamic library"
	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
	depends on BR2_USE_MMU

comment "luvi needs LuaJIT"
	depends on !BR2_PACKAGE_LUAJIT

package/luvi/luvi.hash

0 → 100644
+2 −0
Original line number Diff line number Diff line
# Locally calculated
sha256  9d13baba7870160bd0f9be9d52f8ef1dafe282490d5f83a8e14765aa43387765  luvi-src-v2.3.5.tar.gz

package/luvi/luvi.mk

0 → 100644
+60 −0
Original line number Diff line number Diff line
################################################################################
#
# luvi
#
################################################################################

LUVI_VERSION = v2.3.5
LUVI_SOURCE = luvi-src-$(LUVI_VERSION).tar.gz
LUVI_SITE = https://github.com/luvit/luvi/releases/download/$(LUVI_VERSION)
LUVI_LICENSE = Apache-2.0
LUVI_LICENSE_FILES = LICENSE.txt
LUVI_DEPENDENCIES = libuv luajit luv host-luajit

# 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_mips)$(BR2_mipsel),y)
LUVI_TARGET_ARCH = mips
else
LUVI_TARGET_ARCH = $(BR2_ARCH)
endif

# 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)/usr/share/luajit-2.0.4/?.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))