Skip to content
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
32 changes: 16 additions & 16 deletions ports/grpc/00009-use-system-upb.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec1714687e..e15d25097f 100644
index c848b50605..7822c4f713 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -84,6 +84,9 @@ set_property(CACHE gRPC_SSL_PROVIDER PROPERTY STRINGS "module" "package")
Expand All @@ -12,87 +12,87 @@ index ec1714687e..e15d25097f 100644
set(gRPC_PROTOBUF_PACKAGE_TYPE "" CACHE STRING "Algorithm for searching protobuf package")
set_property(CACHE gRPC_PROTOBUF_PACKAGE_TYPE PROPERTY STRINGS "CONFIG" "MODULE")

@@ -1911,7 +1914,6 @@ target_link_libraries(grpc
@@ -2037,7 +2040,6 @@ target_link_libraries(grpc
${_gRPC_ALLTARGETS_LIBRARIES}
gpr
address_sorting
- upb
absl::optional
absl::strings
absl::status
@@ -1993,7 +1995,6 @@ target_link_libraries(grpc_csharp_ext
absl::statusor
@@ -2122,7 +2124,6 @@ target_link_libraries(grpc_csharp_ext
grpc
gpr
address_sorting
- upb
)


@@ -2463,7 +2464,6 @@ target_link_libraries(grpc_unsecure
@@ -2590,7 +2591,6 @@ target_link_libraries(grpc_unsecure
${_gRPC_ALLTARGETS_LIBRARIES}
gpr
address_sorting
- upb
absl::optional
absl::strings
absl::status
@@ -2661,7 +2661,6 @@ target_link_libraries(grpc++
absl::statusor
@@ -2792,7 +2792,6 @@ target_link_libraries(grpc++
grpc
gpr
address_sorting
- upb
)

foreach(_hdr
@@ -2907,7 +2906,6 @@ target_link_libraries(grpc++_alts
@@ -3040,7 +3039,6 @@ target_link_libraries(grpc++_alts
grpc
gpr
address_sorting
- upb
)

foreach(_hdr
@@ -2976,7 +2974,6 @@ target_link_libraries(grpc++_error_details
@@ -3104,7 +3102,6 @@ target_link_libraries(grpc++_error_details
grpc
gpr
address_sorting
- upb
)

foreach(_hdr
@@ -3049,7 +3046,6 @@ target_link_libraries(grpc++_reflection
@@ -3174,7 +3171,6 @@ target_link_libraries(grpc++_reflection
grpc
gpr
address_sorting
- upb
)

foreach(_hdr
@@ -3330,7 +3326,6 @@ target_link_libraries(grpc++_unsecure
@@ -3454,7 +3450,6 @@ target_link_libraries(grpc++_unsecure
grpc_unsecure
gpr
address_sorting
- upb
)

foreach(_hdr
@@ -3648,7 +3643,6 @@ target_link_libraries(grpcpp_channelz
@@ -3773,7 +3768,6 @@ target_link_libraries(grpcpp_channelz
grpc
gpr
address_sorting
- upb
)

foreach(_hdr
@@ -3675,6 +3669,7 @@ endif()
@@ -3799,6 +3793,7 @@ endif()

endif()

+if (gRPC_UPB_PROVIDER STREQUAL "module")
add_library(upb
third_party/upb/upb/decode_fast.c
third_party/upb/upb/decode.c
third_party/upb/upb/encode.c
@@ -3726,7 +3721,7 @@ if(gRPC_INSTALL)
@@ -3857,7 +3852,7 @@ if(gRPC_INSTALL)
)
endif()

Expand Down Expand Up @@ -121,7 +121,7 @@ index f2a0e508c3..ecce7ba300 100644
# See the License for the specific language governing permissions and
# limitations under the License.

+set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated")
+set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-generated")
+if (gRPC_UPB_PROVIDER STREQUAL "module")
+
set(UPB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/upb)
Expand Down
14 changes: 7 additions & 7 deletions ports/grpc/00010-add-feature-absl-sync.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e15d25097f..ae77375eae 100644
index 7822c4f713..4cb75e6eea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1919,6 +1919,8 @@ target_link_libraries(grpc
absl::status
@@ -2047,6 +2047,8 @@ target_link_libraries(grpc
absl::bind_front
absl::inlined_vector
absl::flat_hash_set
+ absl::time
+ absl::synchronization
absl::flat_hash_map
)
if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC)
target_link_libraries(grpc "-framework CoreFoundation")
@@ -2468,6 +2470,8 @@ target_link_libraries(grpc_unsecure
absl::strings
@@ -2596,6 +2598,8 @@ target_link_libraries(grpc_unsecure
absl::statusor
absl::status
absl::inlined_vector
+ absl::time
+ absl::synchronization
absl::flat_hash_map
)
if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC)
target_link_libraries(grpc_unsecure "-framework CoreFoundation")
diff --git a/cmake/abseil-cpp.cmake b/cmake/abseil-cpp.cmake
index 078d495417..b6f50bd14c 100644
--- a/cmake/abseil-cpp.cmake
Expand Down
28 changes: 28 additions & 0 deletions ports/grpc/00013-build-upbdefs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/cmake/upb.cmake b/cmake/upb.cmake
index 59d6813..1ce8bce 100644
--- a/cmake/upb.cmake
+++ b/cmake/upb.cmake
@@ -24,8 +24,21 @@ set(_gRPC_UPB_LIBRARIES upb)

elseif(gRPC_UPB_PROVIDER STREQUAL "package")
find_package(upb CONFIG REQUIRED)
- set(_gRPC_UPB_LIBRARIES upb::upb)
+ set(_gRPC_UPB_LIBRARIES upb)
set(_gRPC_UPB_INCLUDE_DIR)
- set(upb ${_gRPC_UPB_LIBRARIES})
+ add_library(upb STATIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c
+ )
+ set_target_properties(upb PROPERTIES OUTPUT_NAME grpc_upbdefs)
+ target_include_directories(upb PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-generated")
+ target_link_libraries(upb PUBLIC upb::all_libs)
+ if(gRPC_INSTALL)
+ install(TARGETS upb EXPORT gRPCTargets
+ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
+ )
+ endif()
set(_gRPC_FIND_UPB "if(NOT upb_FOUND)\n find_package(upb CONFIG REQUIRED)\nendif()")
endif()
11 changes: 7 additions & 4 deletions ports/grpc/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO grpc/grpc
REF 054ff69350dfea1876f388e7cf05f19d5d76bc12 # v1.33.1
SHA512 d81c26e996f8a4386a432fc98ba0982c9a15e8cb470eb544f82dc81df5a8f79401343d209f3aa75598fbb8b99cc05dcd2a0e616967d5e0464bed4a4464d7fdc1
REF 3e53dbe8213137d2c731ecd4d88ebd2948941d75 # v1.36.4
SHA512 c207720a66dae97727e94f2587d6be8e4cb479997cc0815a15f5465ff94f6d0b410523e3fed2dd31385cc9d50ab52dfe39b6095257d6ce9a71184ada6ef0ff7e
HEAD_REF master
PATCHES
00001-fix-uwp.patch
Expand All @@ -19,6 +19,7 @@ vcpkg_from_github(
00011-fix-csharp_plugin.patch
snprintf.patch
00012-fix-use-cxx17.patch
00013-build-upbdefs.patch
)

if(TARGET_TRIPLET STREQUAL HOST_TRIPLET)
Expand All @@ -37,8 +38,10 @@ else()
set(cares_CARES_PROVIDER "package")
endif()

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
absl-sync gRPC_ABSL_SYNC_ENABLE
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
absl-sync gRPC_ABSL_SYNC_ENABLE
)

vcpkg_configure_cmake(
Expand Down
3 changes: 1 addition & 2 deletions ports/grpc/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "grpc",
"version-string": "1.33.1",
"port-version": 3,
"version-semver": "1.36.4",
"description": "An RPC library and framework",
"homepage": "https://github.com/grpc/grpc",
"dependencies": [
Expand Down
4 changes: 0 additions & 4 deletions ports/upb/CONTROL

This file was deleted.

52 changes: 52 additions & 0 deletions ports/upb/add-all-libs-target.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 0155a7b..7850b2d 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -66,7 +66,7 @@ endif()
enable_testing()

add_library(port INTERFACE)
-add_library(descriptor_upbproto INTERFACE)
+add_library(descriptor_upb_proto INTERFACE)
add_library(upb
../upb/decode.c
../upb/decode.int.h
@@ -167,6 +167,25 @@ target_link_libraries(upb_json
upb_pb)
add_library(wyhash INTERFACE)

+add_library(all_libs INTERFACE)
+target_link_libraries(all_libs
+ INTERFACE
+ upb
+ fastdecode
+ upb_json
+ upb_pb
+ port
+ table
+ descriptor_upb_proto
+ handlers
+ reflection
+ textformat
+)
+set_target_properties(reflection PROPERTIES OUTPUT_NAME upb_reflection)
+set_target_properties(handlers PROPERTIES OUTPUT_NAME upb_handlers)
+set_target_properties(fastdecode PROPERTIES OUTPUT_NAME upb_fastdecode)
+set_target_properties(textformat PROPERTIES OUTPUT_NAME upb_textformat)
+
install(
DIRECTORY ../upb
DESTINATION include
@@ -184,9 +203,11 @@ install(TARGETS
upb_pb
port
table
- descriptor_upbproto
+ descriptor_upb_proto
handlers
reflection
+ textformat
+ all_libs
EXPORT upb-config
)
install(EXPORT upb-config NAMESPACE upb:: DESTINATION share/upb)
40 changes: 15 additions & 25 deletions ports/upb/add-cmake-install.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4dd6454..eda6a72 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index d4cbcc9..a6b432f 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -8,7 +8,7 @@ else()
cmake_policy(VERSION 3.12)
endif()
Expand All @@ -11,31 +11,20 @@ index 4dd6454..eda6a72 100644
cmake_policy(SET CMP0048 NEW)

project(upb)
@@ -62,6 +62,7 @@ enable_testing()
@@ -62,6 +62,7 @@ endif()
enable_testing()

add_library(port
upb/port.c)
add_library(port INTERFACE)
+add_library(descriptor_upbproto INTERFACE)
add_library(upb
upb/decode.c
upb/encode.c
@@ -154,6 +155,7 @@ target_link_libraries(upb_cc_bindings INTERFACE
handlers
port
upb)
+if(ENABLE_TESTING)
add_library(upb_test
tests/testmain.cc
tests/test_util.h
@@ -162,5 +164,28 @@ target_link_libraries(upb_test
handlers
port
upb)
+endif()
../upb/decode.c
../upb/decode.int.h
@@ -162,4 +163,27 @@ target_link_libraries(upb_json
upb_pb)
add_library(wyhash INTERFACE)

-
+install(
+ DIRECTORY upb
+ DIRECTORY ../upb
+ DESTINATION include
+ FILES_MATCHING
+ PATTERN "*.h"
Expand All @@ -46,7 +35,7 @@ index 4dd6454..eda6a72 100644
+target_include_directories(upb PUBLIC $<INSTALL_INTERFACE:include>)
+install(TARGETS
+ upb
+ upb_cc_bindings
+ fastdecode
+ upb_json
+ upb_pb
+ port
Expand All @@ -57,3 +46,4 @@ index 4dd6454..eda6a72 100644
+ EXPORT upb-config
+)
+install(EXPORT upb-config NAMESPACE upb:: DESTINATION share/upb)

16 changes: 8 additions & 8 deletions ports/upb/fix-uwp.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eda6a72..386966f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,6 +58,10 @@ elseif(UNIX)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index a6b432f..003615e 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -59,6 +59,10 @@ elseif(UNIX)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id")
endif()

Expand All @@ -12,12 +12,12 @@ index eda6a72..386966f 100644
+
enable_testing()

add_library(port
add_library(port INTERFACE)
diff --git a/upb/json_decode.c b/upb/json_decode.c
index 953d238..5185ffd 100644
index bb33744..1fadd26 100644
--- a/upb/json_decode.c
+++ b/upb/json_decode.c
@@ -1138,7 +1138,7 @@ static void jsondec_struct(jsondec *d, upb_msg *msg, const upb_msgdef *m) {
@@ -1160,7 +1160,7 @@ static void jsondec_struct(jsondec *d, upb_msg *msg, const upb_msgdef *m) {
static void jsondec_wellknownvalue(jsondec *d, upb_msg *msg,
const upb_msgdef *m) {
upb_msgval val;
Expand Down
13 changes: 13 additions & 0 deletions ports/upb/no-wyhash.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index ed494d9..0155a7b 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -84,7 +84,7 @@ add_library(upb
target_link_libraries(upb
fastdecode
port
- /third_party/wyhash)
+ )
add_library(fastdecode
../upb/decode.int.h
../upb/decode_fast.c
Loading