summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAric Belsito <lluixhi@gmail.com>2016-04-20 18:30:33 -0700
committerPatrice Clement <monsieurp@gentoo.org>2016-04-21 22:22:36 +0000
commit03538dca961bb5d299562e1ec08cb27cd5a5dadc (patch)
treee6eec5ec30ce3de0d840e024817c0ba6cee696a2 /dev-lua/lpeg
parentdev-lua/lpeg: Set self as proxy-maint (diff)
downloadgentoo-03538dca961bb5d299562e1ec08cb27cd5a5dadc.tar.gz
gentoo-03538dca961bb5d299562e1ec08cb27cd5a5dadc.tar.bz2
gentoo-03538dca961bb5d299562e1ec08cb27cd5a5dadc.zip
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>
Diffstat (limited to 'dev-lua/lpeg')
-rw-r--r--dev-lua/lpeg/lpeg-1.0.0-r1.ebuild48
-rw-r--r--dev-lua/lpeg/metadata.xml4
2 files changed, 52 insertions, 0 deletions
diff --git a/dev-lua/lpeg/lpeg-1.0.0-r1.ebuild b/dev-lua/lpeg/lpeg-1.0.0-r1.ebuild
new file mode 100644
index 00000000000..059315adfeb
--- /dev/null
+++ b/dev-lua/lpeg/lpeg-1.0.0-r1.ebuild
@@ -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
+}
diff --git a/dev-lua/lpeg/metadata.xml b/dev-lua/lpeg/metadata.xml
index 94eea515a96..e35e7838c27 100644
--- a/dev-lua/lpeg/metadata.xml
+++ b/dev-lua/lpeg/metadata.xml
@@ -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>