aports/main/lua5.5/readlinelib.patch
Natanael Copa 29916b4127 main/lua5.5: make readline a soft dependency
Lua 5.5 introduces support to open readline with dlopen, so you no
longer need readline to execute your srcipts, but can still get a nice
interactive Lua when readline is installed. Enable this feature so
readline only is a soft dependency.

Upstream uses libreadline.so, which is unacceptable for us. Instead,
extract the soname from the library and use that.
2026-01-02 06:54:59 +00:00

16 lines
360 B
Diff

diff --git a/luaconf.h b/luaconf.h
index 96a77802..7a753eb6 100644
--- a/src/luaconf.h
+++ b/src/luaconf.h
@@ -70,8 +70,10 @@
#if defined(LUA_USE_LINUX)
#define LUA_USE_POSIX
#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
+#if !defined(LUA_READLINELIB)
#define LUA_READLINELIB "libreadline.so"
#endif
+#endif
#if defined(LUA_USE_MACOSX)