blob: bbb9a3302c82ccc12589921fea91b99cab00e4ca (
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
|
# 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 programmer friendly language that compiles into Lua."
HOMEPAGE="https://github.com/leafo/moonscript"
LICENSE="MIT"
SLOT="0"
KEYWORDS=""
IUSE="+doc +inotify"
RDEPEND="
|| (
dev-lua/lpeg
dev-lua/lulpeg[lpeg_replace]
)
dev-lua/luafilesystem
dev-lua/alt-getopt
inotify? ( dev-lua/linotify )
"
DEPEND="${RDEPEND}"
DOCS=(docs/. README.md)
each_lua_compile() {
local lua="$(lua_get_implementation)"
${lua} bin/moonc moon/ moonscript/
}
all_lua_compile() {
local lua="$(lua_get_implementation)"
echo "#!/usr/bin/env lua" > bin/moon
${lua} bin/moonc -p bin/moon.moon >> bin/moon
echo "-- vim: set filetype=lua:" >> bin/moon
${lua} bin/moonc -p bin/splat.moon >> bin/splat
}
each_lua_install() {
dolua moon{,script}{,.lua}
}
all_lua_install() {
dobin bin/{moon,moonc,splat}
}
|