git: 3dc4928b6c99 - main - databases/foundationdb*: split, update to 7.1.59 & 7.3.41

From: Dave Cottlehuber <dch_at_FreeBSD.org>
Date: Thu, 23 May 2024 22:14:51 UTC
The branch main has been updated by dch:

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

commit 3dc4928b6c995e22f199f7b9a1bdb5247d8d7a10
Author:     Dmitry Wagin <dmitry.wagin@ya.ru>
AuthorDate: 2024-05-23 22:14:48 +0000
Commit:     Dave Cottlehuber <dch@FreeBSD.org>
CommitDate: 2024-05-23 22:14:48 +0000

    databases/foundationdb*: split, update to 7.1.59 & 7.3.41
    
    Update FoundationDB to both main supported versions, and also split
    between server and client builds for convenience.
    
    PR:             277262
    Reviewed by:    dch
    Sponsored by:   SkunkWerks, GmbH
---
 MOVED                                              |   2 +
 UIDs                                               |   2 +-
 databases/Makefile                                 |   5 +-
 databases/erlfdb/Makefile                          |   2 +-
 databases/foundationdb/Makefile                    |  98 -------------------
 databases/foundationdb/distinfo                    |   3 -
 .../files/patch-cmake_CompileBoost.cmake           |  11 ---
 .../files/patch-cmake_GetMsgpack.cmake             |  24 -----
 .../files/patch-fdbmonitor_CMakeLists.txt          |  11 ---
 databases/foundationdb/pkg-descr                   |  14 ---
 databases/foundationdb/pkg-plist                   |  28 ------
 databases/foundationdb71-client/Makefile           |  11 +++
 databases/foundationdb71-server/Makefile           | 103 ++++++++++++++++++++
 databases/foundationdb71-server/distinfo           |   3 +
 .../files/foundationdb.conf.in                     |   6 +-
 .../files/foundationdb.in                          |   2 +-
 .../files/patch-CMakeLists.txt                     |  13 +--
 .../files/patch-bindings_CMakeLists.txt            |  10 ++
 .../files/patch-bindings_c_CMakeLists.txt          |   6 +-
 .../files/patch-cmake_CompileBoost.cmake           |  20 ++++
 .../files/patch-cmake_FDBComponents.cmake          |   8 +-
 .../files/patch-cmake_GetMsgpack.cmake             |  17 ++++
 .../files/patch-fdbmonitor_CMakeLists.txt          |   8 ++
 .../files/patch-fdbmonitor_fdbmonitor.cpp          |   0
 .../files/patch-fdbserver_FDBExecHelper.actor.cpp  |   0
 .../files/patch-fdbserver_fdbserver.actor.cpp      |   4 +-
 databases/foundationdb71-server/pkg-descr          |   8 ++
 databases/foundationdb71-server/pkg-plist-client   |  13 +++
 databases/foundationdb71-server/pkg-plist-server   |   6 ++
 databases/foundationdb73-client/Makefile           |  11 +++
 databases/foundationdb73-server/Makefile           | 108 +++++++++++++++++++++
 databases/foundationdb73-server/distinfo           |   3 +
 .../files/foundationdb.conf.in                     |  47 +++++++++
 .../foundationdb73-server/files/foundationdb.in    |  42 ++++++++
 .../files/patch-CMakeLists.txt                     |  15 +++
 .../files/patch-bindings_CMakeLists.txt            |  11 +++
 .../files/patch-bindings_c_CMakeLists.txt          |  64 ++++++++++++
 ...ch-bindings_c_test_apitester_TesterWorkload.cpp |  11 +++
 .../files/patch-bindings_c_test_mako_mako.cpp      |  11 +++
 .../files/patch-cmake_CompileBoost.cmake           |  20 ++++
 .../files/patch-cmake_FDBComponents.cmake          |  32 ++++++
 .../files/patch-cmake_GetMsgpack.cmake             |  17 ++++
 .../files/patch-fdbcli_CMakeLists.txt              |  11 +++
 .../patch-fdbclient_SpecialKeySpace.actor.cpp      |  11 +++
 .../files/patch-fdbmonitor_CMakeLists.txt          |   8 ++
 .../files/patch-fdbmonitor_fdbmonitor.cpp          |  44 +++++++++
 .../files/patch-fdbserver_BlobWorker.actor.cpp     |  33 +++++++
 .../files/patch-fdbserver_storageserver.actor.cpp  |  20 ++++
 .../files/patch-flow_MkCertCli.cpp                 |  11 +++
 .../files/patch-flow_Platform.actor.cpp            |  21 ++++
 databases/foundationdb73-server/pkg-descr          |   8 ++
 databases/foundationdb73-server/pkg-plist-client   |  16 +++
 databases/foundationdb73-server/pkg-plist-server   |   6 ++
 53 files changed, 805 insertions(+), 214 deletions(-)

diff --git a/MOVED b/MOVED
index dd093ac741bd..251a800494c0 100644
--- a/MOVED
+++ b/MOVED
@@ -3253,3 +3253,5 @@ sysutils/vector||2024-05-15|Has expired: Unmaintained in tree and broken for mon
 irc/sic||2024-05-15|Has expired: Last upstream release was in 2001 and no upstream WWW
 devel/tarpaulin|devel/cargo-tarpaulin|2024-05-19|Rename port and package to reflect that this is a Cargo plugin
 sysutils/uutils-coreutils|sysutils/rust-coreutils|2024-05-21|Remove duplicate
+databases/foundationdb|databases/foundationdb71-server|2024-05-23|Reintegrated into databases/foundationdb71-server
+
diff --git a/UIDs b/UIDs
index 7c31a52724e7..0f9bc5e64d9a 100644
--- a/UIDs
+++ b/UIDs
@@ -176,7 +176,7 @@ _hfm:*:227:227::0:0:hfm daemon:/nonexistent:/usr/sbin/nologin
 osrm:*:228:228::0:0:osrm:/nonexistent:/usr/sbin/nologin
 # free: 229, GID used
 carbon:*:230:230::0:0:osrm:/nonexistent:/usr/sbin/nologin
-foundationdb:*:231:231::0:0:foundationdb:/nonexistent:/usr/sbin/nologin
+foundationdb:*:231:231::0:0:FoundationDB user:/nonexistent:/usr/sbin/nologin
 archiva:*:232:232::0:0:Archiva Daemon User:/usr/local/archiva:/bin/sh
 _ntp:*:233:233::0:0:NTP Daemon:/var/empty:/usr/sbin/nologin
 kafka:*:234:234::0:0:Apache Kafka user:/nonexistent:/usr/sbin/nologin
diff --git a/databases/Makefile b/databases/Makefile
index 9cdf750b2155..72561ecb07fe 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -69,7 +69,10 @@
     SUBDIR += firebird40-client
     SUBDIR += firebird40-server
     SUBDIR += fortytwo-bdb
