package/lua-lrexlib-pcre2: new package

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
This commit is contained in:
Francois Perrad
2025-07-16 08:15:14 +02:00
committed by Arnout Vandecappelle
parent 1796c4e405
commit 4149871af1
5 changed files with 50 additions and 0 deletions

View File

@@ -762,6 +762,7 @@ menu "Lua libraries/modules"
source "package/lua-livr/Config.in"
source "package/lua-livr-extra/Config.in"
source "package/lua-lpeg-patterns/Config.in"
source "package/lua-lrexlib-pcre2/Config.in"
source "package/lua-lsdbus/Config.in"
source "package/lua-lunitx/Config.in"
source "package/lua-lunix/Config.in"

View File

@@ -0,0 +1,7 @@
config BR2_PACKAGE_LUA_LREXLIB_PCRE2
bool "lua-lrexlib-pcre2"
select BR2_PACKAGE_PCRE2
help
Regular expression library binding (PCRE2 flavour).
https://github.com/rrthomas/lrexlib

View File

@@ -0,0 +1,3 @@
# computed by luarocks/buildroot
sha256 9bb1cb2f307eb70d66fdab499864de732c891aace0ceb6a338194e2e6631b9c3 lrexlib-pcre2-2.9.2-1.src.rock
sha256 067992fa7c5866e01d6c8fe93dfa1e1456a6ac81fa59ccdc72f5adcd6e5b3690 lrexlib/LICENSE

View File

@@ -0,0 +1,14 @@
################################################################################
#
# lua-lrexlib-pcre2
#
################################################################################
LUA_LREXLIB_PCRE2_VERSION = 2.9.2-1
LUA_LREXLIB_PCRE2_NAME_UPSTREAM = Lrexlib-PCRE2
LUA_LREXLIB_PCRE2_SUBDIR = lrexlib
LUA_LREXLIB_PCRE2_LICENSE = MIT
LUA_LREXLIB_PCRE2_LICENSE_FILES = $(LUA_LREXLIB_PCRE2_SUBDIR)/LICENSE
LUA_LREXLIB_PCRE2_DEPENDENCIES = pcre2
$(eval $(luarocks-package))

View File

@@ -0,0 +1,25 @@
from tests.package.test_lua import TestLuaBase
class TestLuaLrexlibPCRE2(TestLuaBase):
config = TestLuaBase.config + \
"""
BR2_PACKAGE_LUA=y
BR2_PACKAGE_LUA_LREXLIB_PCRE2=y
"""
def test_run(self):
self.login()
self.module_test("rex_pcre2")
class TestLuajitLrexlibPCRE2(TestLuaBase):
config = TestLuaBase.config + \
"""
BR2_PACKAGE_LUAJIT=y
BR2_PACKAGE_LUA_LREXLIB_PCRE2=y
"""
def test_run(self):
self.login()
self.module_test("rex_pcre2")