lua: look for lua5.4 modules under /usr instead of /usr/local
luaconf.h hardcodes LUA_ROOT to "/usr/local/", and nothing in this
package overrides it for the target build, so the interpreter only ever
searches /usr/local/{share,lib}/lua/5.4. Nothing installs there on
OpenWrt, which leaves every Lua 5.4 module package unreachable:
# lua5.4 -e 'require "lfs"'
lua5.4: module 'lfs' not found:
no file '/usr/local/share/lua/5.4/lfs.lua'
no file '/usr/local/lib/lua/5.4/lfs.so'
[...]
# find / -name lfs.so
/usr/lib/lua/5.4/lfs.so
Point LUA_ROOT at /usr. LUA_LDIR and LUA_CDIR are derived from it and
keep the version suffix, so the search paths become /usr/share/lua/5.4
and /usr/lib/lua/5.4 - exactly where the Lua 5.4 module packages
install. The core lua (5.1) package carries an equivalent patch.