dev-libs/libbson: bump to 1.13.0
[gentoo.git] / dev-libs / libbson / libbson-1.3.6.ebuild
1 # Copyright 1999-2018 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit autotools
7
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"
11
12 LICENSE="BSD"
13 SLOT="0"
14 KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86"
15 IUSE="debug examples static-libs"
16
17 DOCS=( AUTHORS NEWS README )
18
19 src_prepare() {
20         default_src_prepare
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
24         eautoreconf
25 }
26
27 src_configure() {
28         econf --disable-hardening \
29                 --disable-optimizations \
30                 $(use_enable debug) \
31                 $(use_enable static-libs static)
32 }
33
34 src_install() {
35         default
36
37         if [[ -f "${D}usr/share/doc/${P}/COPYING" ]] ; then
38                 rm "${D}usr/share/doc/${P}/COPYING" || die
39         fi
40
41         # Installing all the manuals conflicts with man-pages
42         doman doc/man/bson_*.3
43         use static-libs || find "${D}" -name '*.la' -delete
44
45         if use examples; then
46                 insinto /usr/share/${PF}/examples
47                 doins examples/*.c
48         fi
49
50         einstalldocs
51 }