mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
databases/foundationdb: update to 7.0.0
This commit is contained in:
parent
3795217cdd
commit
b79db1b778
10 changed files with 108 additions and 96 deletions
|
@ -1,5 +1,5 @@
|
||||||
PORTNAME= foundationdb
|
PORTNAME= foundationdb
|
||||||
DISTVERSION= 6.3.22
|
DISTVERSION= 7.0.0
|
||||||
CATEGORIES= databases
|
CATEGORIES= databases
|
||||||
|
|
||||||
MAINTAINER= dch@FreeBSD.org
|
MAINTAINER= dch@FreeBSD.org
|
||||||
|
@ -11,30 +11,35 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||||
ONLY_FOR_ARCHS= aarch64 amd64
|
ONLY_FOR_ARCHS= aarch64 amd64
|
||||||
ONLY_FOR_ARCHS_REASON= not yet ported to anything else
|
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
|
git:devel/git
|
||||||
|
|
||||||
LIB_DEPENDS= libboost_system.so:devel/boost-libs \
|
LIB_DEPENDS= libboost_system.so:devel/boost-libs \
|
||||||
libeio.so:devel/libeio
|
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
|
USE_GITHUB= yes
|
||||||
GH_ACCOUNT= apple
|
GH_ACCOUNT= apple
|
||||||
|
GH_PROJECT= foundationdb
|
||||||
USE_LDCONFIG= yes
|
USE_LDCONFIG= yes
|
||||||
USE_RC_SUBR= foundationdb
|
USE_RC_SUBR= foundationdb
|
||||||
|
|
||||||
SHEBANG_FILES= bindings/c/generate_asm.py
|
SHEBANG_FILES= bindings/c/generate_asm.py
|
||||||
|
|
||||||
CMAKE_ARGS= -DOPENSSL_ROOT_DIR=${OPENSSLLIB}
|
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
|
USERS= foundationdb
|
||||||
GROUPS= foundationdb
|
GROUPS= foundationdb
|
||||||
DBDIR?= /var/db/foundationdb
|
DBDIR?= /var/db/foundationdb
|
||||||
LOGDIR?= /var/log/foundationdb
|
LOGDIR?= /var/log/foundationdb
|
||||||
|
|
||||||
SUB_FDB= DB_USER=${USERS} \
|
SUB_FDB= DB_USER=${USERS} DB_GROUP=${GROUPS} DB_DIR=${DBDIR} \
|
||||||
DB_GROUP=${GROUPS} \
|
|
||||||
DB_DIR=${DBDIR} \
|
|
||||||
LOG_DIR=${LOGDIR}
|
LOG_DIR=${LOGDIR}
|
||||||
SUB_FILES+= foundationdb.conf
|
SUB_FILES+= foundationdb.conf
|
||||||
SUB_LIST+= ${SUB_FDB}
|
SUB_LIST+= ${SUB_FDB}
|
||||||
|
@ -43,24 +48,22 @@ PLIST_SUB+= ${SUB_FDB}
|
||||||
post-patch:
|
post-patch:
|
||||||
${REINPLACE_CMD} 's/OPENSSL_USE_STATIC_LIBS TRUE/OPENSSL_USE_STATIC_LIBS FALSE/' \
|
${REINPLACE_CMD} 's/OPENSSL_USE_STATIC_LIBS TRUE/OPENSSL_USE_STATIC_LIBS FALSE/' \
|
||||||
${WRKSRC}/cmake/FDBComponents.cmake
|
${WRKSRC}/cmake/FDBComponents.cmake
|
||||||
|
|
||||||
do-install:
|
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 \
|
.for f in fdbbackup fdbcli fdbmonitor fdbserver \
|
||||||
actor_flamegraph fdb_c_performance_test fdb_c_ryw_benchmark \
|
actor_flamegraph fdb_flow_tester fdbconvert fdbdecode tutorial
|
||||||
fdb_c_txn_size_test fdb_flow_tester fdbconvert fdbdecode mako tutorial
|
|
||||||
${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/${f} ${STAGEDIR}${PREFIX}/bin/
|
${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/${f} ${STAGEDIR}${PREFIX}/bin/
|
||||||
.endfor
|
.endfor
|
||||||
# confirm with upstream if these are actually needed
|
|
||||||
.for s in backup_agent dr_agent fastrestore_agent fdbr fdbrestore
|
.for s in backup_agent dr_agent fastrestore_agent fdbr fdbrestore
|
||||||
${RLN} ${STAGEDIR}${PREFIX}/bin/fdbbackup ${STAGEDIR}${PREFIX}/bin/${s}
|
${RLN} ${STAGEDIR}${PREFIX}/bin/fdbbackup ${STAGEDIR}${PREFIX}/bin/${s}
|
||||||
.endfor
|
.endfor
|
||||||
# exposed libraries - confirm with upstream
|
# exposed libraries - confirm with upstream
|
||||||
.for l in libfdb_c.so libfdb_flow.a libfdb_sqlite.a libfdbclient.a \
|
.for l in libfdb_c.so libfdb_flow.a libfdb_sqlite.a libfdbclient.a libfdbrpc.a \
|
||||||
libfdbrpc.a libflow.a libthirdparty.a
|
libflow.a
|
||||||
${STRIP_CMD} ${WRKDIR}/.build/lib/${l}
|
${STRIP_CMD} ${WRKDIR}/.build/lib/${l}
|
||||||
${INSTALL_DATA} ${WRKDIR}/.build/lib/${l} ${STAGEDIR}/${PREFIX}/lib/
|
${INSTALL_DATA} ${WRKDIR}/.build/lib/${l} ${STAGEDIR}/${PREFIX}/lib/
|
||||||
.endfor
|
.endfor
|
||||||
# exposed headers - confirm with upstream
|
|
||||||
${MKDIR} ${STAGEDIR}${PREFIX}/include/foundationdb
|
${MKDIR} ${STAGEDIR}${PREFIX}/include/foundationdb
|
||||||
${INSTALL_DATA} ${WRKSRC}/bindings/c/foundationdb/fdb_c.h \
|
${INSTALL_DATA} ${WRKSRC}/bindings/c/foundationdb/fdb_c.h \
|
||||||
${STAGEDIR}/${PREFIX}/include/foundationdb/
|
${STAGEDIR}/${PREFIX}/include/foundationdb/
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
TIMESTAMP = 1636212240
|
TIMESTAMP = 1640764452
|
||||||
SHA256 (apple-foundationdb-6.3.22_GH0.tar.gz) = 8f42ace92c1ec49ba2707f67fcf3c62d1b76f23231962e52e4d946e69c07bb50
|
SHA256 (apple-foundationdb-7.0.0_GH0.tar.gz) = 9a5ef672e32b6976b04a20c013b28c4aeeb7d35456afdefbc552707d52bc31ca
|
||||||
SIZE (apple-foundationdb-6.3.22_GH0.tar.gz) = 10645856
|
SIZE (apple-foundationdb-7.0.0_GH0.tar.gz) = 10875992
|
||||||
|
|
18
databases/foundationdb/files/patch-CMakeLists.txt
Normal file
18
databases/foundationdb/files/patch-CMakeLists.txt
Normal file
|
@ -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()
|
|
@ -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
|
+++ bindings/c/CMakeLists.txt
|
||||||
@@ -15,6 +15,8 @@ elseif(WIN32)
|
@@ -65,7 +65,7 @@ if(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")
|
|
||||||
endif()
|
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
|
||||||
|
|
|
@ -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, '_')
|
|
|
@ -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")
|
|
@ -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)
|
|
34
databases/foundationdb/files/patch-cmake_FDBComponents.cmake
Normal file
34
databases/foundationdb/files/patch-cmake_FDBComponents.cmake
Normal file
|
@ -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()
|
|
@ -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;
|
|
|
@ -4,17 +4,17 @@
|
||||||
bin/actor_flamegraph
|
bin/actor_flamegraph
|
||||||
bin/backup_agent
|
bin/backup_agent
|
||||||
bin/dr_agent
|
bin/dr_agent
|
||||||
bin/fdb_c_performance_test
|
bin/fastrestore_agent
|
||||||
bin/fdb_c_ryw_benchmark
|
|
||||||
bin/fdb_c_txn_size_test
|
|
||||||
bin/fdb_flow_tester
|
bin/fdb_flow_tester
|
||||||
bin/fdbbackup
|
bin/fdbbackup
|
||||||
bin/fdbcli
|
bin/fdbcli
|
||||||
|
bin/fdbconvert
|
||||||
|
bin/fdbdecode
|
||||||
bin/fdbmonitor
|
bin/fdbmonitor
|
||||||
bin/fdbr
|
bin/fdbr
|
||||||
bin/fdbrestore
|
bin/fdbrestore
|
||||||
bin/fdbserver
|
bin/fdbserver
|
||||||
bin/mako
|
bin/tutorial
|
||||||
include/foundationdb/fdb.options
|
include/foundationdb/fdb.options
|
||||||
include/foundationdb/fdb_c.h
|
include/foundationdb/fdb_c.h
|
||||||
include/foundationdb/fdb_c_options.g.h
|
include/foundationdb/fdb_c_options.g.h
|
||||||
|
@ -24,4 +24,3 @@ lib/libfdb_sqlite.a
|
||||||
lib/libfdbclient.a
|
lib/libfdbclient.a
|
||||||
lib/libfdbrpc.a
|
lib/libfdbrpc.a
|
||||||
lib/libflow.a
|
lib/libflow.a
|
||||||
lib/libthirdparty.a
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue