mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
dev-lua/lpeg: revbump to 1.0.0-r1
Bring up to EAPI 6 Add LuaJIT Support Install re.lua Gentoo-Bug: https://bugs.gentoo.org/577250 Closes: https://github.com/gentoo/gentoo/pull/1317 Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
This commit is contained in:
committed by
Patrice Clement
parent
280f0e723e
commit
03538dca96
48
dev-lua/lpeg/lpeg-1.0.0-r1.ebuild
Normal file
48
dev-lua/lpeg/lpeg-1.0.0-r1.ebuild
Normal file
@@ -0,0 +1,48 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit flag-o-matic toolchain-funcs
|
||||
|
||||
DESCRIPTION="Parsing Expression Grammars for Lua"
|
||||
HOMEPAGE="http://www.inf.puc-rio.br/~roberto/lpeg/"
|
||||
SRC_URI="http://www.inf.puc-rio.br/~roberto/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~hppa ~ppc ~x86"
|
||||
IUSE="debug doc luajit"
|
||||
|
||||
RDEPEND="!luajit? ( >=dev-lang/lua-5.1:= )
|
||||
luajit? ( dev-lang/luajit:2= )"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig"
|
||||
|
||||
DOCS=( "HISTORY" )
|
||||
HTML_DOCS=( "lpeg.html" "re.html" )
|
||||
PATCHES=( "${FILESDIR}"/${PN}-0.12.1-makefile.patch )
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
use debug && append-cflags -DLPEG_DEBUG
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake CC="$(tc-getCC)" \
|
||||
LUADIR="$($(tc-getPKG_CONFIG) --variable includedir $(usex luajit 'luajit' 'lua'))"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
$(usex luajit 'luajit' 'lua') test.lua || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
exeinto "$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD $(usex luajit 'luajit' 'lua'))"
|
||||
doexe lpeg.so
|
||||
insinto "$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD $(usex luajit 'luajit' 'lua'))"
|
||||
doins re.lua
|
||||
|
||||
use doc && einstalldocs
|
||||
}
|
||||
@@ -13,4 +13,8 @@
|
||||
<email>lluixhi@gmail.com</email>
|
||||
<name>Aric Belsito</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="luajit">Use <pkg>dev-lang/luajit</pkg> instead of
|
||||
<pkg>dev-lang/lua</pkg></flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
|
||||
Reference in New Issue
Block a user