diff mbox series

[meta-oe,34/55] lua-std-normalize: Add recipe

Message ID 20261125080732.2419614-40-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-multimedia] clightd: Port ALS sensor to libiio 1.0 | expand

Commit Message

Khem Raj Nov. 25, 2026, 8:06 a.m. UTC
std.normalize provides deterministic versions of core Lua functions
across Lua 5.1-5.5 and LuaJIT; 5.1 adds a bit32 library for every
host. luaposix 39 requires std.normalize >= 5.1 at runtime.

It is pure Lua, so install the modules directly and fill in the
version template that luke would otherwise expand.

Add UPSTREAM_CHECK_GITTAGREGEX matching release tags only.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 .../packagegroups/packagegroup-meta-oe.bb     |  1 +
 .../lua-std-normalize_5.1.bb                  | 31 +++++++++++++++++++
 2 files changed, 32 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/lua-std-normalize/lua-std-normalize_5.1.bb
diff mbox series

Patch

diff --git a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
index 9158b9acf1..90446efaa0 100644
--- a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
+++ b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
@@ -270,6 +270,7 @@  RDEPENDS:packagegroup-meta-oe-devtools = "\
     libxerces-c \
     lshw \
     ltrace \
+    lua-std-normalize \
     luajit \
     luaposix \
     mcpp \
diff --git a/meta-oe/recipes-devtools/lua-std-normalize/lua-std-normalize_5.1.bb b/meta-oe/recipes-devtools/lua-std-normalize/lua-std-normalize_5.1.bb
new file mode 100644
index 0000000000..b764685f3b
--- /dev/null
+++ b/meta-oe/recipes-devtools/lua-std-normalize/lua-std-normalize_5.1.bb
@@ -0,0 +1,31 @@ 
+SUMMARY = "Normalized Lua functions"
+DESCRIPTION = "std.normalize injects deterministic versions of core Lua \
+functions that do not behave identically across Lua implementations into a \
+module's lexical environment."
+HOMEPAGE = "https://github.com/lua-stdlib/normalize"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=06275ffb1a4a2c92e56a9bd5e3e38b4c"
+
+SRC_URI = "git://github.com/lua-stdlib/normalize.git;protocol=https;branch=release-v${PV};tag=v${PV}"
+SRCREV = "f3e8d7639d62cebe18829f6e1284f9e4faeb78a6"
+
+UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)*)$"
+
+LUA_VERSION = "5.5"
+
+inherit allarch
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install() {
+    install -d ${D}${datadir}/lua/${LUA_VERSION}/std/normalize
+    install -m 0644 ${S}/lib/std/normalize/init.lua ${S}/lib/std/normalize/_core.lua \
+        ${D}${datadir}/lua/${LUA_VERSION}/std/normalize/
+    sed -e 's|@version@|${PV}|' ${S}/lib/std/normalize/version.lua.in \
+        > ${D}${datadir}/lua/${LUA_VERSION}/std/normalize/version.lua
+}
+
+FILES:${PN} = "${datadir}/lua/${LUA_VERSION}"
+
+RDEPENDS:${PN} = "lua"