From b4a330cf24a630147edff50abdedb9ffccd3a5ca Mon Sep 17 00:00:00 2001 From: Nicolas PARLANT Date: Mon, 4 May 2026 12:15:39 +0200 Subject: [PATCH] dev-lua/lua-utf8: Bump to 0.2.0 Fix compilation with luajit-2.1.1770848219 (missing include) Per upstream, this release modernizes the width-related APIs with breaking changes to parameter names and order. Most users are unaffected (if you only pass the string argument). See README.md for more info. luacheck, the only package depending on lua-utf8, passes its tests (including decoder_spec that requires lua-utf8). Signed-off-by: Nicolas PARLANT Part-of: https://codeberg.org/gentoo/gentoo/pulls/822 Merges: https://codeberg.org/gentoo/gentoo/pulls/822 Signed-off-by: Conrad Kostecki --- dev-lua/lua-utf8/Manifest | 1 + dev-lua/lua-utf8/lua-utf8-0.2.0.ebuild | 82 ++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 dev-lua/lua-utf8/lua-utf8-0.2.0.ebuild diff --git a/dev-lua/lua-utf8/Manifest b/dev-lua/lua-utf8/Manifest index b867fe622a423..64dcdb8c66e84 100644 --- a/dev-lua/lua-utf8/Manifest +++ b/dev-lua/lua-utf8/Manifest @@ -1 +1,2 @@ DIST lua-utf8-0.1.5.tar.gz 47986 BLAKE2B 8902649f71b9b2f982278bfa697309474013f4b15788e268ee73aaeb80ceda93a03178ca00918c96478fa66623dbcea8b5bde89e216d8c73a18e9fe38aec7509 SHA512 2f7f1e80c27012d2ebcf3da8e9367f00dda9f7b1a7d4adee265ee37ab12a78ef7c94930945e88f060f0ec4186174dd87af80a50917d3b22a71c84f67b0df12d0 +DIST lua-utf8-0.2.0.tar.gz 550106 BLAKE2B 733ae135b5d7db2e6d0564e1b22cefbf2b915924f7d20a4c9d9aaef75e0a70a0ca069d67ac65864343cb1103ac4a0935e255f7a6239a13cb96cbae1de3fc2e78 SHA512 2bd24e9a20099bfa2dc164f1aab3333583ae5de3738155938114a5e08231d76d9380054629501b35b8236caa61777ef1f3654da1901c471a0da077cde50e0b59 diff --git a/dev-lua/lua-utf8/lua-utf8-0.2.0.ebuild b/dev-lua/lua-utf8/lua-utf8-0.2.0.ebuild new file mode 100644 index 0000000000000..b21c200762c5c --- /dev/null +++ b/dev-lua/lua-utf8/lua-utf8-0.2.0.ebuild @@ -0,0 +1,82 @@ +# Copyright 2020-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1..4} luajit ) + +inherit lua toolchain-funcs + +DESCRIPTION="A UTF-8 support module for Lua and LuaJIT" +HOMEPAGE="https://github.com/starwing/luautf8" +SRC_URI="https://github.com/starwing/luautf8/archive/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN//-/}-${PV}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="test" +REQUIRED_USE="${LUA_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +RDEPEND="${LUA_DEPS}" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +lua_src_compile() { + local compiler=( + "$(tc-getCC)" + "${CFLAGS}" + "-fPIC" + "${LDFLAGS}" + "$(lua_get_CFLAGS)" + "-c lutf8lib.c" + "-o lutf8lib-${ELUA}.o" + ) + einfo "${compiler[@]}" + ${compiler[@]} || die + + local linker=( + "$(tc-getCC)" + "-shared" + "${LDFLAGS}" + "-o lutf8lib-${ELUA}.so" + "lutf8lib-${ELUA}.o" + ) + einfo "${linker[@]}" + ${linker[@]} || die +} + +src_compile() { + lua_foreach_impl lua_src_compile +} + +lua_src_test() { + local mytests=( + "test.lua" + "test_compat.lua" + "test_pm.lua" + ) + + for mytest in ${mytests[@]}; do + LUA_CPATH="${S}/lutf8lib-${ELUA}.so" ${ELUA} ${mytest} || die + done +} + +src_test() { + lua_foreach_impl lua_src_test +} + +lua_src_install() { + exeinto "$(lua_get_cmod_dir)" + newexe "lutf8lib-${ELUA}.so" "lua-utf8.so" + + insinto "$(lua_get_lmod_dir)" + doins parseucd.lua +} + +src_install() { + lua_foreach_impl lua_src_install + + einstalldocs +}