git: 65d51f736c81 - main - databases/rocksdb: Update to 8.5.3

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 04 Sep 2023 21:31:17 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=65d51f736c81c048cda3ba44c8495f57050f117f

commit 65d51f736c81c048cda3ba44c8495f57050f117f
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-09-04 21:25:19 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-09-04 21:30:04 +0000

    databases/rocksdb: Update to 8.5.3
    
    - Install librocksdb_test.so: it is required by table_reader_bench
    (rocksdb-8.5.3) /wrkdirs/usr/ports/databases/rocksdb/work/stage//usr/local/bin/table_reader_bench - required shared library librocksdb_test.so not found
    
    Changes:        https://github.com/facebook/rocksdb/releases
---
 databases/rocksdb/Makefile                        |  4 ++--
 databases/rocksdb/distinfo                        |  6 +++---
 databases/rocksdb/files/patch-port-stack_trace.cc | 25 +++--------------------
 databases/rocksdb/pkg-plist                       |  1 +
 4 files changed, 9 insertions(+), 27 deletions(-)

diff --git a/databases/rocksdb/Makefile b/databases/rocksdb/Makefile
index a5346a0045c0..ccacf7047a5e 100644
--- a/databases/rocksdb/Makefile
+++ b/databases/rocksdb/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	rocksdb
-PORTVERSION=	8.3.2
+PORTVERSION=	8.5.3
 DISTVERSIONPREFIX=	v
 CATEGORIES=	databases
 
@@ -77,7 +77,7 @@ post-install:
 	# Locate all shared libraries. The STRIP_CMD below failed on our package building clusters.
 	${FIND} ${WRKSRC} ${STAGEDIR}${PREFIX} -name '*.so*'
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/librocksdb.so
-	${INSTALL_LIB} ${WRKSRC}/librocksdb_tools.so ${STAGEDIR}${PREFIX}/lib/
+	${INSTALL_LIB} ${WRKSRC}/librocksdb_test.so ${WRKSRC}/librocksdb_tools.so ${STAGEDIR}${PREFIX}/lib/
 	${INSTALL_DATA} ${WRKSRC}/make_config.mk ${STAGEDIR}${DATADIR}/
 
 .include <bsd.port.post.mk>
diff --git a/databases/rocksdb/distinfo b/databases/rocksdb/distinfo
index f560088908c1..50cf0cc20b47 100644
--- a/databases/rocksdb/distinfo
+++ b/databases/rocksdb/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1688166048
-SHA256 (facebook-rocksdb-v8.3.2_GH0.tar.gz) = b55d6da6f562eb79bad7fdc9c368efc9ea4bfa239e69cead37923fc845a43fba
-SIZE (facebook-rocksdb-v8.3.2_GH0.tar.gz) = 12713061
+TIMESTAMP = 1693823833
+SHA256 (facebook-rocksdb-v8.5.3_GH0.tar.gz) = ed4230500b9ca20bc7918c32166b2d0d46a8695c59991821daa586d55689d785
+SIZE (facebook-rocksdb-v8.5.3_GH0.tar.gz) = 12764827
diff --git a/databases/rocksdb/files/patch-port-stack_trace.cc b/databases/rocksdb/files/patch-port-stack_trace.cc
index 38ed09cc340f..f3d3c09689ae 100644
--- a/databases/rocksdb/files/patch-port-stack_trace.cc
+++ b/databases/rocksdb/files/patch-port-stack_trace.cc
@@ -1,29 +1,10 @@
---- port/stack_trace.cc.orig	2023-02-19 21:44:55 UTC
+--- port/stack_trace.cc.orig	2023-09-01 20:58:39 UTC
 +++ port/stack_trace.cc
-@@ -33,6 +33,8 @@ void* SaveStack(int* /*num_frames*/, int /*first_frame
- 
+@@ -37,6 +37,7 @@ void* SaveStack(int* /*num_frames*/, int /*first_frame
+ #endif  // OS_OPENBSD
  #ifdef OS_FREEBSD
  #include <sys/sysctl.h>
-+#include <sys/types.h>
 +#include <sys/wait.h>
  #endif  // OS_FREEBSD
  #ifdef OS_LINUX
  #include <sys/prctl.h>
-@@ -219,7 +221,7 @@ void PrintStack(int first_frames_to_skip) {
-   void* frames[kMaxFrames];
- 
-   auto num_frames = backtrace(frames, kMaxFrames);
--  PrintStack(&frames[first_frames_to_skip], num_frames - first_frames_to_skip);
-+  PrintStack(&frames[first_frames_to_skip], (int) (num_frames - first_frames_to_skip));
- }
- 
- void PrintAndFreeStack(void* callstack, int num_frames) {
-@@ -232,7 +234,7 @@ void* SaveStack(int* num_frames, int first_frames_to_s
-   void* frames[kMaxFrames];
- 
-   auto count = backtrace(frames, kMaxFrames);
--  *num_frames = count - first_frames_to_skip;
-+  *num_frames = (int) (count - first_frames_to_skip);
-   void* callstack = malloc(sizeof(void*) * *num_frames);
-   memcpy(callstack, &frames[first_frames_to_skip], sizeof(void*) * *num_frames);
-   return callstack;
diff --git a/databases/rocksdb/pkg-plist b/databases/rocksdb/pkg-plist
index 9c8cfde165a7..dd085baa2b37 100644
--- a/databases/rocksdb/pkg-plist
+++ b/databases/rocksdb/pkg-plist
@@ -123,5 +123,6 @@ lib/librocksdb.so
 lib/librocksdb.so.8
 lib/librocksdb.so.%%SHLIB_VER%%
 lib/librocksdb.so.%%PORTVERSION%%
+lib/librocksdb_test.so
 lib/librocksdb_tools.so
 libdata/pkgconfig/rocksdb.pc