Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jan 2022 09:20:02 GMT
From:      Dave Cottlehuber <dch@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 9f9424d3e13a - main - databases/foundationdb: update to 6.3.22 and add aarch64
Message-ID:  <202201040920.2049K2rP019439@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dch:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9f9424d3e13ab34439237cc7891dccfca877b1a9

commit 9f9424d3e13ab34439237cc7891dccfca877b1a9
Author:     Dave Cottlehuber <dch@FreeBSD.org>
AuthorDate: 2022-01-04 09:18:55 +0000
Commit:     Dave Cottlehuber <dch@FreeBSD.org>
CommitDate: 2022-01-04 09:18:55 +0000

    databases/foundationdb: update to 6.3.22 and add aarch64
    
    Now that lang/mono builds on aarch64 we can have nice things too.
    
    Obtained from:  mikael@FreeBSD.org
    Sponsored by:   SkunkWerks, GmbH
---
 databases/foundationdb-devel/Makefile              |  4 +--
 databases/foundationdb-devel/distinfo              |  6 ++---
 .../foundationdb-devel/files/patch-CMakeLists.txt  |  8 +++---
 .../files/patch-bindings_c_CMakeLists.txt          | 20 +++++++--------
 databases/foundationdb/Makefile                    |  5 ++--
 databases/foundationdb/distinfo                    |  6 ++---
 .../files/patch-bindings_c_CMakeLists.txt          | 11 ++++++++
 .../files/patch-bindings_c_generate__asm.py        | 29 ++++++++++++++++++++++
 .../files/patch-cmake_ConfigureCompiler.cmake      | 11 ++++++++
 databases/foundationdb/files/patch-flow_Platform.h | 24 ++++++++++++++++++
 10 files changed, 100 insertions(+), 24 deletions(-)

diff --git a/databases/foundationdb-devel/Makefile b/databases/foundationdb-devel/Makefile
index fc54585a679e..43f602bf31fc 100644
--- a/databases/foundationdb-devel/Makefile
+++ b/databases/foundationdb-devel/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	foundationdb-devel
-DISTVERSION=	7.0.0.a.20210529
+DISTVERSION=	7.0.0.a.20211125
 CATEGORIES=	databases
 
 # PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/pull/
@@ -26,7 +26,7 @@ USES=		cmake compiler:c++17-lang mono:build python:build shebangfix \
 USE_GITHUB=	yes
 GH_ACCOUNT=	apple
 GH_PROJECT=	foundationdb
-GH_TAGNAME=	d35da1a
+GH_TAGNAME=	09fedc4
 USE_LDCONFIG=	yes
 USE_RC_SUBR=	foundationdb
 
diff --git a/databases/foundationdb-devel/distinfo b/databases/foundationdb-devel/distinfo
index b8f5c558434c..e94aa3d56ae6 100644
--- a/databases/foundationdb-devel/distinfo
+++ b/databases/foundationdb-devel/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1622455872
-SHA256 (apple-foundationdb-7.0.0.a.20210529-d35da1a_GH0.tar.gz) = a5cf720028a3d9e3b615c0343f0b2b0637824bff59e80fa809eba32f2b2428d5
-SIZE (apple-foundationdb-7.0.0.a.20210529-d35da1a_GH0.tar.gz) = 9855962
+TIMESTAMP = 1638100203
+SHA256 (apple-foundationdb-7.0.0.a.20211125-09fedc4_GH0.tar.gz) = 645e7913a13a8e9a2bd08dea6521a4437ab1a305feb48d26d3d2fa19852c2a9c
+SIZE (apple-foundationdb-7.0.0.a.20211125-09fedc4_GH0.tar.gz) = 11293576
diff --git a/databases/foundationdb-devel/files/patch-CMakeLists.txt b/databases/foundationdb-devel/files/patch-CMakeLists.txt
index 0c56c01423fa..2d01b2f6d826 100644
--- a/databases/foundationdb-devel/files/patch-CMakeLists.txt
+++ b/databases/foundationdb-devel/files/patch-CMakeLists.txt
@@ -1,12 +1,12 @@
---- CMakeLists.txt.orig	2020-12-28 05:52:45 UTC
+--- CMakeLists.txt.orig	2021-11-25 00:33:05 UTC
 +++ CMakeLists.txt
-@@ -164,7 +164,9 @@ endif()
+@@ -171,7 +171,9 @@ else()
+ endif()
  add_subdirectory(fdbbackup)
