Also refresh 020-riscv64-support.patch from the current state of
openresty/luajit2#236. The previous snapshot defined
asm_tail_prep(ASMState *as), but since openresty/luajit2 commit
68354f44 the callers pass a second TraceNo argument, so the riscv64
build failed with:
lj_asm.c:2559:5: error: too many arguments to function 'asm_tail_prep'
The refreshed patch carries the upstream adaptation and restores the
build. The other four patches apply unchanged.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
luajit2 currently fails to link for powerpc: lj_vm.o emits PLT calls
that force BSS-PLT, which the inline-PLT relocations emitted by GCC 12
and newer do not support. Add the same GOT-based fix that
lang/lua/luajit has carried as 060-ppc-musl.patch since 2019.
With that in place the package builds, but ipairs() and pairs() turn
out to be broken on 32-bit big-endian soft-float targets. Both are
regressions in luajit2's PPC64 patch and do not affect upstream
LuaJIT. To be submitted to openresty/luajit2 as well.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Add luasocket5.4 next to the existing luasocket (Lua 5.1) and
luasocket5.3 variants, installed via the upstream makefile's
'make install LUAV=5.4'.
That makefile defaults to prefix=/usr/local on linux, which is where
the luasocket5.3 variant still installs, so pass prefix=/usr explicitly
to land in /usr/share/lua/5.4 and /usr/lib/lua/5.4 like the other Lua
5.4 module packages.
Needed for the prosody 13.x upgrade.
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
Add luaexpat5.4, parallel to existing luaexpat (Lua 5.1, default).
Builds against the Lua 5.4 headers under /usr/include/lua5.4 and
installs to /usr/lib/lua/5.4/. Same pattern as the luasocket 5.3
variant already shipped.
Needed for the prosody 13.x upgrade.
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
Lua 5.1 is EOL and many downstream packages need 5.2+. Mirror the
luasocket multi-variant pattern: keep luafilesystem (Lua 5.1, default)
and add luafilesystem5.4 which builds the same source against
liblua5.4 and installs to /usr/lib/lua/5.4/.
Needed for the prosody 13.x upgrade (Lua 5.1 unsupported upstream).
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
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.
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
LUA_ECO_CRASH_BACKTRACE declared "depends on PACKAGE_lua-eco" while
lua-eco's DEPENDS carries "+LUA_ECO_CRASH_BACKTRACE:libunwind", which the
generator turns into "select libunwind if LUA_ECO_CRASH_BACKTRACE". kconfig
then sees lua-eco and the symbol depending on each other:
error: recursive dependency detected!
symbol LUA_ECO_CRASH_BACKTRACE depends on PACKAGE_lua-eco
symbol PACKAGE_lua-eco depends on LUA_ECO_CRASH_BACKTRACE
Drop the redundant guard; the option only affects lua-eco's own build, so
nothing is pulled in when lua-eco itself is not selected.
Fixes: https://github.com/openwrt/packages/pull/30098#issuecomment-5113528752
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
Add the new cli module as a separate subpackage.
Expose the optional C crash backtrace diagnostics through
CONFIG_LUA_ECO_CRASH_BACKTRACE. Depend on libunwind when enabled.
Keep the option unavailable on musl/powerpc, where OpenWrt's
libunwind package is not supported.
changelog: https://github.com/zhaojh329/lua-eco/compare/v4.0.0...v4.1.4
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
old just disabled version test, but as LuaJIt 2.1. part is stable.
So we can use that for test if luajit2 itself able to run.
Fixes: c7ca6d46f7 luajit2: ("add test-version.sh")
Suggested-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Signed-off-by: Seo Suchan <tjtncks@gmail.com>
FindLuaJIT.cmake uses NO_DEFAULT_PATH and only searches hardcoded
luajit-specific paths, so it never finds regular Lua. However if
LUAJIT_INCLUDE_DIRS and LUAJIT_LIBRARY are pre-set in the CMake
cache, find_path/find_library skip their searches, the module sets
LUAJIT_FOUND=ON and also sets LUA_INCLUDE_DIR/LUA_LIBRARIES from
those values, and the if(NOT LUAJIT_FOUND) guard skips the broken
find_package(Lua REQUIRED) call that fails under CMake 4.3.
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
The CMakeLists.txt first tries FindLuaJIT.cmake which uses
NO_DEFAULT_PATH with hardcoded host paths, so it always fails in
cross-compilation. The fallback find_package(Lua REQUIRED) may also
fail to find a flat sysroot layout where lua.h lives at
/usr/include/lua.h rather than a versioned subdirectory.
Explicitly pass LUA_INCLUDE_DIR and LUA_LIBRARY to CMake to bypass
both finders, and depend on +liblua (the library package) instead of
+lua to ensure Build/InstallDev runs and Lua headers are present in
the staging directory before this package builds.
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
Update Makefile with the version
Remove LuaJIT fix patch - No longer needed
Add "ts-time-cb-signature" patch - Fixes build on various platforms
Signed-off-by: Amnon Paz <pazamnon@gmail.com>
Seems a lot of packages are just getting abandoned by people.
Will pick these up and see them through.
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This software seems no longer maintained.
The latest upstream commit is 11 years ago,
and upstream repo has been archived.
No package depends on this.
Signed-off-by: Yanase Yuki <dev@zpc.st>
Add pending patch for CMake >= 4.0 support. This seems to come from an
OpenSUSE PR and generally modernize the CMake file also increasing the
minimum version for CMake.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Bump lualanes to version 3.17.2 and backport upstream patch for CMake >=
4.0 support.
Apply minor modification to the backport patch as the project moved to
C++ but the 3.17.2 version is still C based.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
There are roughly 50 Lua packages.
It's about time we consider a proposal for moving all of them
under a lang/lua sub-folder.
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>