forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
luaevent-0.4.6.ebuild
40 lines (33 loc) · 1.14 KB
/
luaevent-0.4.6.ebuild
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
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
inherit toolchain-funcs
DESCRIPTION="libevent bindings for Lua"
HOMEPAGE="http://luaforge.net/projects/luaevent"
SRC_URI="https://github.com/harningt/luaevent/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE=""
RDEPEND="dev-lang/lua:0
dev-libs/libevent:0="
DEPEND="${RDEPEND}
virtual/pkgconfig"
src_prepare() {
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 ?= $(pkg-config --variable INSTALL_INC lua):" "${S}/Makefile" \
|| die "sed failed"
sed -i "s:^INSTALL_DIR_LUA ?=.*:INSTALL_DIR_LUA ?= $(pkg-config --variable INSTALL_LMOD lua):" "${S}/Makefile" \
|| die "sed failed"
sed -i "s:^INSTALL_DIR_BIN ?=.*:INSTALL_DIR_BIN ?= $(pkg-config --variable INSTALL_CMOD lua):" "${S}/Makefile" \
|| die "sed failed"
eapply_user
}
src_install() {
emake DESTDIR="${D}" install
}