summaryrefslogtreecommitdiff
blob: a5629265ef21ffefdf8c598e8333f7539ebbe0a3 (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
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

EGIT_REPO_URI="https://github.com/aerospike/aerospike-client-c.git"

inherit autotools git-2

DESCRIPTION="Aerospike C Client"
HOMEPAGE="https://github.com/aerospike/aerospike-client-c"
SRC_URI=""

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="luajit +static-libs"

S="${WORKDIR}/aerospike-client-c-${PV}"

# tests fails to build ?
RESTRICT="test"

RDEPEND=">=dev-lang/lua-5.1.5:*
	>=dev-libs/openssl-1.0.1g:=
	dev-vcs/git
	luajit? ( >=dev-lang/luajit-2.0.3:* )"
DEPEND="${RDEPEND}"

src_prepare() {
	#TODO: still using bundled libs, that sucks
	#sed -e 's/^USE_LUAMOD = 1/USE_LUAMOD = 0/g' -i Makefile

	# luajit USE
	use luajit && sed -e 's/^USE_LUAJIT = 0/USE_LUAJIT = 1/g' -i Makefile

	git submodule update --init
}

src_compile() {
	CC=$(tc-getCC) LD=$(tc-getCC) MAKEOPTS="-j1" emake all
}

src_install() {
	dolib target/Linux-x86_64/lib/libaerospike.so
	use static-libs && dolib.a target/Linux-x86_64/lib/libaerospike.a

	insinto /usr/include/
	doins -r target/Linux-x86_64/include/{aerospike,citrusleaf,ck}

	insinto /opt/aerospike/client/sys/udf/lua/
	doins modules/lua-core/src/{aerospike,as,stream_ops}.lua
}