summaryrefslogtreecommitdiff
blob: aa3f9f52153ad7f09fbfcd0a7a0841de946498d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

VCS="git"
GITHUB_A="spc476"
GITHUB_PN="${PN^^}"
inherit lua

DESCRIPTION="The most comprehensive CBOR module in the Lua universe"
HOMEPAGE="https://github.com/spc476/CBOR"

LICENSE="MIT"
SLOT="0"
KEYWORDS=""
IUSE="doc +examples"

RDEPEND="
	|| (
		dev-lua/lpeg
		dev-lua/lulpeg[lpeg_replace]
	)
"
DEPEND="
	${RDEPEND}
"

EXAMPLES=( test.lua test_s.lua )
DOCS=(README)

all_lua_prepare() {
	sed -r \
		-e 's@^(prefix).*@\1=/usr@' \
		-e 's@(.*LUA_DIR.*/lua/.*shell )lua( -e "print.*)@\1${LUA_IMPL}\2@' \
		-i Makefile

	lua_default
}