--- /var/db/repos/gentoo/dev-libs/libbson/libbson-1.17.0.ebuild 2020-08-06 16:39:16.000000000 +0200 +++ dev-libs/libbson/libbson-1.17.0.ebuild 2020-08-23 11:23:29.000000000 +0200 @@ -3,7 +3,7 @@ EAPI=7 -inherit cmake-utils +inherit cmake DESCRIPTION="Library routines related to building,parsing and iterating BSON documents" HOMEPAGE="https://github.com/mongodb/mongo-c-driver/tree/master/src/libbson" @@ -12,13 +12,17 @@ LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86" -IUSE="examples static-libs" +IUSE="doc examples static-libs" -DEPEND="dev-python/sphinx" +BDEPEND="doc? ( dev-python/sphinx:= )" +# patch out documentation +# otherwise you get file collisions: +# /usr/share/mongo-c-driver/* +# from the mongo-c-driver package +# PATCHES=( "${FILESDIR}/${PN}-1.14.0-no-docs.patch" - "${FILESDIR}/${PN}-1.16.2-sphinx.patch" ) S="${WORKDIR}/mongo-c-driver-${PV}" @@ -26,15 +30,17 @@ src_configure() { local mycmakeargs=( -DENABLE_BSON=ON - -DENABLE_EXAMPLES=OFF - -DENABLE_MAN_PAGES=ON + -DENABLE_EXAMPLES="$(usex examples ON OFF)" + -DENABLE_HTML_DOCS="$(usex doc ON OFF)" + -DENABLE_MAN_PAGES="$(usex doc ON OFF)" -DENABLE_MONGOC=OFF + -DENABLE_PIC="$(usex pic ON OFF)" -DENABLE_TESTS=OFF -DENABLE_STATIC="$(usex static-libs ON OFF)" -DENABLE_UNINSTALL=OFF ) - cmake-utils_src_configure + cmake_src_configure } src_install() { @@ -43,5 +49,5 @@ dodoc src/libbson/examples/*.c fi - cmake-utils_src_install + cmake_src_install }