blob: 9ba5737dde1fe56a8a2670129859747e11c4b49a (
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
|
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit toolchain-funcs
DESCRIPTION="Lua-5.2-style APIs for Lua 5.1"
HOMEPAGE="https://github.com/keplerproject/lua-compat-5.2"
SRC_URI="https://github.com/keplerproject/lua-compat-5.2/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SLOT="0"
LICENSE="MIT"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="+bit32 +compat52"
RDEPEND="dev-lang/lua:="
DEPEND="${RDEPEND}
virtual/pkgconfig"
S="${WORKDIR}/lua-compat-5.2-0.3"
src_compile() {
if use bit32; then
$(tc-getCC) $($(tc-getBUILD_PKG_CONFIG) --cflags --libs lua5.1) \
${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -fPIC -shared \
-I c-api -o bit32.so lbitlib.c || die
fi
}
src_install() {
insinto "$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD lua)"
if use bit32; then
doins bit32.so
fi
insinto "$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD lua)"
if use compat52; then
doins compat52.lua
newins compat52/strict.lua compat52.strict.lua
newins compat52/mstrict.lua compat52.mstrict.lua
fi
}
|