git: b66ad1748eb4 - main - databases/mongodb70: fix build on 14-CURRENT

From: Ronald Klop <ronald_at_FreeBSD.org>
Date: Wed, 10 May 2023 18:51:32 UTC
The branch main has been updated by ronald:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b66ad1748eb43d4d4a46480d5dddfdee683d0bbb

commit b66ad1748eb43d4d4a46480d5dddfdee683d0bbb
Author:     Ronald Klop <ronald@FreeBSD.org>
AuthorDate: 2023-05-10 18:48:23 +0000
Commit:     Ronald Klop <ronald@FreeBSD.org>
CommitDate: 2023-05-10 18:48:23 +0000

    databases/mongodb70: fix build on 14-CURRENT
    
    Port does not build with clang15 but does with clang14.
    
    /usr/include/c++/v1/__algorithm/comp.h:36:71: error: invalid operands to binary expression ('const mongo::SSLX509Name::Entry' and 'const mongo::SSLX509Name::Entry')
        bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
                                                                      ~~~ ^  ~~~
---
 databases/mongodb70/Makefile | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/databases/mongodb70/Makefile b/databases/mongodb70/Makefile
index 87f7dcdd2cbf..1c696fb5cad2 100644
--- a/databases/mongodb70/Makefile
+++ b/databases/mongodb70/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	mongodb
 DISTVERSIONPREFIX=	r
 DISTVERSION=	7.0.0-rc0
+PORTREVISION=	1
 CATEGORIES=	databases net
 PKGNAMESUFFIX=	${DISTVERSION:R:S/.//}
 
@@ -52,6 +53,7 @@ python_OLD_CMD=	@python_interpreter@
 MAKE_ARGS=	--cxx-std=20 \
 		--disable-warnings-as-errors \
 		--libc++ \
+		--allocator=system \
 		--runtime-hardening=on \
 		--use-system-libunwind \
 		--use-system-pcre2 \
@@ -87,6 +89,14 @@ SSL_MAKE_ARGS=	--ssl
 
 .include <bsd.port.pre.mk>
 
+# MongoDB 7.0 fails on clang15.
+.if ${CHOSEN_COMPILER_TYPE} == clang && ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400079
+_LLVM_VERSION=  14
+BUILD_DEPENDS+= clang${_LLVM_VERSION}:devel/llvm${_LLVM_VERSION}
+CC=             ${LOCALBASE}/bin/clang${_LLVM_VERSION}
+CXX=            ${LOCALBASE}/bin/clang++${_LLVM_VERSION}
+.endif
+
 ALL_TARGET=	install-core
 
 # This ports is only following the Major Release.