dev-libs/libbson: bump to 1.13.0
[gentoo.git] / dev-libs / libbson / libbson-1.1.10.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit autotools eutils
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 ~x86"
15 IUSE="debug examples static-libs"
16
17 RDEPEND=""
18 DEPEND="${RDEPEND}"
19
20 DOCS=( AUTHORS NEWS README )
21
22 src_prepare() {
23         # https://github.com/mongodb/mongo-c-driver/issues/54
24         sed -i -e "s/PTHREAD_LIBS/PTHREAD_CFLAGS/g" src/bson/Makefile.am \
25                 tests/Makefile.am || die
26         eautoreconf
27 }
28
29 src_configure() {
30         econf --disable-hardening \
31                 --disable-optimizations \
32                 $(use_enable debug) \
33                 $(use_enable static-libs static)
34 }
35
36 src_install() {
37         emake DESTDIR="${D}" install
38         doman doc/*.3
39
40         use static-libs || find "${D}" -name '*.la' -delete
41
42         if use examples; then
43                 insinto /usr/share/${PF}/examples
44                 doins examples/*.c
45         fi
46 }