Skip to content
Closed
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
2 changes: 1 addition & 1 deletion ports/upb/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: upb
Version: 2020-08-19
Version: 2020-12-19
Homepage: https://github.com/protocolbuffers/upb/
Description: μpb (often written 'upb') is a small protobuf implementation written in C.
36 changes: 13 additions & 23 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,29 +11,18 @@ 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
+ DESTINATION include
Expand All @@ -57,3 +46,4 @@ index 4dd6454..eda6a72 100644
+ EXPORT upb-config
+)
+install(EXPORT upb-config NAMESPACE upb:: DESTINATION share/upb)

38 changes: 38 additions & 0 deletions ports/upb/fix-install-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 003615e..182bb85 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -94,6 +94,9 @@ add_library(fastdecode
target_link_libraries(fastdecode
port
table)
+install(TARGETS fastdecode EXPORT fastdecode)
+install(EXPORT fastdecode NAMESPACE upb:: DESTINATION share/upb)
+
add_library(generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE)
target_link_libraries(generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE
table
@@ -168,7 +171,7 @@ target_link_libraries(upb_json
add_library(wyhash INTERFACE)

install(
- DIRECTORY upb
+ DIRECTORY ../upb
DESTINATION include
FILES_MATCHING
PATTERN "*.h"
@@ -179,7 +182,6 @@ install(
target_include_directories(upb PUBLIC $<INSTALL_INTERFACE:include>)
install(TARGETS
upb
- upb_cc_bindings
upb_json
upb_pb
port
@@ -189,5 +191,6 @@ install(TARGETS
reflection
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
8 changes: 5 additions & 3 deletions ports/upb/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@ 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
fix-install-path.patch
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
SOURCE_PATH ${SOURCE_PATH}/cmake
PREFER_NINJA
)

vcpkg_install_cmake()
vcpkg_fixup_cmake_targets()
vcpkg_copy_pdbs()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/include
# empty folder
Expand Down
10 changes: 5 additions & 5 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,14 +332,14 @@
"baseline": "4.8.30",
"port-version": 5
},
"bext-ut": {
"baseline": "1.1.8",
"port-version": 0
},
"bext-di": {
"baseline": "1.2.0",
"port-version": 0
},
"bext-ut": {
"baseline": "1.1.8",
"port-version": 0
},
"bfgroup-lyra": {
"baseline": "1.5",
"port-version": 1
Expand Down Expand Up @@ -6173,7 +6173,7 @@
"port-version": 0
},
"upb": {
"baseline": "2020-08-19",
"baseline": "2020-12-19",
"port-version": 0
},
"urdfdom": {
Expand Down
5 changes: 5 additions & 0 deletions versions/u-/upb.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "39e807b2ce3d1c8113e63ef071f034453aca1898",
"version-string": "2020-12-19",
"port-version": 0
},
{
"git-tree": "f62deabc33313987277b9c9b6fec1498d87f9164",
"version-string": "2020-08-19",
Expand Down