app-admin/mongo-tools: bump to 3.0.15 and 3.2.15
[gentoo.git] / app-admin / mongo-tools / mongo-tools-3.0.15.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit eutils
7
8 MY_PV=${PV/_rc/-rc}
9 MY_P=${PN}-r${MY_PV}
10
11 DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
12 HOMEPAGE="http://www.mongodb.org"
13 SRC_URI="https://github.com/mongodb/mongo-tools/archive/r${MY_PV}.tar.gz -> mongo-tools-${MY_PV}.tar.gz"
14
15 LICENSE="Apache-2.0"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="sasl ssl"
19
20 # Maintainer note:
21 # openssl DEPEND constraint, see:
22 # https://github.com/mongodb/mongo-tools/issues/11
23
24 RDEPEND="!<dev-db/mongodb-3.0.0"
25 DEPEND="${RDEPEND}
26         dev-lang/go:=
27         sasl? ( dev-libs/cyrus-sasl )
28         ssl? ( dev-libs/openssl )"
29
30 S=${WORKDIR}/${MY_P}
31
32 src_prepare() {
33         # ensure we use bash wrt #582906
34         sed -e 's@/bin/sh@/bin/bash@g' -i build.sh || die
35
36         # see #608292
37         epatch "${FILESDIR}/${PN}-3.2.10-pie.patch"
38 }
39
40 src_compile() {
41         local myconf
42
43         if use sasl; then
44           myconf="${myconf} sasl"
45         fi
46
47         if use ssl; then
48           myconf="${myconf} ssl"
49         fi
50
51         ./build.sh ${myconf} || die "build failed"
52 }
53
54 src_install() {
55         dobin bin/*
56 }