git: 1957504e5b37 - main - devel/grpc142: Fix build with protobuf 22+
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 14 Dec 2023 17:03:25 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=1957504e5b3731a209b2c83890cc68ae57c1e0e6 commit 1957504e5b3731a209b2c83890cc68ae57c1e0e6 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2023-12-14 16:22:27 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2023-12-14 17:03:04 +0000 devel/grpc142: Fix build with protobuf 22+ --- devel/grpc142/Makefile | 1 + devel/grpc142/files/patch-protobuf | 66 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/devel/grpc142/Makefile b/devel/grpc142/Makefile index d189618f6d09..b35e035b5647 100644 --- a/devel/grpc142/Makefile +++ b/devel/grpc142/Makefile @@ -33,6 +33,7 @@ CMAKE_ARGS= -DCMAKE_CXX_STANDARD=17 \ -DgRPC_SSL_PROVIDER=package \ -DgRPC_ZLIB_PROVIDER=package CMAKE_ON= BUILD_SHARED_LIBS +LDFLAGS+= -labsl_hash -labsl_raw_hash_set USE_LDCONFIG= yes PLIST_SUB= SHLIB_MAJOR=${PORTVERSION:R} \ diff --git a/devel/grpc142/files/patch-protobuf b/devel/grpc142/files/patch-protobuf new file mode 100644 index 000000000000..5367f513a01d --- /dev/null +++ b/devel/grpc142/files/patch-protobuf @@ -0,0 +1,66 @@ +--- CMakeLists.txt.orig 2021-11-16 23:39:48 UTC ++++ CMakeLists.txt +@@ -191,7 +191,7 @@ endif() + + # Add c++11 flags + if (NOT DEFINED CMAKE_CXX_STANDARD) +- set(CMAKE_CXX_STANDARD 11) ++ set(CMAKE_CXX_STANDARD 17) + else() + if (CMAKE_CXX_STANDARD LESS 11) + message(FATAL_ERROR "CMAKE_CXX_STANDARD is less than 11, please specify at least SET(CMAKE_CXX_STANDARD 11)") +--- src/compiler/config_protobuf.h.orig 2021-11-16 23:39:48 UTC ++++ src/compiler/config_protobuf.h +@@ -50,7 +50,7 @@ + #endif + + #ifndef GRPC_CUSTOM_CSHARP_GETCLASSNAME +-#include <google/protobuf/compiler/csharp/csharp_names.h> ++#include <google/protobuf/compiler/csharp/names.h> + #define GRPC_CUSTOM_CSHARP_GETCLASSNAME \ + ::google::protobuf::compiler::csharp::GetClassName + #define GRPC_CUSTOM_CSHARP_GETFILENAMESPACE \ +--- src/compiler/objective_c_generator.cc.orig 2021-11-16 23:39:48 UTC ++++ src/compiler/objective_c_generator.cc +@@ -22,7 +22,7 @@ + #include <set> + #include <sstream> + +-#include <google/protobuf/compiler/objectivec/objectivec_helpers.h> ++#include <google/protobuf/compiler/objectivec/names.h> + + #include "src/compiler/config.h" + #include "src/compiler/objective_c_generator_helpers.h" +--- src/compiler/objective_c_generator_helpers.h.orig 2021-11-16 23:39:48 UTC ++++ src/compiler/objective_c_generator_helpers.h +@@ -21,7 +21,7 @@ + + #include <map> + +-#include <google/protobuf/compiler/objectivec/objectivec_helpers.h> ++#include <google/protobuf/compiler/objectivec/names.h> + + #include "src/compiler/config.h" + #include "src/compiler/generator_helpers.h" +--- src/compiler/objective_c_plugin.cc.orig 2021-11-16 23:39:48 UTC ++++ src/compiler/objective_c_plugin.cc +@@ -20,7 +20,7 @@ + + #include <memory> + +-#include <google/protobuf/compiler/objectivec/objectivec_helpers.h> ++#include <google/protobuf/compiler/objectivec/names.h> + + #include "src/compiler/config.h" + #include "src/compiler/objective_c_generator.h" +--- include/grpcpp/impl/codegen/config_protobuf.h.orig 2021-11-16 23:39:48 UTC ++++ include/grpcpp/impl/codegen/config_protobuf.h +@@ -69,7 +69,7 @@ + #include <google/protobuf/util/json_util.h> + #include <google/protobuf/util/type_resolver_util.h> + #define GRPC_CUSTOM_JSONUTIL ::google::protobuf::util +-#define GRPC_CUSTOM_UTIL_STATUS ::google::protobuf::util::Status ++#define GRPC_CUSTOM_UTIL_STATUS ::absl::Status + #endif + + namespace grpc {