- add_subdirectory(contrib)
  add_subdirectory(tests)
 +if(WITH_FLOWBENCH)
  add_subdirectory(flowbench EXCLUDE_FROM_ALL)
 +endif()
- if(WITH_PYTHON)
+ if(WITH_PYTHON AND WITH_C_BINDING)
    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
index 37eb53835a66..febacf79505c 100644
--- a/databases/foundationdb-devel/files/patch-bindings_c_CMakeLists.txt
+++ b/databases/foundationdb-devel/files/patch-bindings_c_CMakeLists.txt
@@ -1,11 +1,11 @@
---- bindings/c/CMakeLists.txt.orig	2020-12-28 05:52:45 UTC
+--- bindings/c/CMakeLists.txt.orig	2021-11-25 00:33:05 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)
+@@ -77,7 +77,7 @@ endif()
+ # The tests don't build on windows and ARM macs
+ # doctest doesn't seem to compile on ARM macs, we should
+ # check later whether this works
+-if(NOT WIN32 AND NOT IS_ARM_MAC)
++if(NOT WIN32 AND NOT IS_ARM_MAC AND NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+   set(MAKO_SRCS
+     test/mako/mako.c
+     test/mako/mako.h
diff --git a/databases/foundationdb/Makefile b/databases/foundationdb/Makefile
index a959372b3c62..40cb26f81797 100644
--- a/databases/foundationdb/Makefile
+++ b/databases/foundationdb/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	foundationdb
-DISTVERSION=	6.3.13
+DISTVERSION=	6.3.22
 CATEGORIES=	databases
 
 MAINTAINER=	dch@FreeBSD.org
@@ -11,7 +11,8 @@ 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=	bash:shells/bash \
+		git:devel/git
 LIB_DEPENDS=	libboost_system.so:devel/boost-libs \
 		libeio.so:devel/libeio
 
diff --git a/databases/foundationdb/distinfo b/databases/foundationdb/distinfo
index 0f2e6c2a357b..4f4b639ee8ee 100644
--- a/databases/foundationdb/distinfo
+++ b/databases/foundationdb/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1622455453
-SHA256 (apple-foundationdb-6.3.13_GH0.tar.gz) = 1f4b9c84c6e488fd31c545f14f2e9c33ab75ce9e6bbf514e9f988d116f2010ad
-SIZE (apple-foundationdb-6.3.13_GH0.tar.gz) = 9709343
+TIMESTAMP = 1636212240
+SHA256 (apple-foundationdb-6.3.22_GH0.tar.gz) = 8f42ace92c1ec49ba2707f67fcf3c62d1b76f23231962e52e4d946e69c07bb50
+SIZE (apple-foundationdb-6.3.22_GH0.tar.gz) = 10645856
diff --git a/databases/foundationdb/files/patch-bindings_c_CMakeLists.txt b/databases/foundationdb/files/patch-bindings_c_CMakeLists.txt
new file mode 100644
index 000000000000..03c484c00465
--- /dev/null
+++ b/databases/foundationdb/files/patch-bindings_c_CMakeLists.txt
@@ -0,0 +1,11 @@
+--- bindings/c/CMakeLists.txt.orig	2021-11-06 16:00:16 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")
+ endif()
+ 
+ add_custom_command(OUTPUT ${asm_file} ${CMAKE_CURRENT_BINARY_DIR}/fdb_c_function_pointers.g.h
diff --git a/databases/foundationdb/files/patch-bindings_c_generate__asm.py b/databases/foundationdb/files/patch-bindings_c_generate__asm.py
new file mode 100644
index 000000000000..dfc0c350a770
--- /dev/null
+++ b/databases/foundationdb/files/patch-bindings_c_generate__asm.py
@@ -0,0 +1,29 @@
+--- 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-cmake_ConfigureCompiler.cmake b/databases/foundationdb/files/patch-cmake_ConfigureCompiler.cmake
new file mode 100644
index 000000000000..99b8e24c6765
--- /dev/null
+++ b/databases/foundationdb/files/patch-cmake_ConfigureCompiler.cmake
@@ -0,0 +1,11 @@
+--- 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-flow_Platform.h b/databases/foundationdb/files/patch-flow_Platform.h
new file mode 100644
index 000000000000..7332d3bded60
--- /dev/null
+++ b/databases/foundationdb/files/patch-flow_Platform.h
@@ -0,0 +1,24 @@
+--- 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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202201040920.2049K2rP019439>