aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Cottlehuber <dch@FreeBSD.org>2022-01-04 11:07:33 +0000
committerDave Cottlehuber <dch@FreeBSD.org>2022-01-06 11:59:34 +0000
commitb79db1b778ee60e3d0346e7abcce394d1ae6c9c7 (patch)
tree372569a3fcf3ae45b7f534295b9c09adffbc3ad1
parent3795217cddcafe46ed5592be3fc7ea3b9d0a54f2 (diff)
downloadports-b79db1b778ee60e3d0346e7abcce394d1ae6c9c7.tar.gz
ports-b79db1b778ee60e3d0346e7abcce394d1ae6c9c7.zip
databases/foundationdb: update to 7.0.0
-rw-r--r--databases/foundationdb/Makefile35
-rw-r--r--databases/foundationdb/distinfo6
-rw-r--r--databases/foundationdb/files/patch-CMakeLists.txt18
-rw-r--r--databases/foundationdb/files/patch-bindings_c_CMakeLists.txt16
-rw-r--r--databases/foundationdb/files/patch-bindings_c_generate__asm.py29
-rw-r--r--databases/foundationdb/files/patch-bindings_c_test_unit_third__party_CMakeLists.txt22
-rw-r--r--databases/foundationdb/files/patch-cmake_ConfigureCompiler.cmake11
-rw-r--r--databases/foundationdb/files/patch-cmake_FDBComponents.cmake34
-rw-r--r--databases/foundationdb/files/patch-flow_Platform.h24
-rw-r--r--databases/foundationdb/pkg-plist9
10 files changed, 108 insertions, 96 deletions
diff --git a/databases/foundationdb/Makefile b/databases/foundationdb/Makefile
index 40cb26f81797..efefec0100b9 100644
--- a/databases/foundationdb/Makefile
+++ b/databases/foundationdb/Makefile
@@ -1,5 +1,5 @@
PORTNAME= foundationdb
-DISTVERSION= 6.3.22
+DISTVERSION= 7.0.0
CATEGORIES= databases
MAINTAINER= dch@FreeBSD.org
@@ -11,30 +11,35 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
ONLY_FOR_ARCHS= aarch64 amd64
ONLY_FOR_ARCHS_REASON= not yet ported to anything else
-BUILD_DEPENDS= bash:shells/bash \
+BUILD_DEPENDS= ${LOCALBASE}/include/doctest/doctest.h:devel/doctest \
+ ${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= compiler:c++17-lang cmake mono:build python:build shebangfix ssl
+USES= cmake compiler:c++17-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= USE_DTRACE DISABLE_TLS
+CMAKE_OFF= DISABLE_TLS USE_DTRACE USE_JEMALLOC WITH_CONTRIB WITH_FLOWBENCH
+
+MAKE_ENV= MONO_REGISTRY_PATH=/tmp/registry
USERS= foundationdb
GROUPS= foundationdb
DBDIR?= /var/db/foundationdb
LOGDIR?= /var/log/foundationdb
-SUB_FDB= DB_USER=${USERS} \
- DB_GROUP=${GROUPS} \
- DB_DIR=${DBDIR} \
+SUB_FDB= DB_USER=${USERS} DB_GROUP=${GROUPS} DB_DIR=${DBDIR} \
LOG_DIR=${LOGDIR}
SUB_FILES+= foundationdb.conf
SUB_LIST+= ${SUB_FDB}
@@ -43,24 +48,22 @@ PLIST_SUB+= ${SUB_FDB}
post-patch:
${REINPLACE_CMD} 's/OPENSSL_USE_STATIC_LIBS TRUE/OPENSSL_USE_STATIC_LIBS FALSE/' \
${WRKSRC}/cmake/FDBComponents.cmake
+
do-install:
- # commands on first line, dev tools on next two
+# commands on first line, dev tools on next two
.for f in fdbbackup fdbcli fdbmonitor fdbserver \
- actor_flamegraph fdb_c_performance_test fdb_c_ryw_benchmark \
- fdb_c_txn_size_test fdb_flow_tester fdbconvert fdbdecode mako tutorial
+ actor_flamegraph fdb_flow_tester fdbconvert fdbdecode tutorial
${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/${f} ${STAGEDIR}${PREFIX}/bin/
.endfor
- # confirm with upstream if these are actually needed
.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 libthirdparty.a
+# 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/
@@ -68,7 +71,7 @@ do-install:
${STAGEDIR}/${PREFIX}/include/foundationdb/
${INSTALL_DATA} ${WRKDIR}/.build/bindings/c/foundationdb/fdb_c_options.g.h \
${STAGEDIR}/${PREFIX}/include/foundationdb/
- # runtime related
+# runtime related
${MKDIR} ${STAGEDIR}${DBDIR} \
${STAGEDIR}${LOGDIR} \
${STAGEDIR}${PREFIX}/etc/foundationdb
diff --git a/databases/foundationdb/distinfo b/databases/foundationdb/distinfo
index 4f4b639ee8ee..d6b0c7b9492a 100644
--- a/databases/foundationdb/distinfo
+++ b/databases/foundationdb/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1636212240
-SHA256 (apple-foundationdb-6.3.22_GH0.tar.gz) = 8f42ace92c1ec49ba2707f67fcf3c62d1b76f23231962e52e4d946e69c07bb50
-SIZE (apple-foundationdb-6.3.22_GH0.tar.gz) = 10645856
+TIMESTAMP = 1640764452
+SHA256 (apple-foundationdb-7.0.0_GH0.tar.gz) = 9a5ef672e32b6976b04a20c013b28c4aeeb7d35456afdefbc552707d52bc31ca
+SIZE (apple-foundationdb-7.0.0_GH0.tar.gz) = 10875992
diff --git a/databases/foundationdb/files/patch-CMakeLists.txt b/databases/foundationdb/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..c39b3c3eb46e
--- /dev/null
+++ b/databases/foundationdb/files/patch-CMakeLists.txt
@@ -0,0 +1,18 @@
+--- CMakeLists.txt.orig 2021-12-29 09:04:08 UTC
++++ CMakeLists.txt
+@@ -172,9 +172,13 @@ else()
+ add_subdirectory(fdbservice)
+ endif()
+ add_subdirectory(fdbbackup)
+-add_subdirectory(contrib)
++if(WITH_CONTRIB)
++ add_subdirectory(contrib)
++endif()
+ add_subdirectory(tests)
+-add_subdirectory(flowbench EXCLUDE_FROM_ALL)
++if(WITH_FLOWBENCH)
++ add_subdirectory(flowbench EXCLUDE_FROM_ALL)
++endif()
+ if(WITH_PYTHON AND WITH_C_BINDING)
+ add_subdirectory(bindings)
+ endif()
diff --git a/databases/foundationdb/files/patch-bindings_c_CMakeLists.txt b/databases/foundationdb/files/patch-bindings_c_CMakeLists.txt
index 03c484c00465..c05798bb5aaa 100644
--- a/databases/foundationdb/files/patch-bindings_c_CMakeLists.txt
+++ b/databases/foundationdb/files/patch-bindings_c_CMakeLists.txt
@@ -1,11 +1,11 @@
---- bindings/c/CMakeLists.txt.orig 2021-11-06 16:00:16 UTC
+--- bindings/c/CMakeLists.txt.orig 2021-12-29 13:15:46 UTC
+++ bindings/c/CMakeLists.txt
-@@ -15,6 +15,8 @@ elseif(WIN32)
- set(asm_file ${CMAKE_CURRENT_BINARY_DIR}/fdb_c.g.asm)
- elseif(CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
- set(platform "linux-aarch64")
-+elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
-+ set(platform "freebsd-aarch64")
+@@ -65,7 +65,7 @@ if(WIN32)
endif()
- add_custom_command(OUTPUT ${asm_file} ${CMAKE_CURRENT_BINARY_DIR}/fdb_c_function_pointers.g.h
+ # The tests don't build on windows
+-if(NOT WIN32)
++if(NOT WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ set(MAKO_SRCS
+ test/mako/mako.c
+ test/mako/mako.h
diff --git a/databases/foundationdb/files/patch-bindings_c_generate__asm.py b/databases/foundationdb/files/patch-bindings_c_generate__asm.py
deleted file mode 100644
index dfc0c350a770..000000000000
--- a/databases/foundationdb/files/patch-bindings_c_generate__asm.py
+++ /dev/null
@@ -1,29 +0,0 @@
---- bindings/c/generate_asm.py.orig 2021-11-06 16:01:37 UTC
-+++ bindings/c/generate_asm.py
-@@ -59,7 +59,7 @@ def write_windows_asm(asmfile, functions):
-
-
- def write_unix_asm(asmfile, functions, prefix):
-- if platform != "linux-aarch64":
-+ if platform != "freebsd-aarch64" and platform != "linux-aarch64":
- asmfile.write(".intel_syntax noprefix\n")
-
- if platform.startswith('linux') or platform == "freebsd":
-@@ -104,7 +104,7 @@ def write_unix_asm(asmfile, functions, prefix):
- # .sizeg, .-g
- # .ident"GCC: (GNU) 8.3.1 20190311 (Red Hat 8.3.1-3)"
-
-- if platform == "linux-aarch64":
-+ if platform == "freebsd-aarch64" or platform == "linux-aarch64":
- asmfile.write("\tadrp x8, :got:fdb_api_ptr_%s\n" % (f))
- asmfile.write("\tldr x8, [x8, #:got_lo12:fdb_api_ptr_%s]\n" % (f))
- asmfile.write("\tldr x8, [x8]\n")
-@@ -123,7 +123,7 @@ with open(asm, 'w') as asmfile:
- hfile.write(
- "void fdb_api_ptr_removed() { fprintf(stderr, \"REMOVED FDB API FUNCTION\\n\"); abort(); }\n\n")
-
-- if platform.startswith('linux'):
-+ if platform.startswith('freebsd') or platform.startswith('linux'):
- write_unix_asm(asmfile, functions, '')
- elif platform == "osx":
- write_unix_asm(asmfile, functions, '_')
diff --git a/databases/foundationdb/files/patch-bindings_c_test_unit_third__party_CMakeLists.txt b/databases/foundationdb/files/patch-bindings_c_test_unit_third__party_CMakeLists.txt
new file mode 100644
index 000000000000..4deeb8410767
--- /dev/null
+++ b/databases/foundationdb/files/patch-bindings_c_test_unit_third__party_CMakeLists.txt
@@ -0,0 +1,22 @@
+--- bindings/c/test/unit/third_party/CMakeLists.txt.orig 2021-12-07 03:03:34 UTC
++++ bindings/c/test/unit/third_party/CMakeLists.txt
+@@ -1,18 +1 @@
+-# Download doctest repo.
+-include(ExternalProject)
+-find_package(Git REQUIRED)
+-
+-ExternalProject_Add(
+- doctest
+- PREFIX ${CMAKE_BINARY_DIR}/doctest
+- GIT_REPOSITORY https://github.com/onqtam/doctest.git
+- GIT_TAG 1c8da00c978c19e00a434b2b1f854fcffc9fba35 # v2.4.0
+- TIMEOUT 10
+- CONFIGURE_COMMAND ""
+- BUILD_COMMAND ""
+- INSTALL_COMMAND ""
+- LOG_DOWNLOAD ON
+-)
+-
+-ExternalProject_Get_Property(doctest source_dir)
+-set(DOCTEST_INCLUDE_DIR ${source_dir}/doctest CACHE INTERNAL "Path to include folder for doctest")
++set(DOCTEST_INCLUDE_DIR /usr/local/include/doctest CACHE INTERNAL "Path to include folder for doctest")
diff --git a/databases/foundationdb/files/patch-cmake_ConfigureCompiler.cmake b/databases/foundationdb/files/patch-cmake_ConfigureCompiler.cmake
deleted file mode 100644
index 99b8e24c6765..000000000000
--- a/databases/foundationdb/files/patch-cmake_ConfigureCompiler.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
---- cmake/ConfigureCompiler.cmake.orig 2021-10-21 22:10:27 UTC
-+++ cmake/ConfigureCompiler.cmake
-@@ -233,7 +233,7 @@ else()
- if (STATIC_LINK_LIBCXX)
- add_link_options(-static-libgcc -nostdlib++ -Wl,-Bstatic -lc++ -lc++abi -Wl,-Bdynamic)
- endif()
-- add_link_options(-stdlib=libc++ -Wl,-build-id=sha1)
-+ add_link_options(-Wl,-z,notext)
- endif()
- endif()
- if (OPEN_FOR_IDE)
diff --git a/databases/foundationdb/files/patch-cmake_FDBComponents.cmake b/databases/foundationdb/files/patch-cmake_FDBComponents.cmake
new file mode 100644
index 000000000000..e4b75371774d
--- /dev/null
+++ b/databases/foundationdb/files/patch-cmake_FDBComponents.cmake
@@ -0,0 +1,34 @@
+--- cmake/FDBComponents.cmake.orig 2021-12-07 03:03:34 UTC
++++ cmake/FDBComponents.cmake
+@@ -24,7 +24,7 @@ set(DISABLE_TLS OFF CACHE BOOL "Don't try to find Open
+ if(DISABLE_TLS)
+ set(WITH_TLS OFF)
+ else()
+- set(OPENSSL_USE_STATIC_LIBS TRUE)
++ set(OPENSSL_USE_STATIC_LIBS FALSE)
+ find_package(OpenSSL)
+ if(OPENSSL_FOUND)
+ set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
+@@ -203,6 +203,13 @@ else()
+ endif()
+
+ ################################################################################
++# misc optional components
++################################################################################
++
++set(WITH_CONTRIB ON)
++set(WITH_FLOWBENCH OFF)
++
++################################################################################
+ # Coroutine implementation
+ ################################################################################
+
+@@ -236,6 +243,8 @@ 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 "=========================================")
+ endfunction()
diff --git a/databases/foundationdb/files/patch-flow_Platform.h b/databases/foundationdb/files/patch-flow_Platform.h
deleted file mode 100644
index 7332d3bded60..000000000000
--- a/databases/foundationdb/files/patch-flow_Platform.h
+++ /dev/null
@@ -1,24 +0,0 @@
---- flow/Platform.h.orig 2021-10-21 22:10:27 UTC
-+++ flow/Platform.h
-@@ -434,6 +434,12 @@ dev_t getDeviceId(std::string path);
- #include <features.h>
- #include <sys/stat.h>
- #endif
-+#ifdef __freebsd__
-+#ifndef __aarch64__
-+#include <x86intrin.h>
-+#else
-+#include "sse2neon.h"
-+#endif
-
- #if defined(__APPLE__)
- // Version of CLang bundled with XCode doesn't yet include ia32intrin.h.
-@@ -459,7 +465,7 @@ inline static uint64_t timestampCounter() {
- #define timestampCounter() __rdtsc()
- #endif
-
--#ifdef __FreeBSD__
-+#if defined(__FreeBSD__) && !defined(__aarch64__)
- #if !(__has_builtin(__rdtsc))
- inline static uint64_t __rdtsc() {
- uint64_t lo, hi;
diff --git a/databases/foundationdb/pkg-plist b/databases/foundationdb/pkg-plist
index 21278e3b27a2..6a089bd26277 100644
--- a/databases/foundationdb/pkg-plist
+++ b/databases/foundationdb/pkg-plist
@@ -4,17 +4,17 @@
bin/actor_flamegraph
bin/backup_agent
bin/dr_agent
-bin/fdb_c_performance_test
-bin/fdb_c_ryw_benchmark
-bin/fdb_c_txn_size_test
+bin/fastrestore_agent
bin/fdb_flow_tester
bin/fdbbackup
bin/fdbcli
+bin/fdbconvert
+bin/fdbdecode
bin/fdbmonitor
bin/fdbr
bin/fdbrestore
bin/fdbserver
-bin/mako
+bin/tutorial
include/foundationdb/fdb.options
include/foundationdb/fdb_c.h
include/foundationdb/fdb_c_options.g.h
@@ -24,4 +24,3 @@ lib/libfdb_sqlite.a
lib/libfdbclient.a
lib/libfdbrpc.a
lib/libflow.a
-lib/libthirdparty.a