dev-libs/libbson: bump to 1.13.0
[gentoo.git] / dev-libs / libbson / libbson-1.6.2.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
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 ~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-optimizations \
29                 $(use_enable debug) \
30                 $(use_enable static-libs static)
31 }
32
33 src_install() {
34         default
35
36         # Installing all the manuals conflicts with man-pages
37         doman doc/man/bson_*.3
38
39         if ! use static-libs; then
40                 find "${D}" -name '*.la' -delete || die
41         fi
42
43         if use examples; then
44                 docinto examples
45                 dodoc examples/*.c
46         fi
47
48         einstalldocs
49 }
50
51 src_test() {
52         emake test
53 }