1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 )
7 inherit base flag-o-matic multilib python-any-r1 toolchain-funcs
9 DESCRIPTION="C Driver for MongoDB"
10 HOMEPAGE="http://www.mongodb.org/ https://github.com/mongodb/mongo-c-driver"
11 SRC_URI="https://github.com/mongodb/${PN}/tarball/v${PV/_/} -> ${P}.tar.gz"
15 KEYWORDS="amd64 ~hppa ~s390 x86"
16 IUSE="doc static-libs"
18 # tests fails to build
22 DEPEND="${PYTHON_DEPS}
23 doc? ( $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}]') )
25 PATCHES=( "${FILESDIR}/${PV}-api-version.diff" )
29 has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
39 append-cflags -D_POSIX_C_SOURCE=200112L
42 use doc && make -C docs/source/sphinx html
47 INSTALL_LIBRARY_PATH="${D}/usr/$(get_libdir)" \
48 INSTALL_INCLUDE_PATH="${D}/usr/include"
50 use static-libs || find "${ED}" -name '*.a' -exec rm -f {} +
52 use doc && dohtml -r docs/source/sphinx/build/html/*