[dev-libs/mongo-c-driver] add libmongocrypt and aws support

This commit is contained in:
Robert Förster 2024-06-22 00:57:50 +02:00
parent 68b96b1f2e
commit 3e9c691316

View File

@ -12,30 +12,36 @@ SRC_URI="https://github.com/mongodb/mongo-c-driver/archive/refs/tags/${PV}.tar.g
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~hppa ~riscv ~x86"
IUSE="debug examples icu sasl ssl static-libs test"
REQUIRED_USE="test? ( static-libs )"
IUSE="debug examples icu +s3 sasl +ssl static-libs test"
REQUIRED_USE="
s3? ( ssl )
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 )"
RDEPEND="app-arch/snappy:=
RDEPEND="
app-arch/snappy:=
app-arch/zstd:=
>=dev-libs/libbson-${PV}[static-libs?]
>=dev-libs/libmongocrypt-1.10.0
>=dev-libs/libutf8proc-2.8.0:=[static-libs?]
dev-python/sphinx
sys-libs/zlib:=
sasl? ( dev-libs/cyrus-sasl:= )
ssl? (
dev-libs/openssl:=
)"
DEPEND="${RDEPEND}
ssl? ( dev-libs/openssl:= )
"
DEPEND="
${RDEPEND}
test? (
dev-db/mongodb
dev-libs/libbson[static-libs]
>=dev-libs/libmongocrypt-1.10.0[static-libs]
>=dev-libs/libutf8proc-2.8.0:=[static-libs]
)"
)
"
src_prepare() {
cmake_src_prepare
@ -60,9 +66,11 @@ src_configure() {
local mycmakeargs=(
-DCMAKE_SKIP_RPATH=ON # mongoc-stat insecure runpath
-DUSE_SYSTEM_LIBBSON=ON
-DENABLE_CLIENT_SIDE_ENCRYPTION=ON
-DENABLE_EXAMPLES=OFF
-DENABLE_MAN_PAGES=ON
-DENABLE_MONGOC=ON
-DENABLE_MONGODB_AWS_AUTH="$(usex s3 ON OFF)"
-DENABLE_SNAPPY=AUTO
-DENABLE_ZLIB=SYSTEM
-DENABLE_SASL="$(usex sasl CYRUS OFF)"