Will Sinatra 0d1e76b741 community/lua-compat53: switch to manual build, upgrade to 0.14.4
Break circular dependency with luarocks by compiling C modules directly
and copying Lua modules manually. Luarocks for lua5.1/5.2 requires
lua-compat53, making the previous luarocks-based build unbuildable.

Resolves ##17778

Co-Authored-By: Jakub Jirutka <jakub@jirutka.cz>
2025-12-19 01:08:45 +01:00

33 lines
803 B
Diff

- Don't overwrite package.cpath to make LUA_CPATH work.
- Exit if modules cannot be loaded.
diff --git a/tests/test.lua b/tests/test.lua
index 503e3f4..7168bbd 100755
--- a/tests/test.lua
+++ b/tests/test.lua
@@ -45,7 +45,7 @@ end
local self = arg[0]
package.path = "../?.lua;../?/init.lua"
-package.cpath = "./?-"..V..".so;./?-"..V..".dll;./?.so;./?.dll"
+package.cpath = "./?-"..V..".so;./?-"..V..".dll;./?.so;./?.dll;"..package.cpath
if mode == "module" then
print("testing Lua API using `compat53.module` ...")
_ENV = require("compat53.module")
@@ -281,6 +281,7 @@ if utf8.len then
___''
else
print("XXX: utf8 module not available")
+ os.exit(1)
end
@@ -291,6 +292,7 @@ if string.pack then
___''
else
print("XXX: string packing not available")
+ os.exit(1)
end