summaryrefslogtreecommitdiff
blob: d9897a706c278b99463b0eee494df9143eda9862 (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
40
41
42
43
44
45
46
47
# 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

DESCRIPTION="A pure Lua implementation of the MessagePack serialization format"
HOMEPAGE="http://fperrad.github.io/lua-MessagePack/"
SRC_URI="https://dev.gentoo.org/~yngwin/distfiles/lua-${P}.tar.xz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"

# Requires lua-TestMore, which we currently haven't got in the tree
RESTRICT=test

DEPEND="${LUA_DEPS}"
RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"

REQUIRED_USE="${LUA_REQUIRED_USE}"

lua_src_install() {
	local src_postfix=""
	if [[ ${ELUA} != luajit ]] && $(ver_test $(lua_get_version) -ge 5.3); then
		src_postfix="5.3"
	fi

	insinto "$(lua_get_lmod_dir)"
	doins src${src_postfix}/MessagePack.lua
}

# nothing to compile
src_compile() { :; }

src_test() {
	lua_foreach_impl default
}

src_install() {
	lua_foreach_impl lua_src_install
	dodoc CHANGES README.md
}