summaryrefslogtreecommitdiff
blob: de31c1703020edd62a81ad5d519b051d14873d45 (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
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5

PYTHON_COMPAT=( python2_7 )

inherit eutils python-single-r1 autotools

DESCRIPTION="A searchable distributed Key-Value Store"

HOMEPAGE="http://hyperdex.org"
SRC_URI="http://hyperdex.org/src/${P}.tar.gz
	http://dev.gentooexperimental.org/~patrick/autotools-java.tar"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"

IUSE="test +python"
# need to add ruby and java useflags too
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) test? ( python )"

# Tests fail, still
RESTRICT="test"

DEPEND="
	dev-cpp/glog
	dev-cpp/sparsehash
	dev-libs/cityhash
	>=dev-libs/hyperleveldb-1.2
	>=dev-libs/libpo6-0.8
	>=dev-libs/libe-0.11
	>=dev-libs/busybee-0.7
	dev-libs/popt
	>=dev-libs/replicant-0.8
	>=dev-libs/libmacaroons-0.3
	>=dev-libs/libtreadstone-0.2
	dev-libs/json-c:=
	python? ( ${PYTHON_DEPS} )"
RDEPEND="${DEPEND}"

pkg_setup() {
	use python && python-single-r1_pkg_setup
}

src_prepare() {
	cp "${WORKDIR}/"*.m4 m4/
	sed -i -e 's~json/json.h~json-c/json.h~' configure.ac common/datatype_document.cc daemon/index_document.cc || die "Blergh!"
	eautoreconf
}

src_configure() {
	econf --disable-static \
		$(use_enable python python-bindings)
}

src_install() {
	emake DESTDIR="${D}" install
	newinitd "${FILESDIR}/hyperdex.initd" hyperdex
	newconfd "${FILESDIR}/hyperdex.confd" hyperdex
	find "${D}" -name '*.la' -exec rm {} \; # bad buildsystem! bad!
}

src_test() {
	emake -j1 check
}