aboutsummaryrefslogtreecommitdiff
path: root/dev-lua/luazen/luazen-0.16.ebuild
blob: 4b7a543e48e2f91458b4d851eb5953dc0cf71339 (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
48
49
50
51
52
53
54
55
#
# ~~~ dev-lua/luazen
#
# ~~~ a compression & crypto library for lua
#

#
# ~~~ metadata

# portage info
EAPI=8
SLOT=0

KEYWORDS="amd64"

# info
HOMEPAGE="https://github.com/philanc/luazen/"
DESCRIPTION="A compression & crypto library for Lua"

# package data
SRC_URI="https://github.com/philanc/luazen/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

#
# ~~~ dependencies

# lua setup
LUA_COMPAT=( lua5-{3..4} )

inherit lua

REQUIRED_USE="${LUA_REQUIRED_USE}"

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

lua_src_compile() {
    emake LUAINC="-I$(lua_get_include_dir)"
    echo $(lua_get_cmod_dir)
}

src_compile() {
    lua_foreach_impl lua_src_compile
}

lua_src_install() {
    insinto $(lua_get_cmod_dir)

    doins luazen.a
    doins luazen.so
}

src_install() {
    lua_foreach_impl lua_src_install
}