blob: 144c297b91963230d37e28746b202f6ba01aa7ab (
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
|
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: This ebuild is from Lua overlay; Bumped by mva; $
EAPI="5"
inherit toolchain-funcs git-r3
DESCRIPTION="libevent bindings for Lua"
HOMEPAGE="http://luaforge.net/projects/luaevent http://repo.or.cz/w/luaevent.git"
EGIT_REPO_URI="https://github.com/harningt/luaevent git://github.com/harningt/luaevent.git"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS=""
IUSE="luajit"
RDEPEND="
virtual/lua[luajit=]
>=dev-libs/libevent-1.4
"
DEPEND="
${RDEPEND}
virtual/pkgconfig
"
src_prepare() {
local lua=lua;
use luajit && lua=luajit;
sed -i "s:^CFLAGS =:CFLAGS +=:" "${S}/Makefile" \
|| die "sed failed"
sed -i "s:^LDFLAGS =:LDFLAGS +=:" "${S}/Makefile" \
|| die "sed failed"
sed -i "/^LDFLAGS/a CC = $(tc-getCC)" "${S}/Makefile" \
|| die "sed failed"
sed -i "s:^LUA_INC_DIR ?=.*:LUA_INC_DIR ?= $($(tc-getPKG_CONFIG) --variable includedir ${lua}):" "${S}/Makefile" \
|| die "sed failed"
sed -i "s:^INSTALL_DIR_LUA ?=.*:INSTALL_DIR_LUA ?= $($(tc-getPKG_CONFIG) --variable INSTALL_LMOD ${lua}):" "${S}/Makefile" \
|| die "sed failed"
sed -i "s:^INSTALL_DIR_BIN ?=.*:INSTALL_DIR_BIN ?= $($(tc-getPKG_CONFIG) --variable INSTALL_CMOD ${lua}):" "${S}/Makefile" \
|| die "sed failed"
}
src_install() {
emake DESTDIR="${D}" install || die "Install failed"
}
|