dev-lua/*: update emake args
[sgilles-overlay.git] / dev-lua / lua-unibilium / lua-unibilium-2.0.0.ebuild
blob9bdf904c2c3adc105de12633a1524b4824a82fe7
1 # Copyright 1999-2019 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 LUA_COMPAT=( lua5-{1..4} luajit )
8 inherit lua git-r3
10 DESCRIPTION="Lua bindings for unibilium"
11 HOMEPAGE="https://repo.or.cz/lua-unibilium.git"
12 EGIT_REPO_URI="https://repo.or.cz/lua-unibilium.git"
14 if [[ "${PV}" == *999* ]]; then
15         :
16 else
17         EGIT_COMMIT="v${PV}"
18         KEYWORDS="~amd64"
21 LICENSE="MIT"
22 SLOT="0"
23 IUSE=""
25 DEPEND="${LUA_DEPS}
26         >=dev-libs/unibilium-2.0.0"
27 RDEPEND="${DEPEND}"
29 DOCS=(README)
31 src_prepare() {
32         default
34         lua_copy_sources
37 lua_src_compile() {
38         pushd "${BUILD_DIR}" || die
40         local myemakeargs=(
41                 "CC=$(tc-getCC)"
42                 "LD=$(tc-getCC)"
43                 "LUAINC_linux=$(lua_get_include_dir)"
44                 "CFLAGS=${CFLAGS} -I$(lua_get_include_dir)"
45                 "LDFLAGS=${LDFLAGS}"
46         )
48         emake "${myemakeargs[@]}"
50         popd
53 src_compile() {
54         lua_foreach_impl lua_src_compile
57 lua_src_install () {
58         pushd "${BUILD_DIR}" || die
60         local emakeargs=(
61                 "INSTALL_CMOD=${ED}/$(lua_get_cmod_dir)"
62                 "INSTALL_LMOD=${ED}/$(lua_get_lmod_dir)"
63         )
65         emake "${emakeargs[@]}" install
67         popd
70 src_install() {
71         lua_foreach_impl lua_src_install
73         einstalldocs