summaryrefslogtreecommitdiff
blob: f2f33ad9a3c42bec01578739d37631c09c40fe1c (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
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

VCS="git"
GITHUB_A="leafo"
inherit lua

DESCRIPTION="A web framework for Lua/MoonScript."
HOMEPAGE="https://github.com/leafo/lapis"

LICENSE="MIT"
SLOT="0"
KEYWORDS=""
IUSE="doc moonscript"

RDEPEND="
	moonscript? ( dev-lua/moonscript )
	dev-lua/ansicolors
	dev-lua/luasocket
	dev-lua/luacrypto
	dev-lua/lua-cjson
	dev-lua/lpeg
	dev-lua/lua-rds-parser
	dev-lua/resty-upload
"
DEPEND="
	${RDEPEND}
"

DOCS=( docs/. README.md )

all_lua_prepare() {
	use moonscript || find "${S}" -type -name '*.moon' -delete
	lua_default
}

each_lua_compile() {
	use moonscript && lua_default build
}

each_lua_install() {
	use moonscript && dolua lapis.moon
	dolua lapis
}

all_lua_install() {
	dobin bin/lapis
}