git: 20ef1e4298d8 - main - databases/libzdb: Fix build on FreeBSD 14.0 (Clang 16)

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 29 Jul 2024 12:46:03 UTC
The branch main has been updated by sunpoet:

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

commit 20ef1e4298d867617887f4b706ea051c2ee7eb40
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-07-29 12:38:55 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-07-29 12:38:55 +0000

    databases/libzdb: Fix build on FreeBSD 14.0 (Clang 16)
    
    Reference:      https://pkg-status.freebsd.org/beefy22/data/140amd64-default/6e2f94a5f2a9/logs/libzdb-3.3.0.log
---
 databases/libzdb/Makefile            |  2 +-
 databases/libzdb/files/patch-clang16 | 16 ++++++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/databases/libzdb/Makefile b/databases/libzdb/Makefile
index cfdf4e6f3528..550b3260f546 100644
--- a/databases/libzdb/Makefile
+++ b/databases/libzdb/Makefile
@@ -13,7 +13,7 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 BROKEN_i386=	fails to build
 BROKEN_powerpc=	fails to build
 
-USES=		compiler:c11 gmake libtool localbase pathfix
+USES=		compiler:c++20-lang gmake libtool localbase pathfix
 
 GNU_CONFIGURE=	yes
 INSTALL_TARGET=	install-strip
diff --git a/databases/libzdb/files/patch-clang16 b/databases/libzdb/files/patch-clang16
new file mode 100644
index 000000000000..c3df8d5a7a22
--- /dev/null
+++ b/databases/libzdb/files/patch-clang16
@@ -0,0 +1,16 @@
+Workaround for FreeBSD 14.0 (Clang 16) which is expected to be EOL on 2024-09-30
+
+Reference:	https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255374
+		https://forums.freebsd.org/threads/freebsd-release-14-0-and-clang-2020-std-format.91114/
+
+--- test/Makefile.in.orig	2024-07-23 00:18:00 UTC
++++ test/Makefile.in
+@@ -353,7 +353,7 @@ LDADD = ../libzdb.la
+ AUTOMAKE_OPTIONS = foreign no-dependencies
+ DEFAULT_INCLUDES = 
+ LDADD = ../libzdb.la
+-zdbpp_CXXFLAGS = -I../zdb -std=c++20
++zdbpp_CXXFLAGS = -I../zdb -std=c++20 -fexperimental-library
+ unit_SOURCES = unit.c
+ pool_SOURCES = pool.c
+ select_SOURCES = select.c