mongo-tools-3.4.3.ebuild 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 libressl"
  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. net-libs/libpcap
  21. sasl? ( dev-libs/cyrus-sasl )
  22. ssl? (
  23. !libressl? ( dev-libs/openssl:0= )
  24. libressl? ( dev-libs/libressl:0= )
  25. )"
  26. S=${WORKDIR}/${MY_P}
  27. src_prepare() {
  28. sed -e 's|go build .*|go build -o "bin/$i" -tags "$tags" "$i/main/$i.go"|g' -i build.sh || die
  29. # ensure we use bash wrt #582906
  30. sed -e 's@/bin/sh@/bin/bash@g' -i build.sh || die
  31. epatch "${FILESDIR}/${PN}-3.2.10-pie.patch"
  32. }
  33. src_compile() {
  34. local myconf
  35. if use sasl; then
  36. myconf="${myconf} sasl"
  37. fi
  38. if use ssl; then
  39. myconf="${myconf} ssl"
  40. fi
  41. ./build.sh ${myconf} || die "build failed"
  42. }
  43. src_install() {
  44. dobin bin/*
  45. }