summaryrefslogtreecommitdiff
blob: 3e294c177ee1b3f0b3178b1d4e0a5625fe0457a0 (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
67
68
69
70
71
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-db/tokumx/tokumx-1.5.0-r1.ebuild,v 1.1 2014/08/01 21:00:15 grknight Exp $

EAPI=5
CMAKE_BUILD_TYPE=Release
PYTHON_COMPAT=( python2_7 )

inherit python-r1 cmake-utils

MY_P=${PN}-git-tag-${PV}

DESCRIPTION="An open source, high-performance distribution of MongoDB"
HOMEPAGE="http://www.tokutek.com/products/tokumx-for-mongodb/"
SRC_URI="mirror://gentoo/${MY_P}.tar.bz2"

LICENSE="AGPL-3 Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

RDEPEND="
	dev-libs/jemalloc
	>=dev-libs/boost-1.50[threads(+)]
	>=dev-libs/libpcre-8.30[cxx]
	net-libs/libpcap"
DEPEND="${RDEPEND}
	sys-libs/ncurses
	sys-libs/readline"

S="${WORKDIR}/mongo"
BUILD_DIR="${WORKDIR}/mongo/build"
QA_PRESTRIPPED="/usr/lib64/libHotBackup.so"

src_prepare() {
	epatch "${FILESDIR}/${PV}-Werror.diff"
	epatch "${FILESDIR}/${PN}-disable-bundled-libs.patch"
	cmake-utils_src_prepare
}

src_configure() {
	local mycmakeargs=(
		-D TOKU_DEBUG_PARANOID=OFF
		-D USE_VALGRIND=OFF
		-D USE_BDB=OFF
		-D BUILD_TESTING=OFF
		-D TOKUMX_DISTNAME=${PV}
		-D LIBJEMALLOC="jemalloc"
		-D TOKUMX_STRIP_BINARIES=0
		-D USE_SYSTEM_PCRE=1
		-D USE_SYSTEM_BOOST=1
	)
	cmake-utils_src_configure
}

src_install() {
	cmake-utils_src_install

	# Remove unnecessary files
	rm -r "${D}usr/buildscripts" "${D}usr/scripts" "${D}usr/src" || die

	# Correctly install this python script
	python_foreach_impl python_doscript scripts/tokumxstat.py

	# Clean up documentation installed to /usr
	pushd "${D}usr/" || die
	rm GNU-AGPL-3.0 LICENSE.txt NEWS README README.md README-TOKUDB README-TOKUKV SConstruct THIRD-PARTY-NOTICES || die
	popd || die
	dodoc README.md distsrc/NEWS distsrc/README distsrc/THIRD-PARTY-NOTICES
	newdoc src/third_party/ft-index/README-TOKUDB README-TOKUKV
}