Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lua/lpeg/
Date: Sat, 28 Nov 2020 23:13:28
Message-Id: 1606605128.1a6dc03ce8e11606e794ea6d187771e18432153c.robbat2@gentoo
1 commit: 1a6dc03ce8e11606e794ea6d187771e18432153c
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 28 22:51:00 2020 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 28 23:12:08 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a6dc03c
7
8 dev-lua/lpeg: revbump with slotted lua support
9
10 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
11
12 dev-lua/lpeg/lpeg-1.0.2-r101.ebuild | 79 +++++++++++++++++++++++++++++++++++++
13 1 file changed, 79 insertions(+)
14
15 diff --git a/dev-lua/lpeg/lpeg-1.0.2-r101.ebuild b/dev-lua/lpeg/lpeg-1.0.2-r101.ebuild
16 new file mode 100644
17 index 00000000000..10a6b94a1b4
18 --- /dev/null
19 +++ b/dev-lua/lpeg/lpeg-1.0.2-r101.ebuild
20 @@ -0,0 +1,79 @@
21 +# Copyright 1999-2020 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=7
25 +
26 +LUA_COMPAT=( lua5-{1..3} luajit )
27 +
28 +inherit lua flag-o-matic toolchain-funcs
29 +
30 +DESCRIPTION="Parsing Expression Grammars for Lua"
31 +HOMEPAGE="http://www.inf.puc-rio.br/~roberto/lpeg/"
32 +SRC_URI="http://www.inf.puc-rio.br/~roberto/${PN}/${P}.tar.gz"
33 +
34 +LICENSE="MIT"
35 +SLOT="0"
36 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86"
37 +IUSE="test debug doc"
38 +REQUIRED_USE="${LUA_REQUIRED_USE}"
39 +
40 +RESTRICT="!test? ( test )"
41 +
42 +RDEPEND="${LUA_DEPS}"
43 +DEPEND="${RDEPEND}"
44 +BDEPEND="
45 + virtual/pkgconfig
46 + test? ( ${RDEPEND} )
47 +"
48 +
49 +DOCS=( HISTORY )
50 +HTML_DOCS=( lpeg.html re.html )
51 +PATCHES=( "${FILESDIR}"/${PN}-1.0.2-makefile.patch )
52 +
53 +lua_src_prepare() {
54 + if ! test -d "${S}.${ELUA}/" ; then
55 + cp -ral "${S}/" "${S}.${ELUA}/" || die
56 + fi
57 +}
58 +
59 +src_prepare() {
60 + default
61 + use debug && append-cflags -DLPEG_DEBUG
62 + lua_foreach_impl lua_src_prepare
63 +}
64 +
65 +lua_src_compile() {
66 + cd "${S}.${ELUA}/" || die
67 + emake CC="$(tc-getCC)" \
68 + LUADIR="$(lua_get_include_dir)"
69 +}
70 +
71 +src_compile() {
72 + lua_foreach_impl lua_src_compile
73 +}
74 +
75 +lua_src_test() {
76 + cd "${S}.${ELUA}/" || die
77 + ${ELUA} test.lua || die
78 +}
79 +
80 +src_test() {
81 + lua_foreach_impl lua_src_test
82 +}
83 +
84 +lua_src_install() {
85 + cd "${S}.${ELUA}/" || die
86 + local instdir
87 + instdir="$(lua_get_cmod_dir)"
88 + exeinto "${instdir#${EPREFIX}}"
89 + doexe lpeg.so
90 + instdir="$(lua_get_lmod_dir)"
91 + insinto "${instdir#${EPREFIX}}"
92 + doins re.lua
93 +}
94 +
95 +src_install() {
96 + lua_foreach_impl lua_src_install
97 + cd "${S}" || die
98 + use doc && einstalldocs
99 +}