[dev-libs/mongo-c-driver] prepare version for tree
This commit is contained in:
parent
0ece479d4b
commit
d7904ebfdb
@ -3,7 +3,9 @@
|
|||||||
|
|
||||||
EAPI=8
|
EAPI=8
|
||||||
|
|
||||||
inherit cmake
|
PYTHON_COMPAT=( python3_{10..13} )
|
||||||
|
|
||||||
|
inherit cmake python-any-r1
|
||||||
|
|
||||||
DESCRIPTION="Client library written in C for MongoDB"
|
DESCRIPTION="Client library written in C for MongoDB"
|
||||||
HOMEPAGE="https://github.com/mongodb/mongo-c-driver"
|
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"
|
LICENSE="Apache-2.0"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="~amd64 ~arm64 ~hppa ~riscv ~x86"
|
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 )"
|
REQUIRED_USE="test? ( static-libs )"
|
||||||
|
|
||||||
# No tests on x86 because tests require dev-db/mongodb which don't support
|
RESTRICT="!test? ( test )"
|
||||||
# x86 anymore (bug #645994)
|
|
||||||
RESTRICT="x86? ( test )
|
|
||||||
!test? ( test )"
|
|
||||||
|
|
||||||
RDEPEND="app-arch/snappy:=
|
RDEPEND="app-arch/snappy:=
|
||||||
app-arch/zstd:=
|
app-arch/zstd:=
|
||||||
>=dev-libs/libbson-${PV}[static-libs?]
|
~dev-libs/libbson-${PV}[static-libs?]
|
||||||
dev-python/sphinx
|
dev-python/sphinx
|
||||||
sys-libs/zlib:=
|
sys-libs/zlib:=
|
||||||
icu? ( dev-libs/icu:= )
|
icu? ( dev-libs/icu:= )
|
||||||
@ -30,11 +29,25 @@ RDEPEND="app-arch/snappy:=
|
|||||||
ssl? (
|
ssl? (
|
||||||
dev-libs/openssl:=
|
dev-libs/openssl:=
|
||||||
)"
|
)"
|
||||||
DEPEND="${RDEPEND}
|
DEPEND="
|
||||||
|
${RDEPEND}
|
||||||
test? (
|
test? (
|
||||||
dev-db/mongodb
|
|
||||||
dev-libs/libbson[static-libs]
|
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() {
|
src_prepare() {
|
||||||
cmake_src_prepare
|
cmake_src_prepare
|
||||||
@ -77,15 +90,22 @@ src_configure() {
|
|||||||
cmake_src_configure
|
cmake_src_configure
|
||||||
}
|
}
|
||||||
|
|
||||||
# FEATURES="test -network-sandbox" USE="static-libs" emerge dev-libs/mongo-c-driver
|
|
||||||
src_test() {
|
src_test() {
|
||||||
local PORT=27099
|
export MONGOC_TEST_OFFLINE=on
|
||||||
mongod --port ${PORT} --bind_ip 127.0.0.1 --nounixsocket --fork \
|
if ! use test-full; then
|
||||||
--setParameter enableTestCommands=1 --dbpath="${T}" \
|
export MONGOC_TEST_SKIP_LIVE=on
|
||||||
--logpath="${T}/mongod.log" || die
|
else
|
||||||
MONGOC_TEST_URI="mongodb://[127.0.0.1]:${PORT}" \
|
local PORT=27099
|
||||||
MONGOC_ENABLE_MAJORITY_READ_CONCERN=off \
|
export MONGOC_TEST_URI="mongodb://[127.0.0.1]:${PORT}"
|
||||||
../mongo-c-driver-${PV}_build/src/libmongoc/test-libmongoc || die
|
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")
|
kill $(<"${T}/mongod.lock")
|
||||||
}
|
}
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
EAPI=8
|
EAPI=8
|
||||||
|
|
||||||
PYTHON_COMPAT=( python3_{10..12} )
|
PYTHON_COMPAT=( python3_{10..13} )
|
||||||
|
|
||||||
inherit cmake python-any-r1
|
inherit cmake python-any-r1
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ RESTRICT="!test? ( test )"
|
|||||||
RDEPEND="
|
RDEPEND="
|
||||||
app-arch/snappy:=
|
app-arch/snappy:=
|
||||||
app-arch/zstd:=
|
app-arch/zstd:=
|
||||||
>=dev-libs/libbson-${PV}[static-libs?]
|
~dev-libs/libbson-${PV}[static-libs?]
|
||||||
>=dev-libs/libmongocrypt-1.10.1
|
>=dev-libs/libmongocrypt-1.10.1
|
||||||
>=dev-libs/libutf8proc-2.8.0:=[static-libs?]
|
>=dev-libs/libutf8proc-2.8.0:=[static-libs?]
|
||||||
sys-libs/zlib:=
|
sys-libs/zlib:=
|
||||||
|
Loading…
Reference in New Issue
Block a user