package/lua: allow to load native modules from host-lua
In order to allow the host Lua interpreter to load native modules, we
need to enable building liblua.so, by switching from BUILDMODE=static
to BUILDMODE=dynamic.
In addition, since some modules need Lua 5.2 functions, we build the
host Lua interpreter with -DLUA_COMPAT_5_2, when the Lua interpreter
version is 5.3. Note that we are testing the target option
BR2_PACKAGE_LUA_5_3, but this is OK: the host and target Lua
interpreters have the same version.
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>