1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
8 DESCRIPTION="A BSON utility library"
9 HOMEPAGE="https://github.com/mongodb/libbson"
10 SRC_URI="https://github.com/mongodb/${PN}/releases/download/${PV}/${P}.tar.gz"
14 KEYWORDS="~amd64 ~hppa ~x86"
15 IUSE="debug examples static-libs"
20 DOCS=( AUTHORS NEWS README )
24 # https://github.com/mongodb/mongo-c-driver/issues/54
25 sed -i -e "s/PTHREAD_LIBS/PTHREAD_CFLAGS/g" src/bson/Makefile.am \
26 tests/Makefile.am || die
31 econf --disable-hardening \
32 --disable-optimizations \
34 $(use_enable static-libs static)
39 if [[ -f "${D}usr/share/doc/${P}/COPYING" ]] ; then
40 rm "${D}usr/share/doc/${P}/COPYING" || die
42 # Installing all the manuals conflicts with man-pages
43 doman doc/man/bson_*.3
44 use static-libs || find "${D}" -name '*.la' -delete
47 insinto /usr/share/${PF}/examples