[dev-libs/mongo-c-driver] roll new doc tarball with fixed script (thanks sam) and remove python eclass

This commit is contained in:
2025-10-19 18:15:17 +02:00
parent 03f74ef951
commit 5379c9f4de
3 changed files with 29 additions and 34 deletions

View File

@@ -3,18 +3,17 @@
EAPI=8
# Generate using slight deviation from https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-cmake-docs
# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-cmake-docs as a template
# Set to 1 if prebuilt, 0 if not
# (the construct below is to allow overriding from env for script)
: ${MONGOCDRIVER_DOCS_PREBUILT:=0}
: ${MONGO_C_DRIVER_DOCS_PREBUILT:=1}
# Default to generating man pages if no prebuilt; overridden later
MONGOCDRIVER_DOCS_USEFLAG="+man"
MONGO_C_DRIVER_DOCS_USEFLAG="+man"
PYTHON_COMPAT=( python3_{11..14} pypy3_11 )
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/mongo-c-driver.asc
inherit cmake dot-a python-any-r1 verify-sig
inherit cmake dot-a verify-sig
DESCRIPTION="Client library written in C for MongoDB"
HOMEPAGE="https://github.com/mongodb/mongo-c-driver"
@@ -25,15 +24,15 @@ SRC_URI="
)
"
if [[ ${MONGOCDRIVER_DOCS_PREBUILT} == 1 ]] ; then
if [[ ${MONGO_C_DRIVER_DOCS_PREBUILT} == 1 ]] ; then
SRC_URI+=" !man? ( https://people.znc.in/~dessa/gentoo/distfiles/${CATEGORY}/${PN}/${PN}-${PV}-docs.tar.xz )"
MONGOCDRIVER_DOCS_USEFLAG="man"
MONGO_C_DRIVER_DOCS_USEFLAG="man"
fi
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~hppa ~riscv ~x86"
IUSE="debug examples ${MONGOCDRIVER_DOCS_USEFLAG} sasl +ssl static-libs test +test-full"
IUSE="debug examples ${MONGO_C_DRIVER_DOCS_USEFLAG} sasl +ssl static-libs test +test-full"
REQUIRED_USE="
test? ( static-libs )"
@@ -61,10 +60,8 @@ DEPEND="
BDEPEND="
man? (
$(python_gen_any_dep '
<=dev-python/docutils-0.22[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
')
<=dev-python/docutils-0.22
dev-python/sphinx
)
verify-sig? ( sec-keys/openpgp-keys-mongo-c-driver )
"
@@ -74,11 +71,6 @@ PATCHES=(
)
python_check_deps() {
python_has_version -b "dev-python/docutils[${PYTHON_USEDEP}]"
python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
}
src_unpack() {
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
@@ -197,4 +189,9 @@ src_install() {
cmake_src_install
strip-lto-bytecode
# If USE=man, there'll be newly generated docs which we install instead.
if ! use man && [[ ${MONGO_C_DRIVER_DOCS_PREBUILT} == 1 ]] ; then
doman "${WORKDIR}"/${PN}-${PV}-docs/man*/*.[0-8]
fi
}