summaryrefslogtreecommitdiff
blob: c6148408dd91ceb6a78d0f5aef548b9ede964eec (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
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5

IS_MULTILIB=true
VCS="git-r3"

inherit lua

DESCRIPTION="A self contained Lua MessagePack C implementation"
HOMEPAGE="https://github.com/antirez/lua-cmsgpack"

EGIT_REPO_URI="https://github.com/antirez/lua-cmsgpack"
KEYWORDS=""
READMES=( README.md )

LICENSE="BSD-2"
SLOT="0"
IUSE="test"

each_lua_compile() {
	_lua_setFLAGS
	local MY_PN="lua_${PN}"

	${CC} ${CFLAGS} -c -o ${MY_PN}.o ${MY_PN}.c || die
	${CC} ${LDFLAGS} -o ${PN}.so ${MY_PN}.o || die
}

each_lua_test() {
	${LUA} test.lua || die
}

each_lua_install() {
	dolua "${PN}.so"
}