From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D579E13835A for ; Sat, 28 Nov 2020 23:13:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E3DAFE0815; Sat, 28 Nov 2020 23:13:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CBD56E0815 for ; Sat, 28 Nov 2020 23:13:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EDF6A335CFE for ; Sat, 28 Nov 2020 23:13:26 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9F6C7468 for ; Sat, 28 Nov 2020 23:13:25 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1606605128.1a6dc03ce8e11606e794ea6d187771e18432153c.robbat2@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lua/lpeg/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lua/lpeg/lpeg-1.0.2-r101.ebuild X-VCS-Directories: dev-lua/lpeg/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 1a6dc03ce8e11606e794ea6d187771e18432153c X-VCS-Branch: master Date: Sat, 28 Nov 2020 23:13:25 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7dff7a9e-3f65-4983-a9e6-84a32476d775 X-Archives-Hash: ecdf21d914a7f870a373076ab9a9c029 commit: 1a6dc03ce8e11606e794ea6d187771e18432153c Author: Robin H. Johnson gentoo org> AuthorDate: Sat Nov 28 22:51:00 2020 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Sat Nov 28 23:12:08 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a6dc03c dev-lua/lpeg: revbump with slotted lua support Signed-off-by: Robin H. Johnson gentoo.org> dev-lua/lpeg/lpeg-1.0.2-r101.ebuild | 79 +++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/dev-lua/lpeg/lpeg-1.0.2-r101.ebuild b/dev-lua/lpeg/lpeg-1.0.2-r101.ebuild new file mode 100644 index 00000000000..10a6b94a1b4 --- /dev/null +++ b/dev-lua/lpeg/lpeg-1.0.2-r101.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +LUA_COMPAT=( lua5-{1..3} luajit ) + +inherit lua 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 ~sparc ~x86" +IUSE="test debug doc" +REQUIRED_USE="${LUA_REQUIRED_USE}" + +RESTRICT="!test? ( test )" + +RDEPEND="${LUA_DEPS}" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig + test? ( ${RDEPEND} ) +" + +DOCS=( HISTORY ) +HTML_DOCS=( lpeg.html re.html ) +PATCHES=( "${FILESDIR}"/${PN}-1.0.2-makefile.patch ) + +lua_src_prepare() { + if ! test -d "${S}.${ELUA}/" ; then + cp -ral "${S}/" "${S}.${ELUA}/" || die + fi +} + +src_prepare() { + default + use debug && append-cflags -DLPEG_DEBUG + lua_foreach_impl lua_src_prepare +} + +lua_src_compile() { + cd "${S}.${ELUA}/" || die + emake CC="$(tc-getCC)" \ + LUADIR="$(lua_get_include_dir)" +} + +src_compile() { + lua_foreach_impl lua_src_compile +} + +lua_src_test() { + cd "${S}.${ELUA}/" || die + ${ELUA} test.lua || die +} + +src_test() { + lua_foreach_impl lua_src_test +} + +lua_src_install() { + cd "${S}.${ELUA}/" || die + local instdir + instdir="$(lua_get_cmod_dir)" + exeinto "${instdir#${EPREFIX}}" + doexe lpeg.so + instdir="$(lua_get_lmod_dir)" + insinto "${instdir#${EPREFIX}}" + doins re.lua +} + +src_install() { + lua_foreach_impl lua_src_install + cd "${S}" || die + use doc && einstalldocs +}