Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[brpc] update to 1.4.0 #29547

Merged
merged 1 commit into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 20 additions & 17 deletions ports/brpc/fix-build.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9edc0a68..af786821 100644
index 35365b27..53c5fffd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,7 +25,7 @@ option(WITH_DEBUG_SYMBOLS "With debug symbols" ON)
option(WITH_THRIFT "With thrift framed protocol supported" OFF)
@@ -26,7 +26,7 @@ option(WITH_THRIFT "With thrift framed protocol supported" OFF)
option(WITH_SNAPPY "With snappy" OFF)
option(WITH_RDMA "With RDMA" OFF)
option(BUILD_UNIT_TESTS "Whether to build unit tests" OFF)
-option(BUILD_BRPC_TOOLS "Whether to build brpc tools" ON)
+option(BUILD_BRPC_TOOLS "Whether to build brpc tools" OFF)
option(DOWNLOAD_GTEST "Download and build a fresh copy of googletest. Requires Internet access." ON)

# Enable MACOSX_RPATH. Run "cmake --help-policy CMP0042" for policy details.
@@ -65,7 +65,8 @@ endif()
@@ -66,7 +66,8 @@ endif()

if(WITH_THRIFT)
set(THRIFT_CPP_FLAG "-DENABLE_THRIFT_FRAMED_PROTOCOL")
Expand All @@ -20,8 +20,8 @@ index 9edc0a68..af786821 100644
+ set(THRIFT_LIB "thrift::thrift")
endif()

include(GNUInstallDirs)
@@ -144,11 +145,14 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(WITH_RDMA_VAL "0")
@@ -150,14 +151,14 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
endif()
endif()

Expand All @@ -33,13 +33,16 @@ index 9edc0a68..af786821 100644

-find_path(LEVELDB_INCLUDE_PATH NAMES leveldb/db.h)
-find_library(LEVELDB_LIB NAMES leveldb)
-if ((NOT LEVELDB_INCLUDE_PATH) OR (NOT LEVELDB_LIB))
- message(FATAL_ERROR "Fail to find leveldb")
-endif()
+find_package(leveldb CONFIG REQUIRED)
+set(LEVELDB_INCLUDE_PATH ${PROTOBUF_INCLUDE_DIR})
+set(LEVELDB_LIB leveldb::leveldb)
if ((NOT LEVELDB_INCLUDE_PATH) OR (NOT LEVELDB_LIB))
message(FATAL_ERROR "Fail to find leveldb")
endif()
@@ -163,8 +167,9 @@ if(WITH_SNAPPY)

if(WITH_SNAPPY)
find_path(SNAPPY_INCLUDE_PATH NAMES snappy.h)
@@ -169,8 +170,9 @@ if(WITH_SNAPPY)
endif()

if(WITH_GLOG)
Expand All @@ -51,16 +54,16 @@ index 9edc0a68..af786821 100644
if((NOT GLOG_INCLUDE_PATH) OR (NOT GLOG_LIB))
message(FATAL_ERROR "Fail to find glog")
endif()
@@ -182,7 +187,7 @@ if(WITH_MESALINK)
include_directories(${MESALINK_INCLUDE_PATH})
@@ -197,7 +199,7 @@ if(WITH_RDMA)
endif()
endif()

-find_library(PROTOC_LIB NAMES protoc)
+set(PROTOC_LIB "protobuf::libprotoc")
if(NOT PROTOC_LIB)
message(FATAL_ERROR "Fail to find protoc lib")
endif()
@@ -193,7 +198,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
@@ -208,7 +210,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
)
endif()

Expand All @@ -69,7 +72,7 @@ index 9edc0a68..af786821 100644

include_directories(
${GFLAGS_INCLUDE_PATH}
@@ -208,9 +213,9 @@ set(DYNAMIC_LIB
@@ -223,9 +225,9 @@ set(DYNAMIC_LIB
${LEVELDB_LIB}
${PROTOC_LIB}
${CMAKE_THREAD_LIBS_INIT}
Expand Down Expand Up @@ -97,7 +100,7 @@ index dfad5fd8..8423d55a 100644
set(GFLAGS_FOUND TRUE)
endif(GFLAGS_INCLUDE_PATH AND GFLAGS_LIBRARY)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index fbcc7cc5..1c61c4ce 100644
index fbcc7cc5..c2d0d7bb 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -31,16 +31,24 @@ add_dependencies(SOURCES_LIB PROTO_LIB)
Expand Down Expand Up @@ -126,7 +129,7 @@ index fbcc7cc5..1c61c4ce 100644
# for protoc-gen-mcpack
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/output/bin)

@@ -49,35 +57,58 @@ set(protoc_gen_mcpack_SOURCES
@@ -49,35 +57,57 @@ set(protoc_gen_mcpack_SOURCES
)

add_executable(protoc-gen-mcpack ${protoc_gen_mcpack_SOURCES})
Expand All @@ -136,7 +139,7 @@ index fbcc7cc5..1c61c4ce 100644
add_library(brpc-shared SHARED $<TARGET_OBJECTS:BUTIL_LIB>
$<TARGET_OBJECTS:SOURCES_LIB>
$<TARGET_OBJECTS:PROTO_LIB>)
target_link_libraries(brpc-shared ${DYNAMIC_LIB})
- target_link_libraries(brpc-shared ${DYNAMIC_LIB})
+ target_include_directories(brpc-shared PUBLIC $<INSTALL_INTERFACE:include>)
if(BRPC_WITH_GLOG)
target_link_libraries(brpc-shared ${GLOG_LIB})
Expand Down
2 changes: 1 addition & 1 deletion ports/brpc/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO apache/incubator-brpc
REF "${VERSION}"
SHA512 c9779e2bf4a69228ba37960101844f2d33c1a442204d5630e7e191d11b496831a61f1d5da37813b135f24c491bd7d23eb18fa0de9423ac7e13bbf84d8fc48fb8
SHA512 7e75a4f03eddbd6ce841566bad415e34706a6d5db1abaffec3b512461a45ddbaee2b365589f505b64a11f9466e2a38e9eb83570fe1532caeae20dc1d059d29be
HEAD_REF master
PATCHES
fix-build.patch
Expand Down
2 changes: 1 addition & 1 deletion ports/brpc/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "brpc",
"version": "1.3.0",
"version": "1.4.0",
"description": "Industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances and thousands kinds of services, called \"baidu-rpc\" inside Baidu.",
"homepage": "https://github.com/apache/incubator-brpc",
"license": "Apache-2.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/b-/brpc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "a75ac2b64eae33d6ba6fc7494f6ea02d7156a23c",
"version": "1.4.0",
"port-version": 0
},
{
"git-tree": "14c66f674d539da678233b47be27be7e7f419901",
"version": "1.3.0",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@
"port-version": 5
},
"brpc": {
"baseline": "1.3.0",
"baseline": "1.4.0",
"port-version": 0
},
"brunocodutra-metal": {
Expand Down