From 815d4f4ce7c159242bbd3b0d2d6088760713b67a Mon Sep 17 00:00:00 2001 From: Dave Cottlehuber Date: Wed, 6 Jan 2021 10:47:52 +0000 Subject: [PATCH] databases/foundationdb-devel: update to 20201228 snapshot Sponsored by: SkunkWerks, GmbH --- databases/foundationdb-devel/Makefile | 11 ++++++--- databases/foundationdb-devel/distinfo | 6 ++--- .../files/patch-CMakeLists.txt | 12 ++++++++++ .../files/patch-bindings_c_CMakeLists.txt | 11 +++++++++ ...gs_c_test_unit_third__party_CMakeLists.txt | 22 ++++++++++++++++++ .../files/patch-flow_Platform.actor.cpp | 11 +++++++++ .../files/patch-flow_ThreadPrimitives.h | 23 +++++++++++++++++++ 7 files changed, 90 insertions(+), 6 deletions(-) create mode 100644 databases/foundationdb-devel/files/patch-CMakeLists.txt create mode 100644 databases/foundationdb-devel/files/patch-bindings_c_CMakeLists.txt create mode 100644 databases/foundationdb-devel/files/patch-bindings_c_test_unit_third__party_CMakeLists.txt create mode 100644 databases/foundationdb-devel/files/patch-flow_Platform.actor.cpp create mode 100644 databases/foundationdb-devel/files/patch-flow_ThreadPrimitives.h diff --git a/databases/foundationdb-devel/Makefile b/databases/foundationdb-devel/Makefile index dc7aca0b8e88..f860d5143937 100644 --- a/databases/foundationdb-devel/Makefile +++ b/databases/foundationdb-devel/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= foundationdb-devel -DISTVERSION= 7.0.0.a.20200515 +DISTVERSION= 7.0.0.a.20201228 CATEGORIES= databases MAINTAINER= dch@FreeBSD.org @@ -13,7 +13,11 @@ LICENSE_FILE= ${WRKSRC}/LICENSE ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= not yet ported to anything other than amd64 -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 @@ -21,7 +25,7 @@ USES= compiler:c++17-lang cmake mono:build python:build shebangfix ssl USE_GITHUB= yes GH_ACCOUNT= apple GH_PROJECT= foundationdb -GH_TAGNAME= c1fc784 +GH_TAGNAME= c895049 USE_LDCONFIG= yes USE_RC_SUBR= foundationdb @@ -47,6 +51,7 @@ 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 .for f in fdbbackup fdbcli fdbmonitor fdbserver \ diff --git a/databases/foundationdb-devel/distinfo b/databases/foundationdb-devel/distinfo index e52b6604bb83..25e0b3481f1f 100644 --- a/databases/foundationdb-devel/distinfo +++ b/databases/foundationdb-devel/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1589833261 -SHA256 (apple-foundationdb-7.0.0.a.20200515-c1fc784_GH0.tar.gz) = 6cd6fd7dc95b18b8f2e8a400c556eebf8fb4d4392ddff4a954a4d175cd57ab13 -SIZE (apple-foundationdb-7.0.0.a.20200515-c1fc784_GH0.tar.gz) = 5425979 +TIMESTAMP = 1609716284 +SHA256 (apple-foundationdb-7.0.0.a.20201228-c895049_GH0.tar.gz) = bf49a6ddf40d01e3a27497c942b6ead91f3b53849a406971b20adc6b1f5297ce +SIZE (apple-foundationdb-7.0.0.a.20201228-c895049_GH0.tar.gz) = 6381771 diff --git a/databases/foundationdb-devel/files/patch-CMakeLists.txt b/databases/foundationdb-devel/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..0c56c01423fa --- /dev/null +++ b/databases/foundationdb-devel/files/patch-CMakeLists.txt @@ -0,0 +1,12 @@ +--- CMakeLists.txt.orig 2020-12-28 05:52:45 UTC ++++ CMakeLists.txt +@@ -164,7 +164,9 @@ endif() + add_subdirectory(fdbbackup) + add_subdirectory(contrib) + add_subdirectory(tests) ++if(WITH_FLOWBENCH) + add_subdirectory(flowbench EXCLUDE_FROM_ALL) ++endif() + if(WITH_PYTHON) + add_subdirectory(bindings) + endif() diff --git a/databases/foundationdb-devel/files/patch-bindings_c_CMakeLists.txt b/databases/foundationdb-devel/files/patch-bindings_c_CMakeLists.txt new file mode 100644 index 000000000000..37eb53835a66 --- /dev/null +++ b/databases/foundationdb-devel/files/patch-bindings_c_CMakeLists.txt @@ -0,0 +1,11 @@ +--- bindings/c/CMakeLists.txt.orig 2020-12-28 05:52:45 UTC ++++ bindings/c/CMakeLists.txt +@@ -100,8 +100,6 @@ if(NOT WIN32) + target_link_libraries(fdb_c_ryw_benchmark PRIVATE fdb_c) + target_link_libraries(fdb_c_txn_size_test PRIVATE fdb_c) + +- add_dependencies(fdb_c_setup_tests doctest) +- add_dependencies(fdb_c_unit_tests doctest) + target_include_directories(fdb_c_setup_tests PUBLIC ${DOCTEST_INCLUDE_DIR}) + target_include_directories(fdb_c_unit_tests PUBLIC ${DOCTEST_INCLUDE_DIR}) + target_link_libraries(fdb_c_setup_tests PRIVATE fdb_c Threads::Threads) diff --git a/databases/foundationdb-devel/files/patch-bindings_c_test_unit_third__party_CMakeLists.txt b/databases/foundationdb-devel/files/patch-bindings_c_test_unit_third__party_CMakeLists.txt new file mode 100644 index 000000000000..52509e221e6b --- /dev/null +++ b/databases/foundationdb-devel/files/patch-bindings_c_test_unit_third__party_CMakeLists.txt @@ -0,0 +1,22 @@ +--- bindings/c/test/unit/third_party/CMakeLists.txt.orig 2021-01-04 00:07:51 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-devel/files/patch-flow_Platform.actor.cpp b/databases/foundationdb-devel/files/patch-flow_Platform.actor.cpp new file mode 100644 index 000000000000..85557d8234f2 --- /dev/null +++ b/databases/foundationdb-devel/files/patch-flow_Platform.actor.cpp @@ -0,0 +1,11 @@ +--- flow/Platform.actor.cpp.orig 2021-01-03 23:00:51 UTC ++++ flow/Platform.actor.cpp +@@ -2406,7 +2406,7 @@ ACTOR Future> findFiles( std::stri + return result; + } + +-#elif (defined(__linux__) || defined(__APPLE__)) ++#elif (defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)) + #define FILE_ATTRIBUTE_DATA mode_t + + bool acceptFile( FILE_ATTRIBUTE_DATA fileAttributes, std::string const& name, std::string const& extension ) { diff --git a/databases/foundationdb-devel/files/patch-flow_ThreadPrimitives.h b/databases/foundationdb-devel/files/patch-flow_ThreadPrimitives.h new file mode 100644 index 000000000000..fe00d9506ec2 --- /dev/null +++ b/databases/foundationdb-devel/files/patch-flow_ThreadPrimitives.h @@ -0,0 +1,23 @@ +--- flow/ThreadPrimitives.h.orig 2021-01-03 22:45:20 UTC ++++ flow/ThreadPrimitives.h +@@ -47,9 +47,9 @@ + + // TODO: We should make this dependent on the CPU. Maybe cmake + // can set this variable properly? +-constexpr size_t CACHE_LINE_SIZE = 64; ++constexpr size_t MAX_CACHE_LINE_SIZE = 64; + +-class alignas(CACHE_LINE_SIZE) ThreadSpinLock { ++class alignas(MAX_CACHE_LINE_SIZE) ThreadSpinLock { + public: + // #ifdef _WIN32 + ThreadSpinLock() { +@@ -90,7 +90,7 @@ class alignas(CACHE_LINE_SIZE) ThreadSpinLock { (priva + std::atomic_flag isLocked = ATOMIC_FLAG_INIT; + // We want a spin lock to occupy a cache line in order to + // prevent false sharing. +- std::array padding; ++ std::array padding; + }; + + class ThreadSpinLockHolder {