diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-06-16 21:23:20 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-06-16 21:23:20 +0100 |
commit | fab849d1daed0ba7f2ac497d07985c3dbb692543 (patch) | |
tree | 10baa743a5340b42ad538dd19d48669ccac209b1 /dev-lua/lpeg/lpeg-1.0.2.ebuild | |
parent | 73c318acdaf6f8309d68bd266051e6dd1f1bd787 (diff) |
gentoo resync : 16.06.2019
Diffstat (limited to 'dev-lua/lpeg/lpeg-1.0.2.ebuild')
-rw-r--r-- | dev-lua/lpeg/lpeg-1.0.2.ebuild | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/dev-lua/lpeg/lpeg-1.0.2.ebuild b/dev-lua/lpeg/lpeg-1.0.2.ebuild new file mode 100644 index 000000000000..5596fb03b62e --- /dev/null +++ b/dev-lua/lpeg/lpeg-1.0.2.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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 ~arm64 ~hppa ~mips ~ppc ~ppc64 ~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}-1.0.2-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() { + local instdir + instdir="$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD $(usex luajit 'luajit' 'lua'))" + exeinto "${instdir#${EPREFIX}}" + doexe lpeg.so + instdir="$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD $(usex luajit 'luajit' 'lua'))" + insinto "${instdir#${EPREFIX}}" + doins re.lua + + use doc && einstalldocs +} |