summaryrefslogtreecommitdiff
blob: f46b1962cc96385f90ac19872da35752b416d670 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

VCS="git"
IS_MULTILIB=true
GITHUB_A="luaposix"

inherit autotools lua

DESCRIPTION="POSIX binding, including curses, for Lua 5.1 and 5.2"
HOMEPAGE="https://github.com/luaposix/luaposix"

LICENSE="MIT"
SLOT="0"
KEYWORDS=""
IUSE="doc examples ncurses"

RDEPEND="
	virtual/lua[bit32]
	ncurses? ( sys-libs/ncurses )
"

DEPEND="
	${RDEPEND}
	sys-kernel/linux-headers
	virtual/libc
	doc? ( dev-lua/ldoc )
"
#	dev-libs/gnulib
#	dev-lua/specl
#	dev-lua/lyaml

DOCS=(README.md NEWS.md)
EXAMPLES=(doc/examples/.)
HTML_DOCS=(html/.)

all_lua_prepare() {
	mkdir -p html
	sed \
		-e '/^dir/s@"."@"../html"@' \
		-i build-aux/config.ld.in

	cp build-aux/config.ld.in build-aux/config.ld
	cp lib/posix.lua.in lib/posix/init.lua

	sed -r \
		-e "s/@PACKAGE_STRING@/${P}/" \
		-i build-aux/config.ld lib/posix/init.lua

	lua_default
}

all_lua_compile() {
	use doc && (
		pushd build-aux &>/dev/null
		ldoc -d ../doc .
		popd
	)

	rm build-aux/config.ld lib/posix/init.lua
}

each_lua_compile() {
	:; #wip
}