mongo-tools-3.0.14.ebuild 1.1 KB

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