git: 524fa2c149b3 - main - devel/bear: Fix buld with protobuf 26.0+
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 15 Aug 2024 11:56:15 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=524fa2c149b3fea04f1787b45f7ea92ec096c433
commit 524fa2c149b3fea04f1787b45f7ea92ec096c433
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-08-15 11:46:00 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-08-15 11:47:41 +0000
devel/bear: Fix buld with protobuf 26.0+
Obtained from: https://github.com/rizsotto/Bear/commit/3ba056a6cdebd1608279e89b021e7c28bcee3ea3
---
devel/bear/files/patch-protobuf | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/devel/bear/files/patch-protobuf b/devel/bear/files/patch-protobuf
new file mode 100644
index 000000000000..4f7ea7ae961b
--- /dev/null
+++ b/devel/bear/files/patch-protobuf
@@ -0,0 +1,24 @@
+Obtained from: https://github.com/rizsotto/Bear/commit/3ba056a6cdebd1608279e89b021e7c28bcee3ea3
+
+--- source/intercept/source/collect/db/EventsDatabaseWriter.cc.orig 2023-08-28 08:46:17 UTC
++++ source/intercept/source/collect/db/EventsDatabaseWriter.cc
+@@ -21,6 +21,8 @@
+ #include "libsys/Errors.h"
+
+ #include <google/protobuf/util/json_util.h>
++#include <google/protobuf/stubs/common.h>
++
+ #include <fmt/format.h>
+
+ #include <sys/types.h>
+@@ -36,7 +38,9 @@ namespace {
+ JsonPrintOptions create_print_options() {
+ JsonPrintOptions print_options;
+ print_options.add_whitespace = false;
+- print_options.always_print_primitive_fields = true;
++#if GOOGLE_PROTOBUF_VERSION < 5026000
++ print_options.always_print_primitive_fields = true;
++#endif
+ print_options.preserve_proto_field_names = true;
+ print_options.always_print_enums_as_ints = false;
+ return print_options;