dev-libs/libbson: bump to 1.13.0
[gentoo.git] / dev-libs / libbson / libbson-1.3.5.ebuild
1 # Copyright 1999-2016 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 ~x86"
15 IUSE="debug examples static-libs"
16
17 RDEPEND=""
18 DEPEND="${RDEPEND}"
19
20 DOCS=( AUTHORS NEWS README )
21
22 src_prepare() {
23         default_src_prepare
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
27         eautoreconf
28 }
29
30 src_configure() {
31         econf --disable-hardening \
32                 --disable-optimizations \
33                 $(use_enable debug) \
34                 $(use_enable static-libs static)
35 }
36
37 src_install() {
38         default_src_install
39         if [[ -f "${D}usr/share/doc/${P}/COPYING" ]] ; then
40                 rm "${D}usr/share/doc/${P}/COPYING" || die
41         fi
42         # Installing all the manuals conflicts with man-pages
43         doman doc/man/bson_*.3
44         use static-libs || find "${D}" -name '*.la' -delete
45
46         if use examples; then
47                 insinto /usr/share/${PF}/examples
48                 doins examples/*.c
49         fi
50 }