1 # Copyright 1999-2018 Gentoo Authors
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 ~ppc ~sparc ~x86"
15 IUSE="debug examples static-libs"
17 DOCS=( AUTHORS NEWS README )
21 # https://github.com/mongodb/mongo-c-driver/issues/54
22 sed -i -e "s/PTHREAD_LIBS/PTHREAD_CFLAGS/g" src/bson/Makefile.am \
23 tests/Makefile.am || die
28 econf --disable-hardening \
29 --disable-optimizations \
31 $(use_enable static-libs static)
37 if [[ -f "${D}usr/share/doc/${P}/COPYING" ]] ; then
38 rm "${D}usr/share/doc/${P}/COPYING" || die
41 # Installing all the manuals conflicts with man-pages
42 doman doc/man/bson_*.3
43 use static-libs || find "${D}" -name '*.la' -delete
46 insinto /usr/share/${PF}/examples