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