diff options
author | 2015-09-12 19:17:11 +0600 | |
---|---|---|
committer | 2015-09-12 19:17:11 +0600 | |
commit | e81d4e9013537aaadc792c1265f94931c8c5bc0a (patch) | |
tree | 5e0d3240e01055a8675192312c3548c917f0919c /dev-lua/moonscript | |
parent | lua-htmlparser: remove lua-set dep (diff) | |
download | lua-e81d4e9013537aaadc792c1265f94931c8c5bc0a.tar.gz lua-e81d4e9013537aaadc792c1265f94931c8c5bc0a.tar.bz2 lua-e81d4e9013537aaadc792c1265f94931c8c5bc0a.zip |
eclass/lua: added; dev-lua/*: moving to lua eclass
Signed-off-by: Vadim A. Misbakh-Soloviov <git@mva.name>
Diffstat (limited to 'dev-lua/moonscript')
-rw-r--r-- | dev-lua/moonscript/moonscript-9999.ebuild | 55 |
1 files changed, 24 insertions, 31 deletions
diff --git a/dev-lua/moonscript/moonscript-9999.ebuild b/dev-lua/moonscript/moonscript-9999.ebuild index 6989367..baca13f 100644 --- a/dev-lua/moonscript/moonscript-9999.ebuild +++ b/dev-lua/moonscript/moonscript-9999.ebuild @@ -4,7 +4,8 @@ EAPI="5" -inherit base toolchain-funcs git-r3 +VCS="git-r3" +inherit lua DESCRIPTION="A programmer friendly language that compiles into Lua." HOMEPAGE="https://github.com/leafo/moonscript" @@ -15,48 +16,40 @@ EGIT_REPO_URI="https://github.com/leafo/moonscript" LICENSE="MIT" SLOT="0" KEYWORDS="" -IUSE="luajit +inotify" +IUSE="+doc +inotify" RDEPEND=" - virtual/lua[luajit=] - dev-lua/lpeg + || ( + dev-lua/lpeg + dev-lua/lulpeg[lpeg-compat] + ) dev-lua/luafilesystem dev-lua/alt-getopt inotify? ( dev-lua/linotify ) " -DEPEND=" - ${RDEPEND} - virtual/pkgconfig -" - -HTML_DOCS=( "docs/" "README.md" ) - -src_prepare() { - local lua=lua; - use luajit && lua=luajit; +DEPEND="${RDEPEND}" - sed -r \ - -e "s/lua5.1/${lua}/" \ - -i Makefile +DOCS=( docs/ README.md ) - sed -r \ - -e "1s#(/usr/bin/env) lua#\1 ${lua}#" \ - -i bin/moon bin/moonc +each_lua_compile() { + local lua="$(lua_get_implementation)" + ${lua} bin/moonc moon/ moonscript/ } -src_compile() { - emake compile -} +all_lua_compile() { + local lua="$(lua_get_implementation)" -src_install() { - local lua=lua; - use luajit && lua=luajit; + echo "#!/usr/bin/env lua" > bin/moon + ${lua} bin/moonc -p bin/moon.moon >> bin/moon + echo "-- vim: set filetype=lua:" >> bin/moon - insinto "$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD ${lua})" - doins -r moon.lua moonscript.lua moon moonscript + ${lua} bin/moonc -p bin/splat.moon >> bin/splat +} - dobin bin/moon bin/moonc - newbin bin/splat.moon splat +each_lua_install() { + dolua moon{,script}{,.lua} +} - base_src_install_docs +all_lua_install() { + dobin bin/{moon,moonc,splat} } |