-    SUBDIR += foundationdb
+    SUBDIR += foundationdb71-client
+    SUBDIR += foundationdb71-server
+    SUBDIR += foundationdb73-client
+    SUBDIR += foundationdb73-server
     SUBDIR += frece
     SUBDIR += freetds
     SUBDIR += freetds-devel
diff --git a/databases/erlfdb/Makefile b/databases/erlfdb/Makefile
index 20c31d696d42..2f373a8cbc5a 100644
--- a/databases/erlfdb/Makefile
+++ b/databases/erlfdb/Makefile
@@ -9,7 +9,7 @@ WWW=		https://github.com/apache/couchdb-erlfdb
 
 LICENSE=	APACHE20
 
-LIB_DEPENDS=	libfdb_c.so:databases/foundationdb
+LIB_DEPENDS=	libfdb_c.so:databases/foundationdb71-client
 
 USES=		erlang:rebar3,enc
 USE_GITHUB=	yes
diff --git a/databases/foundationdb/Makefile b/databases/foundationdb/Makefile
deleted file mode 100644
index 4345514df1fc..000000000000
--- a/databases/foundationdb/Makefile
+++ /dev/null
@@ -1,98 +0,0 @@
-PORTNAME=	foundationdb
-DISTVERSION=	7.1.29
-CATEGORIES=	databases
-
-# PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/pull/
-
-MAINTAINER=	dmitry.wagin@ya.ru
-COMMENT=	Distributed, transactional key-value store
-WWW=		https://www.foundationdb.org/
-
-LICENSE=	APACHE20
-LICENSE_FILE=	${WRKSRC}/LICENSE
-
-BROKEN_aarch64=	invalid asm rdtsc
-ONLY_FOR_ARCHS=	aarch64 amd64
-ONLY_FOR_ARCHS_REASON=	not yet ported to anything else
-
-BUILD_DEPENDS=	${LOCALBASE}/include/msgpack.hpp:devel/msgpack-cxx \
-		${LOCALBASE}/include/toml.hpp:devel/toml11 \
-		bash:shells/bash \
-		git:devel/git
-LIB_DEPENDS=	libboost_system.so:devel/boost-libs \
-		libeio.so:devel/libeio
-
-USES=		cmake compiler:c++20-lang mono:build python:build shebangfix \
-		ssl
-USE_GITHUB=	yes
-GH_ACCOUNT=	apple
-GH_PROJECT=	foundationdb
-USE_LDCONFIG=	yes
-USE_RC_SUBR=	foundationdb
-
-SHEBANG_FILES=	bindings/c/generate_asm.py
-
-CMAKE_ARGS=	-DOPENSSL_ROOT_DIR=${OPENSSLLIB}
-CMAKE_OFF=	DISABLE_TLS USE_DTRACE USE_JEMALLOC WITH_CONTRIB WITH_FLOWBENCH
-
-MAKE_ENV=	MONO_REGISTRY_PATH=/tmp/registry
-
-SUB_FILES=	foundationdb.conf
-SUB_LIST=	${SUB_FDB}
-
-USERS=		foundationdb
-GROUPS=		foundationdb
-
-PLIST_SUB=	${SUB_FDB}
-
-FOUNDATIONDB_DBDIR?=	/var/db/foundationdb
-FOUNDATIONDB_ETCDIR?=	${PREFIX}/etc/foundationdb
-FOUNDATIONDB_GROUP?=	foundationdb
-FOUNDATIONDB_LOGDIR?=	/var/log/foundationdb
-FOUNDATIONDB_USER?=	foundationdb
-
-SUB_FDB=	FOUNDATIONDB_DBDIR=${FOUNDATIONDB_DBDIR} \
-		FOUNDATIONDB_ETCDIR=${FOUNDATIONDB_ETCDIR} \
-		FOUNDATIONDB_GROUP=${FOUNDATIONDB_GROUP} \
-		FOUNDATIONDB_LOGDIR=${FOUNDATIONDB_LOGDIR} \
-		FOUNDATIONDB_USER=${FOUNDATIONDB_USER}
-
-post-patch:
-		${REINPLACE_CMD} 's/OPENSSL_USE_STATIC_LIBS TRUE/OPENSSL_USE_STATIC_LIBS FALSE/' \
-		${WRKSRC}/cmake/FDBComponents.cmake
-		${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|' \
-		${WRKSRC}/bindings/c/test/unit/third_party/CMakeLists.txt
-
-do-install:
-# commands on first line, dev tools on next two
-.for f in fdbbackup fdbcli fdbmonitor fdbserver actor_flamegraph fdb_flow_tester \
-	fdbconvert fdbdecode tutorial
-	${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/${f} ${STAGEDIR}${PREFIX}/bin/
-.endfor
-.for s in backup_agent dr_agent fastrestore_agent fdbr fdbrestore
-	${RLN} ${STAGEDIR}${PREFIX}/bin/fdbbackup ${STAGEDIR}${PREFIX}/bin/${s}
-.endfor
-# exposed libraries - confirm with upstream
-.for l in libfdb_c.so libfdb_flow.a libfdb_sqlite.a libfdbclient.a libfdbrpc.a \
-	libflow.a
-	${STRIP_CMD} ${WRKDIR}/.build/lib/${l}
-	${INSTALL_DATA} ${WRKDIR}/.build/lib/${l} ${STAGEDIR}/${PREFIX}/lib/
-.endfor
-# exposed headers - confirm with upstream
-	${MKDIR} ${STAGEDIR}${PREFIX}/include/foundationdb
-	${INSTALL_DATA} ${WRKSRC}/bindings/c/foundationdb/fdb_c.h \
-	    ${STAGEDIR}/${PREFIX}/include/foundationdb/
-	${INSTALL_DATA} ${WRKSRC}/bindings/c/foundationdb/fdb_c_types.h \
-	    ${STAGEDIR}/${PREFIX}/include/foundationdb/
-	${INSTALL_DATA} ${WRKSRC}/fdbclient/vexillographer/fdb.options \
-	    ${STAGEDIR}/${PREFIX}/include/foundationdb/
-	${INSTALL_DATA} ${WRKDIR}/.build/bindings/c/foundationdb/fdb_c_options.g.h \
-	    ${STAGEDIR}/${PREFIX}/include/foundationdb/
-# runtime related
-	${MKDIR} ${STAGEDIR}${FOUNDATIONDB_ETCDIR}
-	${MKDIR} ${STAGEDIR}${FOUNDATIONDB_DBDIR}
-	${MKDIR} ${STAGEDIR}${FOUNDATIONDB_LOGDIR}
-	${INSTALL_DATA} ${WRKDIR}/foundationdb.conf \
-	    ${STAGEDIR}${FOUNDATIONDB_ETCDIR}/foundationdb.conf.sample
-
-.include <bsd.port.mk>
diff --git a/databases/foundationdb/distinfo b/databases/foundationdb/distinfo
deleted file mode 100644
index 8315c830cce1..000000000000
--- a/databases/foundationdb/distinfo
+++ /dev/null
@@ -1,3 +0,0 @@
-TIMESTAMP = 1679567621
-SHA256 (apple-foundationdb-7.1.29_GH0.tar.gz) = ad608ddb781eea3ef4607ab9abb41282ca93383814d8149346bf3440cc9f46d5
-SIZE (apple-foundationdb-7.1.29_GH0.tar.gz) = 11676677
diff --git a/databases/foundationdb/files/patch-cmake_CompileBoost.cmake b/databases/foundationdb/files/patch-cmake_CompileBoost.cmake
deleted file mode 100644
index c72e610786f0..000000000000
--- a/databases/foundationdb/files/patch-cmake_CompileBoost.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
---- cmake/CompileBoost.cmake.orig	2022-09-19 11:42:41 UTC
-+++ cmake/CompileBoost.cmake
-@@ -113,7 +113,7 @@ endif()
-   return()
- endif()
- 
--find_package(Boost 1.78.0 EXACT QUIET COMPONENTS context CONFIG PATHS ${BOOST_HINT_PATHS})
-+find_package(Boost 1.78.0 COMPONENTS context CONFIG PATHS ${BOOST_HINT_PATHS})
- set(FORCE_BOOST_BUILD OFF CACHE BOOL "Forces cmake to build boost and ignores any installed boost")
- 
- if(Boost_FOUND AND NOT FORCE_BOOST_BUILD)
diff --git a/databases/foundationdb/files/patch-cmake_GetMsgpack.cmake b/databases/foundationdb/files/patch-cmake_GetMsgpack.cmake
deleted file mode 100644
index a0bff5b82bf3..000000000000
--- a/databases/foundationdb/files/patch-cmake_GetMsgpack.cmake
+++ /dev/null
@@ -1,24 +0,0 @@
---- cmake/GetMsgpack.cmake.orig	2022-09-19 11:42:41 UTC
-+++ cmake/GetMsgpack.cmake
-@@ -1,20 +1,7 @@
--find_package(msgpack 3.3.0 EXACT QUIET CONFIG)
-+find_package(msgpack-cxx REQUIRED QUIET CONFIG)
- 
- add_library(msgpack INTERFACE)
- 
- if(msgpack_FOUND)
-   target_link_libraries(msgpack INTERFACE msgpackc-cxx)
--else()
--  include(ExternalProject)
--  ExternalProject_add(msgpackProject
--    URL "https://github.com/msgpack/msgpack-c/releases/download/cpp-3.3.0/msgpack-3.3.0.tar.gz"
--    URL_HASH SHA256=6e114d12a5ddb8cb11f669f83f32246e484a8addd0ce93f274996f1941c1f07b
--    CONFIGURE_COMMAND ""
--    BUILD_COMMAND ""
--    INSTALL_COMMAND ""
--  )
--
--  ExternalProject_Get_property(msgpackProject SOURCE_DIR)
--  target_include_directories(msgpack SYSTEM INTERFACE "${SOURCE_DIR}/include")
--  add_dependencies(msgpack msgpackProject)
- endif()
diff --git a/databases/foundationdb/files/patch-fdbmonitor_CMakeLists.txt b/databases/foundationdb/files/patch-fdbmonitor_CMakeLists.txt
deleted file mode 100644
index 2b5912204a6a..000000000000
--- a/databases/foundationdb/files/patch-fdbmonitor_CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
---- fdbmonitor/CMakeLists.txt.orig	2022-09-19 11:42:41 UTC
-+++ fdbmonitor/CMakeLists.txt
-@@ -56,8 +56,3 @@ endif()
-   configure_file(${CMAKE_SOURCE_DIR}/contrib/generate_profile.sh
-     ${CMAKE_BINARY_DIR}/contrib/generate_profile.sh)
- endif()
--
--add_custom_target(generate_profile
--  COMMAND  ${CMAKE_BINARY_DIR}/contrib/generate_profile.sh ${CMAKE_BINARY_DIR})
--
--add_dependencies(generate_profile fdbmonitor fdbserver mako fdbcli)
diff --git a/databases/foundationdb/pkg-descr b/databases/foundationdb/pkg-descr
deleted file mode 100644
index d29a6335548a..000000000000
--- a/databases/foundationdb/pkg-descr
+++ /dev/null
@@ -1,14 +0,0 @@
-A massively distributed, transactional key-value store, extensible by
-design, with unparalleled reliability and performance.
-
-FoundationDB is multi-model, meaning you can store many types of data in a
-single database. All data is safely stored, distributed, and replicated
-in the Key-Value Store component. It is easy to install, grow, and
-manage, with a distributed architecture that gracefully scales out, and
-handles faults while acting like a single ACID database. FoundationDB
-provides amazing performance on commodity hardware, allowing you to
-support very heavy loads at low cost. It has been running in production
-for years and been hardened with lessons learned in some of the world's
-largest database deployments. Backing FoundationDB up is an unmatched
-testing system based on a deterministic simulation engine that ensures
-optimal reliability of operations.
diff --git a/databases/foundationdb/pkg-plist b/databases/foundationdb/pkg-plist
deleted file mode 100644
index d8047da25f25..000000000000
--- a/databases/foundationdb/pkg-plist
+++ /dev/null
@@ -1,28 +0,0 @@
-@dir(%%FOUNDATIONDB_USER%%,%%FOUNDATIONDB_GROUP%%,755) %%FOUNDATIONDB_ETCDIR%%
-@dir(%%FOUNDATIONDB_USER%%,%%FOUNDATIONDB_GROUP%%,755) %%FOUNDATIONDB_DBDIR%%
-@dir(%%FOUNDATIONDB_USER%%,%%FOUNDATIONDB_GROUP%%,755) %%FOUNDATIONDB_LOGDIR%%
-@sample %%FOUNDATIONDB_ETCDIR%%/foundationdb.conf.sample
-bin/actor_flamegraph
-bin/backup_agent
-bin/dr_agent
-bin/fastrestore_agent
-bin/fdb_flow_tester
-bin/fdbbackup
-bin/fdbcli
-bin/fdbconvert
-bin/fdbdecode
-bin/fdbmonitor
-bin/fdbr
-bin/fdbrestore
-bin/fdbserver
-bin/tutorial
-include/foundationdb/fdb.options
-include/foundationdb/fdb_c.h
-include/foundationdb/fdb_c_types.h
-include/foundationdb/fdb_c_options.g.h
-lib/libfdb_c.so
-lib/libfdb_flow.a
-lib/libfdb_sqlite.a
-lib/libfdbclient.a
-lib/libfdbrpc.a
-lib/libflow.a
diff --git a/databases/foundationdb71-client/Makefile b/databases/foundationdb71-client/Makefile
new file mode 100644
index 000000000000..4a856623b3b5
--- /dev/null
+++ b/databases/foundationdb71-client/Makefile
@@ -0,0 +1,11 @@
+PORTNAME=	foundationdb
+PORTREVISION=	0
+
+COMMENT=	FoundationDB client
+
+MASTERDIR=	${.CURDIR}/../foundationdb71-server
+
+_CLIENT_ONLY=	yes
+_COMPONENT=	client
+
+.include "${MASTERDIR}/Makefile"
diff --git a/databases/foundationdb71-server/Makefile b/databases/foundationdb71-server/Makefile
new file mode 100644
index 000000000000..e3f1e70e48c2
--- /dev/null
+++ b/databases/foundationdb71-server/Makefile
@@ -0,0 +1,103 @@
+PORTNAME?=	foundationdb
+DISTVERSION=	7.1.59
+PORTREVISION?=	0
+CATEGORIES?=	databases
+PKGNAMESUFFIX?=	${DISTVERSION:C/([0-9]+)\.([0-9]+).*/\1\2/}-${_COMPONENT}
+
+MAINTAINER?=	dmitry.wagin@ya.ru
+COMMENT?=	FoundationDB is a large-scale distributed database
+WWW=		https://www.foundationdb.org/
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BROKEN_aarch64=	invalid asm rdtsc
+ONLY_FOR_ARCHS=	aarch64 amd64
+ONLY_FOR_ARCHS_REASON=	not yet ported to anything else
+
+BUILD_DEPENDS=	bash:shells/bash \
+		msgpack-cxx>0:devel/msgpack-cxx \
+		toml11>0:devel/toml11
+LIB_DEPENDS=	libboost_system.so:devel/boost-libs \
+		libeio.so:devel/libeio
+
+USES=		cmake compiler:c++20-lang llvm:max=16 mono:build python:build \
+		shebangfix ssl
+USE_GITHUB=	yes
+GH_ACCOUNT=	apple
+GH_PROJECT=	foundationdb
+USE_LDCONFIG=	yes
+
+.if !defined(_CLIENT_ONLY)
+_SERVER_ONLY=	yes
+_COMPONENT=	server
+USE_RC_SUBR=	foundationdb
+RUN_DEPENDS+=	fdbcli:databases/${PORTNAME}${DISTVERSION:C/([0-9]+)\.([0-9]+).*/\1\2/}-client
+SUB_FILES+=	foundationdb.conf
+.endif
+
+SHEBANG_FILES=	bindings/c/generate_asm.py
+
+CMAKE_ARGS=	-DOPENSSL_ROOT_DIR=${OPENSSLLIB}
+CMAKE_OFF=	BUILD_DOCUMENTATION BUILD_GO_BINDING BUILD_JAVA_BINDING \
+		BUILD_PYTHON_BINDING BUILD_RUBY_BINDING DISABLE_TLS \
+		SSD_ROCKSDB_EXPERIMENTAL USE_DTRACE USE_JEMALLOC
+
+MAKE_ENV=	MONO_REGISTRY_PATH=/tmp/registry
+
+CONFLICTS+=	${PORTNAME}*-${_COMPONENT}*
+
+SUB_LIST=	${SUB_FDB}
+
+USERS=		${FOUNDATIONDB_USER}
+GROUPS=		${FOUNDATIONDB_GROUP}
+
+PLIST=		${PKGDIR}/pkg-plist-${_COMPONENT}
+PLIST_SUB=	${SUB_FDB}
+
+FOUNDATIONDB_USER?=	foundationdb
+FOUNDATIONDB_GROUP?=	foundationdb
+FOUNDATIONDB_DBDIR?=	/var/db/foundationdb
+FOUNDATIONDB_LOGDIR?=	/var/log/foundationdb
+
+SUB_FDB=	FOUNDATIONDB_USER=${FOUNDATIONDB_USER} \
+		FOUNDATIONDB_GROUP=${FOUNDATIONDB_GROUP} \
+		FOUNDATIONDB_DBDIR=${FOUNDATIONDB_DBDIR} \
+		FOUNDATIONDB_LOGDIR=${FOUNDATIONDB_LOGDIR}
+
+do-install:
+	@${MKDIR} ${STAGEDIR}${ETCDIR}
+.if defined(_SERVER_ONLY)
+	${MKDIR} ${STAGEDIR}${FOUNDATIONDB_DBDIR}
+	${MKDIR} ${STAGEDIR}${FOUNDATIONDB_LOGDIR}
+	${INSTALL_DATA} ${WRKDIR}/foundationdb.conf ${STAGEDIR}${ETCDIR}/foundationdb.conf.sample
+.  for f in fdbserver fdbmonitor
+	${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/${f} ${STAGEDIR}${PREFIX}/sbin/
+.  endfor
+.endif # _SERVER_ONLY
+.if defined(_CLIENT_ONLY)
+	${MKDIR} ${STAGEDIR}${PREFIX}/include/foundationdb
+	${MKDIR} ${STAGEDIR}${PREFIX}/lib/foundationdb/backup_agent
+	${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/fdbcli ${STAGEDIR}${PREFIX}/bin/
+.  for l in libfdb_c.so
+	${INSTALL_LIB} ${WRKDIR}/.build/lib/${l} ${STAGEDIR}/${PREFIX}/lib/
+.  endfor
+.  for i in fdb_c.h fdb_c_internal.h fdb_c_types.h
+	${INSTALL_DATA} ${WRKSRC}/bindings/c/foundationdb/${i} \
+		${STAGEDIR}/${PREFIX}/include/foundationdb/
+.  endfor
+.  for i in fdb_c_options.g.h
+	${INSTALL_DATA} ${WRKDIR}/.build/bindings/c/foundationdb/${i} \
+		${STAGEDIR}/${PREFIX}/include/foundationdb/
+.  endfor
+	${INSTALL_DATA} ${WRKSRC}/fdbclient/vexillographer/fdb.options \
+		${STAGEDIR}/${PREFIX}/include/foundationdb/
+	${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/fdbbackup \
+		${STAGEDIR}${PREFIX}/lib/foundationdb/backup_agent/backup_agent
+.  for s in fdbbackup fdbrestore fdbdr dr_agent
+	${RLN} ${STAGEDIR}${PREFIX}/lib/foundationdb/backup_agent/backup_agent \
+		${STAGEDIR}${PREFIX}/bin/${s}
+.  endfor
+.endif # _CLIENT_ONLY
+
+.include <bsd.port.mk>
diff --git a/databases/foundationdb71-server/distinfo b/databases/foundationdb71-server/distinfo
new file mode 100644
index 000000000000..d471aa7afdd9
--- /dev/null
+++ b/databases/foundationdb71-server/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1711226264
+SHA256 (apple-foundationdb-7.1.59_GH0.tar.gz) = 8a5b7756b96969505ea94a9c6f6852b1ee1730f75672dc887616b92cc7cd64f1
+SIZE (apple-foundationdb-7.1.59_GH0.tar.gz) = 11728251
diff --git a/databases/foundationdb/files/foundationdb.conf.in b/databases/foundationdb71-server/files/foundationdb.conf.in
similarity index 88%
rename from databases/foundationdb/files/foundationdb.conf.in
rename to databases/foundationdb71-server/files/foundationdb.conf.in
index 6fae1a863cb5..1df7fe1cf17f 100644
--- a/databases/foundationdb/files/foundationdb.conf.in
+++ b/databases/foundationdb71-server/files/foundationdb.conf.in
@@ -14,13 +14,13 @@ restart-delay = 60
 # initial-restart-delay = 0
 # restart-backoff = 60
 # restart-delay-reset-interval = 60
-cluster-file = %%FOUNDATIONDB_ETCDIR%%/fdb.cluster
+cluster-file = %%ETCDIR%%/fdb.cluster
 # delete-envvars =
 # kill-on-configuration-change = true
 
 ## Default parameters for individual fdbserver processes
 [fdbserver]
-command = %%PREFIX%%/bin/fdbserver
+command = %%PREFIX%%/sbin/fdbserver
 public-address = auto:$ID
 listen-address = public
 datadir = %%FOUNDATIONDB_DBDIR%%/data/$ID
@@ -41,7 +41,7 @@ logdir = %%FOUNDATIONDB_LOGDIR%%
 [fdbserver.4500]
 
 [backup_agent]
-command = %%PREFIX%%/bin/backup_agent
+command = %%PREFIX%%/lib/foundationdb/backup_agent/backup_agent
 logdir = %%FOUNDATIONDB_LOGDIR%%
 
 [backup_agent.1]
diff --git a/databases/foundationdb/files/foundationdb.in b/databases/foundationdb71-server/files/foundationdb.in
similarity index 96%
rename from databases/foundationdb/files/foundationdb.in
rename to databases/foundationdb71-server/files/foundationdb.in
index 84e0a036a8ae..719582a235d2 100644
--- a/databases/foundationdb/files/foundationdb.in
+++ b/databases/foundationdb71-server/files/foundationdb.in
@@ -29,7 +29,7 @@ load_rc_config "$name"
 start_precmd="foundationdb_start_precmd"
 
 pidfile="/var/run/fdbmonitor.pid"
-command=%%PREFIX%%/bin/fdbmonitor
+command=%%PREFIX%%/sbin/fdbmonitor
 command_args="--conffile ${foundationdb_config} --lockfile ${pidfile} --daemonize"
 
 foundationdb_start_precmd()
diff --git a/databases/foundationdb/files/patch-CMakeLists.txt b/databases/foundationdb71-server/files/patch-CMakeLists.txt
similarity index 51%
rename from databases/foundationdb/files/patch-CMakeLists.txt
rename to databases/foundationdb71-server/files/patch-CMakeLists.txt
index 78d6244a990c..064d0c3354ee 100644
--- a/databases/foundationdb/files/patch-CMakeLists.txt
+++ b/databases/foundationdb71-server/files/patch-CMakeLists.txt
@@ -1,15 +1,12 @@
---- CMakeLists.txt.orig	2022-09-19 11:42:41 UTC
+--- CMakeLists.txt.orig	2024-01-17 13:58:04 UTC
 +++ CMakeLists.txt
-@@ -183,9 +183,13 @@ add_subdirectory(fdbbackup)
-   add_subdirectory(fdbservice)
+@@ -184,8 +184,10 @@ else()
  endif()
  add_subdirectory(fdbbackup)
--add_subdirectory(contrib)
-+if(WITH_CONTRIB)
-+  add_subdirectory(contrib)
-+endif()
- add_subdirectory(tests)
+ add_subdirectory(contrib)
+-add_subdirectory(tests)
 -add_subdirectory(flowbench EXCLUDE_FROM_ALL)
++#add_subdirectory(tests)
 +if(WITH_FLOWBENCH)
 +  add_subdirectory(flowbench EXCLUDE_FROM_ALL)
 +endif()
diff --git a/databases/foundationdb71-server/files/patch-bindings_CMakeLists.txt b/databases/foundationdb71-server/files/patch-bindings_CMakeLists.txt
new file mode 100644
index 000000000000..1d01226f4f63
--- /dev/null
+++ b/databases/foundationdb71-server/files/patch-bindings_CMakeLists.txt
@@ -0,0 +1,10 @@
+--- bindings/CMakeLists.txt.orig	2024-01-17 13:58:04 UTC
++++ bindings/CMakeLists.txt
+@@ -15,6 +15,6 @@ endif()
+ if(WITH_RUBY_BINDING)
+   add_subdirectory(ruby)
+ endif()
+-if(NOT WIN32 AND NOT OPEN_FOR_IDE)
++if(FALSE)
+   package_bindingtester()
+ endif()
diff --git a/databases/foundationdb/files/patch-bindings_c_CMakeLists.txt b/databases/foundationdb71-server/files/patch-bindings_c_CMakeLists.txt
similarity index 51%
rename from databases/foundationdb/files/patch-bindings_c_CMakeLists.txt
rename to databases/foundationdb71-server/files/patch-bindings_c_CMakeLists.txt
index 7c58fb132630..605231ce16cd 100644
--- a/databases/foundationdb/files/patch-bindings_c_CMakeLists.txt
+++ b/databases/foundationdb71-server/files/patch-bindings_c_CMakeLists.txt
@@ -1,11 +1,11 @@
---- bindings/c/CMakeLists.txt.orig	2022-09-19 11:42:41 UTC
+--- bindings/c/CMakeLists.txt.orig	2024-01-17 13:58:04 UTC
 +++ bindings/c/CMakeLists.txt
-@@ -78,7 +78,7 @@ endif()
+@@ -78,7 +78,7 @@ if(WIN32)
  endif()
  
  # The tests don't build on windows
 -if(NOT WIN32)
-+if(NOT WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
++if(FALSE)
    set(MAKO_SRCS
      test/mako/mako.c
      test/mako/mako.h
diff --git a/databases/foundationdb71-server/files/patch-cmake_CompileBoost.cmake b/databases/foundationdb71-server/files/patch-cmake_CompileBoost.cmake
new file mode 100644
index 000000000000..3cdf6da24b5c
--- /dev/null
+++ b/databases/foundationdb71-server/files/patch-cmake_CompileBoost.cmake
@@ -0,0 +1,20 @@
+--- cmake/CompileBoost.cmake.orig	2024-01-17 13:58:04 UTC
++++ cmake/CompileBoost.cmake
+@@ -85,7 +85,7 @@ if(USE_SANITIZER)
+ endif()
+ 
+ # since boost 1.72 boost installs cmake configs. We will enforce config mode
+-set(Boost_USE_STATIC_LIBS ON)
++set(Boost_USE_STATIC_LIBS OFF)
+ 
+ # Clang and Gcc will have different name mangling to std::call_once, etc.
+ if (UNIX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang$")
+@@ -113,7 +113,7 @@ if(WIN32)
+   return()
+ endif()
+ 
+-find_package(Boost 1.78.0 EXACT QUIET COMPONENTS context CONFIG PATHS ${BOOST_HINT_PATHS})
++find_package(Boost 1.78.0 COMPONENTS context CONFIG PATHS ${BOOST_HINT_PATHS})
+ set(FORCE_BOOST_BUILD OFF CACHE BOOL "Forces cmake to build boost and ignores any installed boost")
+ 
+ if(Boost_FOUND AND NOT FORCE_BOOST_BUILD)
diff --git a/databases/foundationdb/files/patch-cmake_FDBComponents.cmake b/databases/foundationdb71-server/files/patch-cmake_FDBComponents.cmake
similarity index 84%
rename from databases/foundationdb/files/patch-cmake_FDBComponents.cmake
rename to databases/foundationdb71-server/files/patch-cmake_FDBComponents.cmake
index 815778f2df3a..1523ced1e53d 100644
--- a/databases/foundationdb/files/patch-cmake_FDBComponents.cmake
+++ b/databases/foundationdb71-server/files/patch-cmake_FDBComponents.cmake
@@ -1,4 +1,4 @@
---- cmake/FDBComponents.cmake.orig	2023-03-14 19:59:33 UTC
+--- cmake/FDBComponents.cmake.orig	2024-01-17 13:58:04 UTC
 +++ cmake/FDBComponents.cmake
 @@ -24,7 +24,7 @@ set(DISABLE_TLS OFF CACHE BOOL "Don't try to find Open
  if(DISABLE_TLS)
@@ -9,25 +9,23 @@
    if(WIN32)
      set(OPENSSL_MSVC_STATIC_RT ON)
    endif()
-@@ -201,6 +201,13 @@ else()
+@@ -202,6 +202,12 @@ else()
  endif()
  
  ################################################################################
 +# misc optional components
 +################################################################################
 +
-+set(WITH_CONTRIB ON)
 +set(WITH_FLOWBENCH OFF)
 +
 +################################################################################
  # Coroutine implementation
  ################################################################################
  
-@@ -245,6 +252,8 @@ function(print_components)
+@@ -246,6 +252,7 @@ function(print_components)
    message(STATUS "Build Documentation (make html):      ${WITH_DOCUMENTATION}")
    message(STATUS "Build Python sdist (make package):    ${WITH_PYTHON_BINDING}")
    message(STATUS "Configure CTest (depends on Python):  ${WITH_PYTHON}")
-+  message(STATUS "Build contrib:                        ${WITH_CONTRIB}")
 +  message(STATUS "Build with FlowBench:                 ${WITH_FLOWBENCH}")
    message(STATUS "Build with RocksDB:                   ${WITH_ROCKSDB_EXPERIMENTAL}")
    message(STATUS "Build with AWS SDK:                   ${WITH_AWS_BACKUP}")
diff --git a/databases/foundationdb71-server/files/patch-cmake_GetMsgpack.cmake b/databases/foundationdb71-server/files/patch-cmake_GetMsgpack.cmake
new file mode 100644
index 000000000000..adfc467bd72b
--- /dev/null
+++ b/databases/foundationdb71-server/files/patch-cmake_GetMsgpack.cmake
@@ -0,0 +1,17 @@
+--- cmake/GetMsgpack.cmake.orig	2023-09-26 04:25:05 UTC
++++ cmake/GetMsgpack.cmake
+@@ -1,9 +1,13 @@
+ find_package(msgpack 3.3.0 EXACT QUIET CONFIG)
++find_package(msgpackc-cxx 4.0.0...<6 QUIET CONFIG)
++find_package(msgpack-cxx 6 QUIET CONFIG)
+ 
+ add_library(msgpack INTERFACE)
+ 
+-if(msgpack_FOUND)
++if(msgpack_FOUND OR msgpackc-cxx_FOUND)
+   target_link_libraries(msgpack INTERFACE msgpackc-cxx)
++elseif(msgpack-cxx_FOUND)
++  target_link_libraries(msgpack INTERFACE msgpack-cxx)
+ else()
+   include(ExternalProject)
+   ExternalProject_add(msgpackProject
diff --git a/databases/foundationdb71-server/files/patch-fdbmonitor_CMakeLists.txt b/databases/foundationdb71-server/files/patch-fdbmonitor_CMakeLists.txt
new file mode 100644
index 000000000000..0029dfe979b9
--- /dev/null
+++ b/databases/foundationdb71-server/files/patch-fdbmonitor_CMakeLists.txt
@@ -0,0 +1,8 @@
+--- fdbmonitor/CMakeLists.txt.orig	2024-01-17 13:58:04 UTC
++++ fdbmonitor/CMakeLists.txt
+@@ -60,4 +60,4 @@ endif()
+ add_custom_target(generate_profile
+   COMMAND  ${CMAKE_BINARY_DIR}/contrib/generate_profile.sh ${CMAKE_BINARY_DIR})
+ 
+-add_dependencies(generate_profile fdbmonitor fdbserver mako fdbcli)
++add_dependencies(generate_profile fdbmonitor fdbserver fdbcli)
diff --git a/databases/foundationdb/files/patch-fdbmonitor_fdbmonitor.cpp b/databases/foundationdb71-server/files/patch-fdbmonitor_fdbmonitor.cpp
similarity index 100%
rename from databases/foundationdb/files/patch-fdbmonitor_fdbmonitor.cpp
rename to databases/foundationdb71-server/files/patch-fdbmonitor_fdbmonitor.cpp
diff --git a/databases/foundationdb/files/patch-fdbserver_FDBExecHelper.actor.cpp b/databases/foundationdb71-server/files/patch-fdbserver_FDBExecHelper.actor.cpp
similarity index 100%
rename from databases/foundationdb/files/patch-fdbserver_FDBExecHelper.actor.cpp
rename to databases/foundationdb71-server/files/patch-fdbserver_FDBExecHelper.actor.cpp
diff --git a/databases/foundationdb/files/patch-fdbserver_fdbserver.actor.cpp b/databases/foundationdb71-server/files/patch-fdbserver_fdbserver.actor.cpp
similarity index 88%
rename from databases/foundationdb/files/patch-fdbserver_fdbserver.actor.cpp
rename to databases/foundationdb71-server/files/patch-fdbserver_fdbserver.actor.cpp
index 1720825f36ac..d4ee49741917 100644
--- a/databases/foundationdb/files/patch-fdbserver_fdbserver.actor.cpp
+++ b/databases/foundationdb71-server/files/patch-fdbserver_fdbserver.actor.cpp
@@ -1,4 +1,4 @@
---- fdbserver/fdbserver.actor.cpp.orig	2022-09-19 11:42:41 UTC
+--- fdbserver/fdbserver.actor.cpp.orig	2024-01-17 13:58:04 UTC
 +++ fdbserver/fdbserver.actor.cpp
 @@ -84,7 +84,11 @@
  #if defined(__linux__) || defined(__FreeBSD__)
@@ -12,7 +12,7 @@
  #ifdef ALLOC_INSTRUMENTATION
  #include <cxxabi.h>
  #endif
-@@ -2225,9 +2229,14 @@ int main(int argc, char* argv[]) {
+@@ -2238,9 +2242,14 @@ int main(int argc, char* argv[]) {
  			f = result;
  		} else if (role == ServerRole::FlowProcess) {
  			TraceEvent(SevDebug, "StartingFlowProcess").detail("From", "fdbserver");
diff --git a/databases/foundationdb71-server/pkg-descr b/databases/foundationdb71-server/pkg-descr
new file mode 100644
index 000000000000..a695625ee101
--- /dev/null
+++ b/databases/foundationdb71-server/pkg-descr
@@ -0,0 +1,8 @@
+FoundationDB is a distributed database designed to handle large volumes of
+structured data across clusters of commodity servers. It organizes data as an
+ordered key-value store and employs ACID transactions for all operations. It is
+especially well-suited for read/write workloads but also has excellent
+performance for write-intensive workloads. Users interact with the database
+using API language binding.
+
+To learn more about FoundationDB, visit https://www.foundationdb.org
diff --git a/databases/foundationdb71-server/pkg-plist-client b/databases/foundationdb71-server/pkg-plist-client
new file mode 100644
index 000000000000..ec18ef5e72a7
--- /dev/null
+++ b/databases/foundationdb71-server/pkg-plist-client
@@ -0,0 +1,13 @@
+bin/dr_agent
+bin/fdbbackup
+bin/fdbcli
+bin/fdbdr
+bin/fdbrestore
+include/foundationdb/fdb_c.h
+include/foundationdb/fdb_c_internal.h
+include/foundationdb/fdb_c_options.g.h
+include/foundationdb/fdb_c_types.h
+include/foundationdb/fdb.options
+lib/foundationdb/backup_agent/backup_agent
+lib/libfdb_c.so
+@dir(%%FOUNDATIONDB_USER%%,%%FOUNDATIONDB_GROUP%%,755) %%ETCDIR%%
diff --git a/databases/foundationdb71-server/pkg-plist-server b/databases/foundationdb71-server/pkg-plist-server
new file mode 100644
index 000000000000..665afe1db04d
--- /dev/null
+++ b/databases/foundationdb71-server/pkg-plist-server
@@ -0,0 +1,6 @@
+sbin/fdbmonitor
+sbin/fdbserver
+@sample %%ETCDIR%%/foundationdb.conf.sample
+@dir(%%FOUNDATIONDB_USER%%,%%FOUNDATIONDB_GROUP%%,755) %%ETCDIR%%
+@dir(%%FOUNDATIONDB_USER%%,%%FOUNDATIONDB_GROUP%%,755) %%FOUNDATIONDB_DBDIR%%
+@dir(%%FOUNDATIONDB_USER%%,%%FOUNDATIONDB_GROUP%%,755) %%FOUNDATIONDB_LOGDIR%%
diff --git a/databases/foundationdb73-client/Makefile b/databases/foundationdb73-client/Makefile
new file mode 100644
index 000000000000..da94a2647f9b
--- /dev/null
+++ b/databases/foundationdb73-client/Makefile
@@ -0,0 +1,11 @@
+PORTNAME=	foundationdb
+PORTREVISION=	0
+
+COMMENT=	FoundationDB client
+
+MASTERDIR=	${.CURDIR}/../foundationdb73-server
+
+_CLIENT_ONLY=	yes
+_COMPONENT=	client
+
+.include "${MASTERDIR}/Makefile"
diff --git a/databases/foundationdb73-server/Makefile b/databases/foundationdb73-server/Makefile
new file mode 100644
index 000000000000..ad2bf95b2493
--- /dev/null
+++ b/databases/foundationdb73-server/Makefile
@@ -0,0 +1,108 @@
+PORTNAME?=	foundationdb
+DISTVERSION=	7.3.41
+PORTREVISION?=	0
+CATEGORIES?=	databases
+PKGNAMESUFFIX?=	${DISTVERSION:C/([0-9]+)\.([0-9]+).*/\1\2/}-${_COMPONENT}
+
+MAINTAINER?=	dmitry.wagin@ya.ru
+COMMENT?=	FoundationDB is a large-scale distributed database
+WWW=		https://www.foundationdb.org/
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BROKEN_aarch64=	invalid asm rdtsc
+ONLY_FOR_ARCHS=	aarch64 amd64
+ONLY_FOR_ARCHS_REASON=	not yet ported to anything else
+
+BUILD_DEPENDS=	bash:shells/bash \
+		msgpack-cxx>0:devel/msgpack-cxx \
+		toml11>0:devel/toml11
+LIB_DEPENDS=	libboost_system.so:devel/boost-libs \
+		libeio.so:devel/libeio \
+		libfmt.so:devel/libfmt
+
+USES=		cmake compiler:c++20-lang llvm:max=16 mono:build python:build \
+		shebangfix ssl
+USE_GITHUB=	yes
+GH_ACCOUNT=	apple
+GH_PROJECT=	foundationdb
+USE_LDCONFIG=	yes
+
+.if !defined(_CLIENT_ONLY)
+_SERVER_ONLY=	yes
+_COMPONENT=	server
+USE_RC_SUBR=	foundationdb
+RUN_DEPENDS+=	fdbcli:databases/${PORTNAME}${DISTVERSION:C/([0-9]+)\.([0-9]+).*/\1\2/}-client
+SUB_FILES+=	foundationdb.conf
+.endif
+
+SHEBANG_FILES=	bindings/c/generate_asm.py
+
+CMAKE_ARGS=	-DOPENSSL_ROOT_DIR=${OPENSSLLIB}
+CMAKE_OFF=	BUILD_DOCUMENTATION BUILD_GO_BINDING BUILD_JAVA_BINDING \
+		BUILD_PYTHON_BINDING BUILD_RUBY_BINDING DISABLE_TLS \
+		SSD_ROCKSDB_EXPERIMENTAL USE_DTRACE USE_JEMALLOC
+
+MAKE_ENV=	MONO_REGISTRY_PATH=/tmp/registry
+
+CONFLICTS+=	${PORTNAME}*-${_COMPONENT}*
+
+SUB_LIST=	${SUB_FDB}
+
+USERS=		${FOUNDATIONDB_USER}
+GROUPS=		${FOUNDATIONDB_GROUP}
+
+PLIST=		${PKGDIR}/pkg-plist-${_COMPONENT}
+PLIST_SUB=	${SUB_FDB}
+
+FOUNDATIONDB_USER?=	foundationdb
+FOUNDATIONDB_GROUP?=	foundationdb
+FOUNDATIONDB_DBDIR?=	/var/db/foundationdb
+FOUNDATIONDB_LOGDIR?=	/var/log/foundationdb
+
+SUB_FDB=	FOUNDATIONDB_USER=${FOUNDATIONDB_USER} \
+		FOUNDATIONDB_GROUP=${FOUNDATIONDB_GROUP} \
+		FOUNDATIONDB_DBDIR=${FOUNDATIONDB_DBDIR} \
+		FOUNDATIONDB_LOGDIR=${FOUNDATIONDB_LOGDIR}
+
+do-install:
+	@${MKDIR} ${STAGEDIR}${ETCDIR}
+.if defined(_SERVER_ONLY)
+	${MKDIR} ${STAGEDIR}${FOUNDATIONDB_DBDIR}
+	${MKDIR} ${STAGEDIR}${FOUNDATIONDB_LOGDIR}
+	${INSTALL_DATA} ${WRKDIR}/foundationdb.conf \
+		${STAGEDIR}${ETCDIR}/foundationdb.conf.sample
+.  for f in fdbserver fdbmonitor
+	${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/${f} \
+		${STAGEDIR}${PREFIX}/sbin/
+.  endfor
+.endif # _SERVER_ONLY
+.if defined(_CLIENT_ONLY)
+	${MKDIR} ${STAGEDIR}${PREFIX}/include/foundationdb
+	${MKDIR} ${STAGEDIR}${PREFIX}/lib/foundationdb/backup_agent
+	${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/fdbcli \
+		${STAGEDIR}${PREFIX}/bin/
+.  for l in libfdb_c.so libfdb_c_shim.so
+	${INSTALL_LIB} ${WRKDIR}/.build/lib/${l} \
+		${STAGEDIR}/${PREFIX}/lib/
+.  endfor
+.  for i in fdb_c.h fdb_c_internal.h fdb_c_shim.h fdb_c_types.h
+	${INSTALL_DATA} ${WRKSRC}/bindings/c/foundationdb/${i} \
+		${STAGEDIR}/${PREFIX}/include/foundationdb/
+.  endfor
+.  for i in fdb_c_apiversion.g.h fdb_c_options.g.h
+	${INSTALL_DATA} ${WRKDIR}/.build/bindings/c/foundationdb/${i} \
+		${STAGEDIR}/${PREFIX}/include/foundationdb/
+.  endfor
+	${INSTALL_DATA} ${WRKSRC}/fdbclient/vexillographer/fdb.options \
+		${STAGEDIR}/${PREFIX}/include/foundationdb/
+	${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/fdbbackup \
+		${STAGEDIR}${PREFIX}/lib/foundationdb/backup_agent/backup_agent
+.  for s in fdbbackup fdbrestore fdbdr dr_agent
+	${RLN} ${STAGEDIR}${PREFIX}/lib/foundationdb/backup_agent/backup_agent \
+		${STAGEDIR}${PREFIX}/bin/${s}
+.  endfor
+.endif # _CLIENT_ONLY
+
+.include <bsd.port.mk>
diff --git a/databases/foundationdb73-server/distinfo b/databases/foundationdb73-server/distinfo
new file mode 100644
index 000000000000..5d3d8238ddb9
--- /dev/null
+++ b/databases/foundationdb73-server/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1715420283
+SHA256 (apple-foundationdb-7.3.41_GH0.tar.gz) = 208d917c6701b229b3bb141a57b97f466facd8996f9f51bd2c5204d868b96d24
+SIZE (apple-foundationdb-7.3.41_GH0.tar.gz) = 13095814
diff --git a/databases/foundationdb73-server/files/foundationdb.conf.in b/databases/foundationdb73-server/files/foundationdb.conf.in
new file mode 100644
index 000000000000..1df7fe1cf17f
--- /dev/null
+++ b/databases/foundationdb73-server/files/foundationdb.conf.in
@@ -0,0 +1,47 @@
+## foundationdb.conf
+##
+## Configuration file for FoundationDB server processes
+## Full documentation is available at
+## https://apple.github.io/foundationdb/configuration.html#the-configuration-file
+
+[fdbmonitor]
+user = %%FOUNDATIONDB_USER%%
+group = %%FOUNDATIONDB_GROUP%%
+
+[general]
+restart-delay = 60
+## by default, restart-backoff = restart-delay-reset-interval = restart-delay
+# initial-restart-delay = 0
+# restart-backoff = 60
+# restart-delay-reset-interval = 60
+cluster-file = %%ETCDIR%%/fdb.cluster
+# delete-envvars =
+# kill-on-configuration-change = true
+
+## Default parameters for individual fdbserver processes
+[fdbserver]
+command = %%PREFIX%%/sbin/fdbserver
+public-address = auto:$ID
+listen-address = public
+datadir = %%FOUNDATIONDB_DBDIR%%/data/$ID
+logdir = %%FOUNDATIONDB_LOGDIR%%
+# logsize = 10MiB
+# maxlogssize = 100MiB
+# machine-id =
+# datacenter-id =
+# class = 
+# memory = 8GiB
+# storage-memory = 1GiB
+# cache-memory = 2GiB
+# metrics-cluster =
+# metrics-prefix =
+
+## An individual fdbserver process with id 4500
+## Parameters set here override defaults from the [fdbserver] section
+[fdbserver.4500]
+
+[backup_agent]
+command = %%PREFIX%%/lib/foundationdb/backup_agent/backup_agent
+logdir = %%FOUNDATIONDB_LOGDIR%%
+
+[backup_agent.1]
diff --git a/databases/foundationdb73-server/files/foundationdb.in b/databases/foundationdb73-server/files/foundationdb.in
new file mode 100644
index 000000000000..719582a235d2
--- /dev/null
+++ b/databases/foundationdb73-server/files/foundationdb.in
@@ -0,0 +1,42 @@
+#!/bin/sh
+
*** 524 LINES SKIPPED ***