gentoo/dev-lua/ldoc/files/ldoc-1.4.6-slotted_lua.patch
Marek Szuba 4119516587
dev-lua/ldoc: migrate to lua-single.eclass
No point in making this multi-impl regardless of the fact it installs
some Lua modules, from what I can tell LDoc is meant to be always used
as a command-line tool.

Closes: https://bugs.gentoo.org/752897
Signed-off-by: Marek Szuba <marecki@gentoo.org>
2020-11-28 23:28:16 +01:00

22 lines
732 B
Diff

Do not try to auto-guess Lua directories from the path to the interpreter,
it does not work with the wrapper set up by lua-single.eclass. Use the
values of LUA, LUA_BINDIR and LUA_SHAREDIR provided by the ebuild instead.
--- a/makefile
+++ b/makefile
@@ -1,13 +1,9 @@
-LUA= $(shell echo `which lua`)
-LUA_BINDIR= $(shell echo `dirname $(LUA)`)
-LUA_PREFIX= $(shell echo `dirname $(LUA_BINDIR)`)
-LUA_SHAREDIR=$(LUA_PREFIX)/share/lua/5.1
ldoc:
install: install_parts
mkdir -p $(DESTDIR)$(LUA_BINDIR)
- echo "lua $(LUA_SHAREDIR)/ldoc.lua \$$*" > $(DESTDIR)$(LUA_BINDIR)/ldoc
+ echo "$(LUA) $(LUA_SHAREDIR)/ldoc.lua \$$*" > $(DESTDIR)$(LUA_BINDIR)/ldoc
chmod +x $(DESTDIR)$(LUA_BINDIR)/ldoc
install_luajit: install_parts