Skip to content

testing/lua-luautf8: new aport

Alex Dowad requested to merge alexdowad/aports:utf8 into master

https://github.com/starwing/luautf8 A UTF-8 support module for Lua and LuaJIT

In #13553 (closed), I suggested that the 'luacheck' package should move to using the newer, maintained repository rather than the old one which is frozen. I started working on a MR to implement that change, but quickly discovered that the latest release of luacheck relies on the 'luautf8' library, which is not available in the Alpine package repos. (A different library which also implements UTF-8 support for Lua is in the repos, but it's not the one which is needed by luacheck.)

Hence, if this aport is added, it would help make it possible to update 'luacheck'.

This is my first time to submit a proposed new aport. I consulted some of the existing APKBUILDs for ideas. One problem which I have not really overcome is that ld $LDFLAGS ... doesn't work; ld does not like seeing -Wl. For now, I have just taken the flags which abuild is putting in $LDFLAGS and inlined them into my invocation of ld.

By the way, the reason for calling cc and ld directly is this. luautf8 does not include a Makefile; it uses the built-in build function of luarocks instead. Hence, I looked at the source code for luarocks to see what it actually does when building a module, and basically it just invokes cc and ld in the same as this APKBUILD. So I just imitated that.

CC @ncopa

Merge request reports