6aca55220c67a06cab279db3f087db311880cef8
[gentoo.git] / dev-libs / libbson / libbson-1.16.2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit cmake-utils
7
8 DESCRIPTION="Library routines related to building,parsing and iterating BSON documents"
9 HOMEPAGE="https://github.com/mongodb/mongo-c-driver/tree/master/src/libbson"
10 SRC_URI="https://github.com/mongodb/mongo-c-driver/releases/download/${PV}/mongo-c-driver-${PV}.tar.gz -> ${P}.tar.gz"
11
12 LICENSE="Apache-2.0"
13 SLOT="0"
14 KEYWORDS="~amd64 ~hppa ~ppc ~x86"
15 IUSE="examples static-libs"
16
17 DEPEND="dev-python/sphinx"
18
19 PATCHES=(
20         "${FILESDIR}/${PN}-1.14.0-no-docs.patch"
21         "${FILESDIR}/${PN}-1.16.2-single-doc-job.patch"
22         "${FILESDIR}/${PN}-1.16.2-sphinx.patch"
23 )
24
25 S="${WORKDIR}/mongo-c-driver-${PV}"
26
27 src_configure() {
28         local mycmakeargs=(
29                 -DENABLE_BSON=ON
30                 -DENABLE_EXAMPLES=OFF
31                 -DENABLE_MAN_PAGES=ON
32                 -DENABLE_MONGOC=OFF
33                 -DENABLE_TESTS=OFF
34                 -DENABLE_STATIC="$(usex static-libs ON OFF)"
35                 -DENABLE_UNINSTALL=OFF
36         )
37
38         cmake-utils_src_configure
39 }
40
41 src_install() {
42         if use examples; then
43                 docinto examples
44                 dodoc src/libbson/examples/*.c
45         fi
46
47         cmake-utils_src_install
48 }