devel/mongo-c-driver: update to 1.23.2
ChangeLog: https://github.com/mongodb/mongo-c-driver/releases/tag/1.23.2 PR: 269301 Reported by: ports@bsdserwis.com Reviewed by: hiroo.ono+freebsd@gmail.com
This commit is contained in:
parent
64e421577f
commit
9c7fb31603
5 changed files with 1544 additions and 101 deletions
|
@ -1,23 +1,78 @@
|
|||
PORTNAME= mongo-c-driver
|
||||
PORTVERSION= 1.8.1
|
||||
PORTVERSION= 1.23.2
|
||||
CATEGORIES= devel
|
||||
|
||||
MAINTAINER= ports@bsdserwis.com
|
||||
COMMENT= C Driver for MongoDB
|
||||
WWW= https://www.mongodb.org/
|
||||
WWW= https://github.com/mongodb/mongo-c-driver
|
||||
|
||||
LICENSE= APACHE20
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 \
|
||||
libbson-1.0.so:devel/libbson
|
||||
|
||||
USES= cmake:noninja cpe pkgconfig
|
||||
USE_GITHUB= yes
|
||||
CPE_VENDOR= mongodb
|
||||
GH_ACCOUNT= mongodb
|
||||
|
||||
USES= cmake pkgconfig
|
||||
#USES= cmake:noninja pkgconfig
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 \
|
||||
libbson-1.0.so:devel/libbson \
|
||||
libzstd.so:archivers/zstd
|
||||
SNAPPY_LIB_DEPENDS= libsnappy.so:archivers/snappy
|
||||
SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2
|
||||
DOCS_VARS= BUILD_DEPENDS+=sphinx-build:textproc/py-sphinx
|
||||
|
||||
PATCH_STRIP= -p1
|
||||
CFLAGS+= -D__BSD_VISIBLE=1
|
||||
LDFLAGS+= -pthread
|
||||
|
||||
OPTIONS_DEFINE= CRYPTOPROFILE DOCS RDTSCP SASL SNAPPY SSL
|
||||
OPTIONS_DEFAULT= SSL
|
||||
OPTIONS_SUB= yes
|
||||
CRYPTOPROFILE_DESC= Use system crypto profile (require OPENSSL)
|
||||
RDTSCP_DESC= Fast performance counters on Intel using the RDTSCP instruction
|
||||
SSL_DESC= Enable TLS connections and SCRAM-SHA-1 authentication
|
||||
SSL_USES= ssl
|
||||
SSL_CMAKE_OFF= -DENABLE_SSL=OFF
|
||||
CRYPTOPROFILE_IMPLIES= SSL
|
||||
|
||||
CMAKE_ON= ENABLE_EXAMPLES
|
||||
CMAKE_OFF= ENABLE_TESTS ENABLE_UNINSTALL
|
||||
CMAKE_ARGS= -DENABLE_MONGOC=ON -DENABLE_BSON=SYSTEM
|
||||
CMAKE_ARGS+= -DENABLE_ZLIB=SYSTEM -DENABLE_ZSTD=ON
|
||||
CMAKE_ARGS+= -DBSON_HAVE_STRINGS_H=0
|
||||
DOCS_CMAKE_ON= -DENABLE_HTML_DOCS=ON -DENABLE_MAN_PAGES=ON
|
||||
RDTSCP_CMAKE_ON= -DENABLE_RDTSCP=ON
|
||||
RDTSCP_CMAKE_OFF= -DENABLE_RDTSCP=OFF
|
||||
SASL_CMAKE_ON= -DENABLE_SASL=CYRUS
|
||||
SASL_CMAKE_OFF= -DENABLE_SASL=OFF
|
||||
SNAPPY_CMAKE_ON= -DENABLE_SNAPPY=ON
|
||||
SNAPPY_CMAKE_OFF= -DENABLE_SNAPPY=OFF
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MSSL}
|
||||
. if ${SSL_DEFAULT:Mlibressl*}
|
||||
CMAKE_ARGS+= -DENABLE_SSL=LIBRESSL
|
||||
. else
|
||||
CMAKE_ARGS+= -DENABLE_SSL=OPENSSL
|
||||
. endif
|
||||
.endif
|
||||
|
||||
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1300523
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src_libmongoc_src_mongoc_mongoc-counters-private.h
|
||||
.endif
|
||||
|
||||
pre-configure-CRYPTOPROFILE-on:
|
||||
.if ${SSL_DEFAULT:Mlibressl*}
|
||||
@${ECHO_MSG} "CRYPTOPROFILE requires OpenSSL."
|
||||
@${FALSE}
|
||||
.endif
|
||||
|
||||
post-extract:
|
||||
${ECHO} "${PORTVERSION}" > ${WRKSRC}/VERSION_CURRENT
|
||||
|
||||
post-install:
|
||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/mongoc-stat
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1508859086
|
||||
SHA256 (mongodb-mongo-c-driver-1.8.1_GH0.tar.gz) = 610c74fad07bc232071c37439c224049e767a3f081538be7c7783711f0bad806
|
||||
SIZE (mongodb-mongo-c-driver-1.8.1_GH0.tar.gz) = 2892108
|
||||
TIMESTAMP = 1673293086
|
||||
SHA256 (mongodb-mongo-c-driver-1.23.2_GH0.tar.gz) = a0f944ba659586d3a0751cdb544876ddf1ae2796efabba02a6af75efd8c61b1a
|
||||
SIZE (mongodb-mongo-c-driver-1.23.2_GH0.tar.gz) = 6498979
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/src/libmongoc/src/mongoc/mongoc-counters-private.h b/src/libmongoc/src/mongoc/mongoc-counters-private.h
|
||||
index ddd4d4954..c22908af0 100644
|
||||
--- a/src/libmongoc/src/mongoc/mongoc-counters-private.h
|
||||
+++ b/src/libmongoc/src/mongoc/mongoc-counters-private.h
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <sys/sysinfo.h>
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || \
|
||||
defined(__OpenBSD__)
|
||||
+#include <sched.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/param.h>
|
|
@ -1,45 +0,0 @@
|
|||
This patch fixed the following build error. It can be removed in later
|
||||
release since upstream removed compression checks.
|
||||
|
||||
Reference: https://github.com/sunpoet/mongo-c-driver/commit/d35a67a404e3311257b7ad331e4f12d69ce5ec04
|
||||
|
||||
--- CMakeFiles/test-libmongoc.dir/tests/test-mongoc-topology.c.o ---
|
||||
/wrkdirs/usr/ports/devel/mongo-c-driver/work/mongo-c-driver-1.8.1/tests/test-mongoc-topology.c:348:34: error: no member named 'compressors' in 'struct _mongoc_server_description_t'
|
||||
BSON_ASSERT (bson_empty (&sd->compressors));
|
||||
~~ ^
|
||||
/usr/local/include/libbson-1.0/bson.h:65:26: note: expanded from macro 'bson_empty'
|
||||
#define bson_empty(b) (((b)->len == 5) || !bson_get_data ((b))[4])
|
||||
^
|
||||
/usr/local/include/libbson-1.0/bson-macros.h:192:26: note: expanded from macro 'BSON_ASSERT'
|
||||
if (!(BSON_LIKELY (test))) { \
|
||||
^~~~
|
||||
/usr/local/include/libbson-1.0/bson-macros.h:231:45: note: expanded from macro 'BSON_LIKELY'
|
||||
#define BSON_LIKELY(x) __builtin_expect (!!(x), 1)
|
||||
^
|
||||
/wrkdirs/usr/ports/devel/mongo-c-driver/work/mongo-c-driver-1.8.1/tests/test-mongoc-topology.c:348:34: error: no member named 'compressors' in 'struct _mongoc_server_description_t'
|
||||
BSON_ASSERT (bson_empty (&sd->compressors));
|
||||
~~ ^
|
||||
/usr/local/include/libbson-1.0/bson.h:65:60: note: expanded from macro 'bson_empty'
|
||||
#define bson_empty(b) (((b)->len == 5) || !bson_get_data ((b))[4])
|
||||
^
|
||||
/usr/local/include/libbson-1.0/bson-macros.h:192:26: note: expanded from macro 'BSON_ASSERT'
|
||||
if (!(BSON_LIKELY (test))) { \
|
||||
^~~~
|
||||
/usr/local/include/libbson-1.0/bson-macros.h:231:45: note: expanded from macro 'BSON_LIKELY'
|
||||
#define BSON_LIKELY(x) __builtin_expect (!!(x), 1)
|
||||
^
|
||||
2 errors generated.
|
||||
*** [CMakeFiles/test-libmongoc.dir/tests/test-mongoc-topology.c.o] Error code 1
|
||||
|
||||
--- tests/test-mongoc-topology.c.orig 2017-10-11 23:52:36 UTC
|
||||
+++ tests/test-mongoc-topology.c
|
||||
@@ -345,7 +345,9 @@ _test_topology_invalidate_server (bool p
|
||||
BSON_ASSERT (bson_empty (&sd->hosts));
|
||||
BSON_ASSERT (bson_empty (&sd->passives));
|
||||
BSON_ASSERT (bson_empty (&sd->arbiters));
|
||||
+#ifdef MONGOC_ENABLE_COMPRESSION
|
||||
BSON_ASSERT (bson_empty (&sd->compressors));
|
||||
+#endif
|
||||
|
||||
mongoc_server_stream_cleanup (server_stream);
|
||||
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue