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] Fix build failed when protobuf update to 3.19.3 #22685

Merged
merged 12 commits into from
Jan 27, 2022
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
13 changes: 0 additions & 13 deletions ports/brpc/fix-protobuf-deprecated.patch

This file was deleted.

21 changes: 13 additions & 8 deletions ports/brpc/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
vcpkg_download_distfile(patch1679
URLS "https://patch-diff.githubusercontent.com/raw/apache/incubator-brpc/pull/1679.diff"
FILENAME "apache-incubator-brpc-1679.diff"
SHA512 4b1e5717b44aa6a741ddd49b1408e3e556f6d845d5e8a5cfccf2f2d7ebe39aed19c3dad703db7a9ebd0446ac1f225e7dbdd2ff1f23f34fd60c3ef59aaa07b789
)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO apache/incubator-brpc
Expand All @@ -7,26 +13,25 @@ vcpkg_from_github(
PATCHES
fix_boost_ptr.patch
fix_thrift.patch
fix-protobuf-deprecated.patch
${patch1679}
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DWITH_THRIFT=ON
-DWITH_MESALINK=OFF
-DWITH_GLOG=ON
)

vcpkg_install_cmake()
vcpkg_cmake_install()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/butil/third_party/superfasthash")

vcpkg_copy_pdbs()

file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

vcpkg_fixup_pkgconfig()
9 changes: 7 additions & 2 deletions ports/brpc/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "brpc",
"version-string": "0.9.7",
"port-version": 4,
"port-version": 5,
"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",
"supports": "!windows",
"dependencies": [
"gflags",
Expand All @@ -16,6 +17,10 @@
"zlib"
]
},
"thrift"
"thrift",
{
"name": "vcpkg-cmake",
"host": true
}
]
}
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": "eb37098c32016db48b15a29bd31b08087c7b5d0e",
"version-string": "0.9.7",
"port-version": 5
},
{
"git-tree": "7c6f7c8a882730bd20874fb5832081105a169c7a",
"version-string": "0.9.7",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@
},
"brpc": {
"baseline": "0.9.7",
"port-version": 4
"port-version": 5
},
"brunocodutra-metal": {
"baseline": "2.1.3",
Expand Down