diff options
| author | ras0219 <533828+ras0219@users.noreply.github.com> | 2021-04-23 10:40:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-23 10:40:07 -0700 |
| commit | e4096d6c17799638de97ceca4583d9adfc54b87b (patch) | |
| tree | 9b9994234552e28c96934dd7ab489554b34109e2 /ports/upb | |
| parent | 46de713371cc0161276a2668547901f684aef014 (diff) | |
| download | vcpkg-e4096d6c17799638de97ceca4583d9adfc54b87b.tar.gz vcpkg-e4096d6c17799638de97ceca4583d9adfc54b87b.zip | |
[grpc][upb] Update to newer versions (#17422)
* [gRPC] 1.36.4
* [upb] update to 2020-12-19
* update version
* [upb] Fix config.cmake file
* [grpc] Restore using system upb
* [grpc][upb] Version db changes
* [grpc][upb] Fix building upbdefs in grpc
Co-authored-by: Jeong YunWon <jeong@youknowone.org>
Co-authored-by: Jonliu1993 <13720414433@163.com>
Diffstat (limited to 'ports/upb')
| -rw-r--r-- | ports/upb/CONTROL | 4 | ||||
| -rw-r--r-- | ports/upb/add-all-libs-target.patch | 52 | ||||
| -rw-r--r-- | ports/upb/add-cmake-install.patch | 40 | ||||
| -rw-r--r-- | ports/upb/fix-uwp.patch | 16 | ||||
| -rw-r--r-- | ports/upb/no-wyhash.patch | 13 | ||||
| -rw-r--r-- | ports/upb/portfile.cmake | 14 | ||||
| -rw-r--r-- | ports/upb/vcpkg.json | 6 |
7 files changed, 100 insertions, 45 deletions
diff --git a/ports/upb/CONTROL b/ports/upb/CONTROL deleted file mode 100644 index a24ac31ab..000000000 --- a/ports/upb/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: upb -Version: 2020-08-19 -Homepage: https://github.com/protocolbuffers/upb/ -Description: μpb (often written 'upb') is a small protobuf implementation written in C. diff --git a/ports/upb/add-all-libs-target.patch b/ports/upb/add-all-libs-target.patch new file mode 100644 index 000000000..701004b17 --- /dev/null +++ b/ports/upb/add-all-libs-target.patch @@ -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) diff --git a/ports/upb/add-cmake-install.patch b/ports/upb/add-cmake-install.patch index cdda03407..0cc9aba3e 100644 --- a/ports/upb/add-cmake-install.patch +++ b/ports/upb/add-cmake-install.patch @@ -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()
@@ -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"
@@ -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
@@ -57,3 +46,4 @@ index 4dd6454..eda6a72 100644 + EXPORT upb-config
+)
+install(EXPORT upb-config NAMESPACE upb:: DESTINATION share/upb)
+
diff --git a/ports/upb/fix-uwp.patch b/ports/upb/fix-uwp.patch index bbc8e257a..cbd62f602 100644 --- a/ports/upb/fix-uwp.patch +++ b/ports/upb/fix-uwp.patch @@ -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() @@ -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; diff --git a/ports/upb/no-wyhash.patch b/ports/upb/no-wyhash.patch new file mode 100644 index 000000000..e9754eedb --- /dev/null +++ b/ports/upb/no-wyhash.patch @@ -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 diff --git a/ports/upb/portfile.cmake b/ports/upb/portfile.cmake index fdb59441f..13fdc7290 100644 --- a/ports/upb/portfile.cmake +++ b/ports/upb/portfile.cmake @@ -3,16 +3,18 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO protocolbuffers/upb - REF 7338facddb8ce405fe7a0a52a6061a1e7c823279 - SHA512 a2ece65612ca7c3cdc7b79994aa488623e5ce4227988611ab60724fae5dc7ba9311363bf5c73f6c74910a6b91392e0a231c28f0b2f4c8cc2c4d4328ed33bc265 + REF 60607da72e89ba0c84c84054d2e562d8b6b61177 # 2020-12-19 + SHA512 d7de03f4a4024136ecccbcd3381058f26ace480f1817cbc1874a8ed4abbbad58dcf61cc77220400004927ab8e8c95ab5a2e1f27172ee3ed3bbd3f1dda2dda07c HEAD_REF master PATCHES add-cmake-install.patch fix-uwp.patch + no-wyhash.patch + add-all-libs-target.patch ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH ${SOURCE_PATH}/cmake PREFER_NINJA ) @@ -20,10 +22,6 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets() vcpkg_copy_pdbs() -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include - # empty folder - ${CURRENT_PACKAGES_DIR}/include/upb/bindings/lua/upb -) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/upb/vcpkg.json b/ports/upb/vcpkg.json new file mode 100644 index 000000000..3213d796f --- /dev/null +++ b/ports/upb/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "upb", + "version-date": "2020-12-19", + "description": "μpb (often written 'upb') is a small protobuf implementation written in C.", + "homepage": "https://github.com/protocolbuffers/upb/" +} |
