forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
Marek Szuba
committed
Nov 28, 2020
1 parent
e5aaa5e
commit 4119516
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters