summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim A. Misbakh-Soloviov <mva@mva.name>2013-05-26 23:08:49 +0700
committerVadim A. Misbakh-Soloviov <mva@mva.name>2013-05-26 23:08:49 +0700
commitad030197a36a12b04feb87f8862f8aabdf06e506 (patch)
tree4148f4b7a16cb8076a878cdf879d9439e884a2f0 /dev-lua/luafilesystem
parent[dev-lua/verse] luajit-related fix (diff)
downloadlua-ad030197a36a12b04feb87f8862f8aabdf06e506.tar.gz
lua-ad030197a36a12b04feb87f8862f8aabdf06e506.tar.bz2
lua-ad030197a36a12b04feb87f8862f8aabdf06e506.zip
[dev-lua/luafilesystem] luajit-related fix
Signed-off-by: Vadim A. Misbakh-Soloviov <mva@mva.name>
Diffstat (limited to 'dev-lua/luafilesystem')
-rw-r--r--dev-lua/luafilesystem/luafilesystem-9999.ebuild20
1 files changed, 13 insertions, 7 deletions
diff --git a/dev-lua/luafilesystem/luafilesystem-9999.ebuild b/dev-lua/luafilesystem/luafilesystem-9999.ebuild
index d995435..7585aa8 100644
--- a/dev-lua/luafilesystem/luafilesystem-9999.ebuild
+++ b/dev-lua/luafilesystem/luafilesystem-9999.ebuild
@@ -3,7 +3,7 @@
# $Header: This ebuild is from Lua overlay; Bumped by mva; $
EAPI="5"
-inherit multilib toolchain-funcs git-2
+inherit multilib eutils git-2
DESCRIPTION="File System Library for the Lua Programming Language"
HOMEPAGE="http://keplerproject.github.com/luafilesystem/"
@@ -14,23 +14,29 @@ SRC_URI=""
LICENSE="MIT"
SLOT="0"
KEYWORDS=""
-IUSE=""
+IUSE="doc luajit"
-DEPEND="|| ( >=dev-lang/lua-5.1 dev-lang/luajit:2 )"
+DEPEND="
+ !luajit? ( dev-lang/lua )
+ luajit? ( dev-lang/luajit:2 )"
RDEPEND="${DEPEND}"
+DOCS=( README )
+
src_prepare() {
- sed -i \
+ sed \
-e "s|/usr/local|/usr|" \
-e "s|/lib|/$(get_libdir)|" \
-e "s|-O2|${CFLAGS}|" \
-e "/^LIB_OPTION/s|= |= ${LDFLAGS} |" \
-e "s|gcc|$(tc-getCC)|" \
- config || die
+ -i config || die "config fix failed"
+ use luajit && sed -r \
+ -e "s|(LUA_INC)=.*|\1 = $($(tc-getPKG_CONFIG) luajit --variable includedir)|" \
+ -i config || die "luajit include fix failed"
}
src_install() {
emake PREFIX="${ED}usr" install || die
- dodoc README || die
- dohtml doc/us/* || die
+ use doc && dohtml doc/us/* || die
}