* [gentoo-commits] repo/gentoo:master commit in: dev-lua/ldoc/files/, profiles/, dev-lua/ldoc/
@ 2020-11-28 22:29 Marek Szuba
0 siblings, 0 replies; only message in thread
From: Marek Szuba @ 2020-11-28 22:29 UTC (permalink / raw
To: gentoo-commits
commit: 41195165872cfd58e465582718ca27bcf9f3b6da
Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 28 19:55:58 2020 +0000
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Sat Nov 28 22:28:16 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41195165
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 <AT> gentoo.org>
dev-lua/ldoc/files/ldoc-1.4.6-slotted_lua.patch | 21 +++++++++++++++
dev-lua/ldoc/ldoc-1.4.6-r100.ebuild | 35 +++++++++++++++++++++++++
profiles/package.mask | 1 +
3 files changed, 57 insertions(+)
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 00000000000..08776c560a0
--- /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 00000000000..5486df73038
--- /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
+}
diff --git a/profiles/package.mask b/profiles/package.mask
index e2cfd555d13..9946a628585 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -508,6 +508,7 @@ dev-lua/luacrypto
=dev-libs/efl-1.25.1-r10
>=dev-lua/busted-2.0.0-r100
>=dev-lua/dkjson-2.5-r100
+>=dev-lua/ldoc-1.4.6-r100
>=dev-lua/lpeg-1.0.2-r100
>=dev-lua/lua-bit32-5.3.5-r100
>=dev-lua/lua-zlib-1.2-r100
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-28 22:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-28 22:29 [gentoo-commits] repo/gentoo:master commit in: dev-lua/ldoc/files/, profiles/, dev-lua/ldoc/ Marek Szuba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox