diff --git a/ports/brpc/fix-protobuf-deprecated.patch b/ports/brpc/fix-protobuf-deprecated.patch deleted file mode 100644 index 564724c63b..0000000000 --- a/ports/brpc/fix-protobuf-deprecated.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/brpc/protocol.cpp b/src/brpc/protocol.cpp -index 11297ea..c998edb 100644 ---- a/src/brpc/protocol.cpp -+++ b/src/brpc/protocol.cpp -@@ -203,7 +203,7 @@ BUTIL_FORCE_INLINE bool ParsePbFromZeroCopyStreamInlined( - // According to source code of pb, SetTotalBytesLimit is not a simple set, - // avoid calling the function when the limit is definitely unreached. - if (PB_TOTAL_BYETS_LIMITS < FLAGS_max_body_size) { -- decoder.SetTotalBytesLimit(INT_MAX, -1); -+ decoder.SetTotalBytesLimit(INT_MAX); - } - return msg->ParseFromCodedStream(&decoder) && decoder.ConsumedEntireMessage(); - } diff --git a/ports/brpc/portfile.cmake b/ports/brpc/portfile.cmake index 16b6846e44..ed0ff3acfa 100644 --- a/ports/brpc/portfile.cmake +++ b/ports/brpc/portfile.cmake @@ -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 @@ -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() diff --git a/ports/brpc/vcpkg.json b/ports/brpc/vcpkg.json index ed959a6221..3f3f5df3b1 100644 --- a/ports/brpc/vcpkg.json +++ b/ports/brpc/vcpkg.json @@ -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", @@ -16,6 +17,10 @@ "zlib" ] }, - "thrift" + "thrift", + { + "name": "vcpkg-cmake", + "host": true + } ] } diff --git a/versions/b-/brpc.json b/versions/b-/brpc.json index 3de2f2b202..4ac0070b7a 100644 --- a/versions/b-/brpc.json +++ b/versions/b-/brpc.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "eb37098c32016db48b15a29bd31b08087c7b5d0e", + "version-string": "0.9.7", + "port-version": 5 + }, { "git-tree": "7c6f7c8a882730bd20874fb5832081105a169c7a", "version-string": "0.9.7", diff --git a/versions/baseline.json b/versions/baseline.json index d81f16a078..e4bb31ddb1 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1146,7 +1146,7 @@ }, "brpc": { "baseline": "0.9.7", - "port-version": 4 + "port-version": 5 }, "brunocodutra-metal": { "baseline": "2.1.3",