package/lua-cffi: new package

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
Francois Perrad 2021-03-21 16:49:03 +01:00 committed by Arnout Vandecappelle (Essensium/Mind)
parent 3621918d1b
commit 13114d0f93
5 changed files with 51 additions and 0 deletions

View file

@ -677,6 +677,7 @@ menu "Lua libraries/modules"
source "package/lua-basexx/Config.in"
source "package/lua-binaryheap/Config.in"
source "package/lua-bit32/Config.in"
source "package/lua-cffi/Config.in"
source "package/lua-cjson/Config.in"
source "package/lua-coat/Config.in"
source "package/lua-coatpersistent/Config.in"

View file

@ -0,0 +1,19 @@
config BR2_PACKAGE_LUA_CFFI
bool "lua-cffi"
depends on !BR2_PACKAGE_LUAJIT
depends on BR2_TOOLCHAIN_HAS_THREADS # libffi
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
depends on BR2_INSTALL_LIBSTDCPP
select BR2_PACKAGE_LIBFFI
help
This is a portable C FFI for Lua, based on libffi and aiming
to be mostly compatible with LuaJIT FFI, but written from
scratch.
https://github.com/q66/cffi-lua
comment "lua-cffi needs a toolchain w/ C++, gcc >= 4.8, threads"
depends on !BR2_PACKAGE_LUAJIT
depends on !BR2_INSTALL_LIBSTDCPP || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || \
!BR2_TOOLCHAIN_HAS_THREADS

View file

@ -0,0 +1,3 @@
# Locally computed
sha256 c30080d6309167f86d1a96d3ee33f33ef52e884052b7feac140b8c52db10ad7a lua-cffi-0.2.1.tar.gz
sha256 f5653a4d5864a3920ea1e07dacfd646067314be647598f0acaaf685beaa2e396 COPYING.md

View file

@ -0,0 +1,14 @@
################################################################################
#
# lua-cffi
#
################################################################################
LUA_CFFI_VERSION=0.2.1
LUA_CFFI_SITE = $(call github,q66,cffi-lua,v$(LUA_CFFI_VERSION))
LUA_CFFI_LICENSE = MIT
LUA_CFFI_LICENSE_FILES = COPYING.md
LUA_CFFI_DEPENDENCIES = libffi lua
$(eval $(meson-package))

View file

@ -0,0 +1,14 @@
from tests.package.test_lua import TestLuaBase
class TestLuaLuaCffi(TestLuaBase):
config = TestLuaBase.config + \
"""
BR2_PACKAGE_LUA=y
BR2_PACKAGE_LUA_CFFI=y
"""
def test_run(self):
self.login()
self.module_test("cffi")