diff options
author | 2020-11-28 20:55:58 +0100 | |
---|---|---|
committer | 2020-11-28 23:28:16 +0100 | |
commit | 41195165872cfd58e465582718ca27bcf9f3b6da (patch) | |
tree | 5c5723e313cce4b35ff2df32ff3564abc9437eee /dev-lua/ldoc | |
parent | dev-lua/lpeg: migrate to lua eclass (diff) | |
download | gentoo-41195165872cfd58e465582718ca27bcf9f3b6da.tar.gz gentoo-41195165872cfd58e465582718ca27bcf9f3b6da.tar.bz2 gentoo-41195165872cfd58e465582718ca27bcf9f3b6da.zip |
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>
Diffstat (limited to 'dev-lua/ldoc')
-rw-r--r-- | dev-lua/ldoc/files/ldoc-1.4.6-slotted_lua.patch | 21 | ||||
-rw-r--r-- | dev-lua/ldoc/ldoc-1.4.6-r100.ebuild | 35 |
2 files changed, 56 insertions, 0 deletions
diff --git a/dev-lua/ldoc/files/ldoc-1.4.6-slotted_lua.patch b/dev-lua/ldoc/files/ldoc-1.4.6-slotted_lua.patch new file mode 100644 index 000000000000..08776c560a09 --- /dev/null +++ b/dev-lua/ldoc/files/ldoc-1.4.6-slotted_lua.patch @@ -0,0 +1,21 @@ +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 diff --git a/dev-lua/ldoc/ldoc-1.4.6-r100.ebuild b/dev-lua/ldoc/ldoc-1.4.6-r100.ebuild new file mode 100644 index 000000000000..5486df73038a --- /dev/null +++ b/dev-lua/ldoc/ldoc-1.4.6-r100.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +LUA_COMPAT=( lua5-1 luajit ) + +inherit lua-single + +DESCRIPTION="A LuaDoc-compatible documentation generation system" +HOMEPAGE="https://stevedonovan.github.io/ldoc/" +SRC_URI="https://github.com/stevedonovan/LDoc/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" + +REQUIRED_USE="${LUA_REQUIRED_USE}" + +RDEPEND="$(lua_gen_cond_dep ' + dev-lua/penlight[${LUA_USEDEP}] +')" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-1.4.6-mkdir.patch" + "${FILESDIR}/${PN}-1.4.6-slotted_lua.patch" +) + +S="${WORKDIR}/LDoc-${PV}" +RESTRICT="test" + +src_install() { + emake DESTDIR="${ED}" LUA_BINDIR="${EPREFIX}/usr/bin" LUA_SHAREDIR="$(lua_get_lmod_dir)" install +} |