summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim A. Misbakh-Soloviov <git@mva.name>2015-09-30 13:39:45 +0600
committerVadim A. Misbakh-Soloviov <git@mva.name>2015-09-30 13:39:45 +0600
commit43b29c34f682cbde48f23c42fd13d334d7bb425c (patch)
treebcc77aff84dfb5e8659e05a8aec694cb32f6a2f2 /dev-lua/lulpeg
parenteclass/lua: added; dev-lua/*: moving to lua eclass (diff)
downloadlua-43b29c34f682cbde48f23c42fd13d334d7bb425c.tar.gz
lua-43b29c34f682cbde48f23c42fd13d334d7bb425c.tar.bz2
lua-43b29c34f682cbde48f23c42fd13d334d7bb425c.zip
some more work about porting to lua eclass
Signed-off-by: Vadim A. Misbakh-Soloviov <git@mva.name>
Diffstat (limited to 'dev-lua/lulpeg')
-rw-r--r--dev-lua/lulpeg/lulpeg-9999.ebuild35
1 files changed, 13 insertions, 22 deletions
diff --git a/dev-lua/lulpeg/lulpeg-9999.ebuild b/dev-lua/lulpeg/lulpeg-9999.ebuild
index d754b9e..8d499bc 100644
--- a/dev-lua/lulpeg/lulpeg-9999.ebuild
+++ b/dev-lua/lulpeg/lulpeg-9999.ebuild
@@ -4,7 +4,8 @@
EAPI="5"
-inherit toolchain-funcs git-r3
+VCS="git-r3"
+inherit lua
DESCRIPTION="A pure Lua port of LPeg, Roberto Ierusalimschy's Parsing Expression Grammars library"
HOMEPAGE="https://github.com/pygy/LuLPeg"
@@ -15,29 +16,19 @@ EGIT_REPO_URI="https://github.com/pygy/LuLPeg"
LICENSE="WTFPL"
SLOT="0"
KEYWORDS=""
-IUSE="luajit +lpeg_replace"
+IUSE="lpeg_replace"
-RDEPEND="
- virtual/lua[luajit=]
- lpeg_replace? ( !dev-lua/lpeg )
-"
-DEPEND="${RDEPEND}"
+READMES=( README.md TODO.md ABOUT )
-src_prepare() {
- epatch_user
+each_lua_compile() {
+ #paranoid mode:
+ rm "${PN}.lua" && (
+ cd src
+ "${LUA}" ../scripts/pack.lua > ../"${PN}.lua"
+ )
}
-src_install() {
- local pkg_n=lulpeg
- local lua=lua
- use luajit && lua=luajit
-
- use lpeg_replace && pkg_n=lpeg
-
- mv src "${pkg_n}"
-
- insinto "$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD ${lua})"
- doins -r "${pkg_n}"
-
- dodoc README.md TODO.md ABOUT || die "dodoc failed"
+each_lua_install() {
+ dolua "${PN}".lua
+ use lpeg_replace && newlua "${PN}.lua" lpeg.lua
}