[dev-libs/mongo-c-driver] bump, for mongodb6 (or 7, who knows)
This commit is contained in:
parent
8fe813c80f
commit
171d8a9b7b
1
dev-libs/mongo-c-driver/Manifest
Normal file
1
dev-libs/mongo-c-driver/Manifest
Normal file
@ -0,0 +1 @@
|
|||||||
|
DIST mongo-c-driver-1.27.2.tar.gz 7215536 BLAKE2B 960a846470f325c9b629f7578e474e7cf40a0cbf5493e4c4e487b00b119618085672d6276a5a277383ee7032c54e64dfc668d125268ae963211301ce8b1381b9 SHA512 b2b00aeafb3e639ced89e1e5fee6e3a72167322acbb49dce06514271af2041713373ce1b941bdf1b94a518e93f4baca1c55c5c6e5cec33ff72916dace2c2be09
|
@ -0,0 +1,15 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 3371dae..a6edf0f 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -380,10 +380,6 @@ if (ENABLE_MONGOC)
|
||||||
|
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
-install (FILES COPYING NEWS README.rst THIRD_PARTY_NOTICES
|
||||||
|
- DESTINATION ${CMAKE_INSTALL_DATADIR}/mongo-c-driver
|
||||||
|
-)
|
||||||
|
-
|
||||||
|
if (ENABLE_UNINSTALL)
|
||||||
|
if (WIN32)
|
||||||
|
if (ENABLE_MONGOC)
|
@ -0,0 +1,35 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 1a2b7ba..26fbe9b 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -161,8 +161,6 @@ if (ENABLE_BSON STREQUAL SYSTEM)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
message ("-- libbson found version \"${bson-1.0_VERSION}\"")
|
||||||
|
- message ("-- disabling test-libmongoc since using system libbson")
|
||||||
|
- SET (ENABLE_TESTS OFF)
|
||||||
|
|
||||||
|
if (ENABLE_STATIC MATCHES "ON|AUTO")
|
||||||
|
set (MONGOC_ENABLE_STATIC ON)
|
||||||
|
@@ -174,7 +172,7 @@ if (ENABLE_BSON STREQUAL SYSTEM)
|
||||||
|
endif ()
|
||||||
|
set (BSON_LIBRARIES mongo::bson_shared)
|
||||||
|
if (NOT TARGET mongo::bson_static)
|
||||||
|
- message (FATAL_ERROR "System libbson built without static library target")
|
||||||
|
+ message (STATUS "System libbson built without static library target")
|
||||||
|
endif ()
|
||||||
|
set (BSON_STATIC_LIBRARIES mongo::bson_static)
|
||||||
|
endif ()
|
||||||
|
diff --git a/src/libbson/tests/test-bson.c b/src/libbson/tests/test-bson.c
|
||||||
|
index c949d22..4d5a47f 100644
|
||||||
|
--- a/src/libbson/tests/test-bson.c
|
||||||
|
+++ b/src/libbson/tests/test-bson.c
|
||||||
|
@@ -17,7 +17,7 @@
|
||||||
|
|
||||||
|
#include <bson/bson.h>
|
||||||
|
#include <bson/bcon.h>
|
||||||
|
-#include <bson/bson-private.h>
|
||||||
|
+#include "bson/bson-private.h"
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
11
dev-libs/mongo-c-driver/metadata.xml
Normal file
11
dev-libs/mongo-c-driver/metadata.xml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>ultrabug@gentoo.org</email>
|
||||||
|
<name>Alexys Jacob</name>
|
||||||
|
</maintainer>
|
||||||
|
<upstream>
|
||||||
|
<remote-id type="github">mongodb/mongo-c-driver</remote-id>
|
||||||
|
</upstream>
|
||||||
|
</pkgmetadata>
|
98
dev-libs/mongo-c-driver/mongo-c-driver-1.27.2.ebuild
Normal file
98
dev-libs/mongo-c-driver/mongo-c-driver-1.27.2.ebuild
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
# Copyright 1999-2024 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
inherit cmake
|
||||||
|
|
||||||
|
DESCRIPTION="Client library written in C for MongoDB"
|
||||||
|
HOMEPAGE="https://github.com/mongodb/mongo-c-driver"
|
||||||
|
SRC_URI="https://github.com/mongodb/mongo-c-driver/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
|
||||||
|
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 )"
|
||||||
|
|
||||||
|
# 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:=
|
||||||
|
app-arch/zstd:=
|
||||||
|
>=dev-libs/libbson-${PV}[static-libs?]
|
||||||
|
>=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}
|
||||||
|
test? (
|
||||||
|
dev-db/mongodb
|
||||||
|
dev-libs/libbson[static-libs]
|
||||||
|
>=dev-libs/libutf8proc-2.8.0:=[static-libs]
|
||||||
|
)"
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
cmake_src_prepare
|
||||||
|
|
||||||
|
# copy private headers for tests since we don't build libbson
|
||||||
|
if use test; then
|
||||||
|
mkdir -p src/libbson/tests/bson || die
|
||||||
|
cp src/libbson/src/bson/bson-*.h src/libbson/tests/bson/ || die
|
||||||
|
fi
|
||||||
|
|
||||||
|
# remove doc files
|
||||||
|
sed -i '/^\s*install\s*(FILES COPYING NEWS/,/^\s*)/{d}' CMakeLists.txt || die
|
||||||
|
|
||||||
|
# enable tests
|
||||||
|
sed -i '/message (STATUS "disabling test-libmongoc since using system libbson")/{d}' CMakeLists.txt || die
|
||||||
|
sed -i '/SET (ENABLE_TESTS OFF)/{d}' CMakeLists.txt || die
|
||||||
|
sed -i 's/message (FATAL_ERROR "System libbson built without static library target")/message (STATUS "System libbson built without static library target")/' CMakeLists.txt || die
|
||||||
|
sed -i 's#<bson/bson-private.h>#"bson/bson-private.h"#' src/libbson/tests/test-bson.c || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local mycmakeargs=(
|
||||||
|
-DCMAKE_SKIP_RPATH=ON # mongoc-stat insecure runpath
|
||||||
|
-DUSE_SYSTEM_LIBBSON=ON
|
||||||
|
-DENABLE_EXAMPLES=OFF
|
||||||
|
-DENABLE_MAN_PAGES=ON
|
||||||
|
-DENABLE_MONGOC=ON
|
||||||
|
-DENABLE_SNAPPY=AUTO
|
||||||
|
-DENABLE_ZLIB=SYSTEM
|
||||||
|
-DENABLE_SASL="$(usex sasl CYRUS OFF)"
|
||||||
|
-DENABLE_SRV=ON
|
||||||
|
-DENABLE_SSL="$(usex ssl $(usex ssl OPENSSL) OFF)"
|
||||||
|
-DENABLE_STATIC="$(usex static-libs ON OFF)"
|
||||||
|
-DENABLE_TESTS="$(usex test ON OFF)"
|
||||||
|
-DENABLE_TRACING="$(usex debug ON OFF)"
|
||||||
|
-DENABLE_UNINSTALL=OFF
|
||||||
|
-DENABLE_ZSTD=ON
|
||||||
|
-DUSE_BUNDLED_UTF8PROC=OFF
|
||||||
|
)
|
||||||
|
|
||||||
|
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 \
|
||||||
|
--dbpath="${T}" --logpath="${T}/mongod.log" || die
|
||||||
|
MONGOC_TEST_URI="mongodb://[127.0.0.1]:${PORT}" ../mongo-c-driver-${PV}_build/src/libmongoc/test-libmongoc || die
|
||||||
|
kill $(<"${T}/mongod.lock")
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
if use examples; then
|
||||||
|
docinto examples
|
||||||
|
dodoc src/libmongoc/examples/*.c
|
||||||
|
fi
|
||||||
|
|
||||||
|
cmake_src_install
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user