From d7904ebfdbdc5887498743c0d0fc04a848916a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20F=C3=B6rster?= Date: Sat, 13 Jul 2024 01:59:29 +0200 Subject: [PATCH] [dev-libs/mongo-c-driver] prepare version for tree --- ...ebuild => mongo-c-driver-1.24.4-r1.ebuild} | 56 +++++++++++++------ .../mongo-c-driver-1.27.4.ebuild | 4 +- 2 files changed, 40 insertions(+), 20 deletions(-) rename dev-libs/mongo-c-driver/{mongo-c-driver-1.24.4.ebuild => mongo-c-driver-1.24.4-r1.ebuild} (70%) diff --git a/dev-libs/mongo-c-driver/mongo-c-driver-1.24.4.ebuild b/dev-libs/mongo-c-driver/mongo-c-driver-1.24.4-r1.ebuild similarity index 70% rename from dev-libs/mongo-c-driver/mongo-c-driver-1.24.4.ebuild rename to dev-libs/mongo-c-driver/mongo-c-driver-1.24.4-r1.ebuild index 5624c9e..426d066 100644 --- a/dev-libs/mongo-c-driver/mongo-c-driver-1.24.4.ebuild +++ b/dev-libs/mongo-c-driver/mongo-c-driver-1.24.4-r1.ebuild @@ -3,7 +3,9 @@ EAPI=8 -inherit cmake +PYTHON_COMPAT=( python3_{10..13} ) + +inherit cmake python-any-r1 DESCRIPTION="Client library written in C for MongoDB" HOMEPAGE="https://github.com/mongodb/mongo-c-driver" @@ -12,17 +14,14 @@ SRC_URI="https://github.com/mongodb/mongo-c-driver/releases/download/${PV}/${P}. LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~amd64 ~arm64 ~hppa ~riscv ~x86" -IUSE="debug examples icu sasl ssl static-libs test" +IUSE="debug examples icu sasl ssl static-libs test +test-full" REQUIRED_USE="test? ( static-libs )" -# No tests on x86 because tests require dev-db/mongodb which don't support -# x86 anymore (bug #645994) -RESTRICT="x86? ( test ) - !test? ( test )" +RESTRICT="!test? ( test )" RDEPEND="app-arch/snappy:= app-arch/zstd:= - >=dev-libs/libbson-${PV}[static-libs?] + ~dev-libs/libbson-${PV}[static-libs?] dev-python/sphinx sys-libs/zlib:= icu? ( dev-libs/icu:= ) @@ -30,11 +29,25 @@ RDEPEND="app-arch/snappy:= ssl? ( dev-libs/openssl:= )" -DEPEND="${RDEPEND} +DEPEND=" + ${RDEPEND} test? ( - dev-db/mongodb dev-libs/libbson[static-libs] - )" + test-full? ( + dev-db/mongodb + ) + ) +" +BDEPEND=" + $(python_gen_any_dep ' + dev-python/sphinx[${PYTHON_USEDEP}] + ') +" + +python_check_deps() { + python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" +} + src_prepare() { cmake_src_prepare @@ -77,15 +90,22 @@ src_configure() { cmake_src_configure } -# FEATURES="test -network-sandbox" USE="static-libs" emerge dev-libs/mongo-c-driver src_test() { - local PORT=27099 - mongod --port ${PORT} --bind_ip 127.0.0.1 --nounixsocket --fork \ - --setParameter enableTestCommands=1 --dbpath="${T}" \ - --logpath="${T}/mongod.log" || die - MONGOC_TEST_URI="mongodb://[127.0.0.1]:${PORT}" \ - MONGOC_ENABLE_MAJORITY_READ_CONCERN=off \ - ../mongo-c-driver-${PV}_build/src/libmongoc/test-libmongoc || die + export MONGOC_TEST_OFFLINE=on + if ! use test-full; then + export MONGOC_TEST_SKIP_LIVE=on + else + local PORT=27099 + export MONGOC_TEST_URI="mongodb://[127.0.0.1]:${PORT}" + export MONGOC_ENABLE_MAJORITY_READ_CONCERN=on + LC_ALL=C \ + mongod --setParameter enableTestCommands=1 \ + --port ${PORT} --bind_ip 127.0.0.1 --nounixsocket \ + --fork --dbpath="${T}"\ + --logpath="${T}/mongod.log" || die + fi + + ../mongo-c-driver-${PV}_build/src/libmongoc/test-libmongoc || die kill $(<"${T}/mongod.lock") } diff --git a/dev-libs/mongo-c-driver/mongo-c-driver-1.27.4.ebuild b/dev-libs/mongo-c-driver/mongo-c-driver-1.27.4.ebuild index ab34148..e24d71d 100644 --- a/dev-libs/mongo-c-driver/mongo-c-driver-1.27.4.ebuild +++ b/dev-libs/mongo-c-driver/mongo-c-driver-1.27.4.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) inherit cmake python-any-r1 @@ -24,7 +24,7 @@ RESTRICT="!test? ( test )" RDEPEND=" app-arch/snappy:= app-arch/zstd:= - >=dev-libs/libbson-${PV}[static-libs?] + ~dev-libs/libbson-${PV}[static-libs?] >=dev-libs/libmongocrypt-1.10.1 >=dev-libs/libutf8proc-2.8.0:=[static-libs?] sys-libs/zlib:=