aboutsummaryrefslogtreecommitdiff
path: root/ports/upb
diff options
context:
space:
mode:
authorPhil Christensen <philc@microsoft.com>2020-02-03 14:22:52 -0800
committerGitHub <noreply@github.com>2020-02-03 14:22:52 -0800
commite62d1361288e83eba786395b60361ab35ba83800 (patch)
treea782ed37dc24eafa81f32082b602922f32d6cfec /ports/upb
parent586bee9bcd30993033a3590f7e84ef1b648cad10 (diff)
downloadvcpkg-e62d1361288e83eba786395b60361ab35ba83800.tar.gz
vcpkg-e62d1361288e83eba786395b60361ab35ba83800.zip
[vcpkg] Add Supports: field. Use contents of triplets instead of names for dependency resolution. (#8601)
* remove unfinished "supports" tag * extract "supports" from control files But do nothing with the value * Start `Supports` documentation * Use Supports in a bunch of control files I only tried matching the already existing logic in the portfile.cmake. * Cmake var provider (#8) * Cmake var provider (#9) * fix windows build (#10) * Add missing files to build * Fix test (#11) * adding hooks for cmake variables in expressions * Adding hooks for 'supports' in CI test * Fix test (#12) * Add overrides to evaluation environment * use "supported" tag in CI testing * cleanup comment * Fix issues with PR * [var_provider] Get library linkage variables from triplet * Fix compilation errors in tests * Add unimplemented functions * Fix unit tests part 1 * Fix issue when buildtrees dir does not exist * Change binary output hash * Fix handling of * feature * Add core feature when using * * Do not add Default-Features when installing 'core' * [vcpkg] WIP. 6 failing tests. * [vcpkg] WIP. 1 failing tests. * [vcpkg] WIP. 0 failing tests. * [vcpkg] Removed 'remove_graph'. 0 failing tests. * [vcpkg] Removed 'install_graph'. 0 failing tests. * [vcpkg] Remove AnyAction; replace with ActionPlan * [vcpkg] Minor cleanup. * [vcpkg][z3][qt5-connectivity][qt5-purchasing] Improve error messages while parsing. Fix a few trivial port issues. * [vcpkg] Work around ICE with MSVC v140 * [vcpkg] Add purge on fail to decompress for CI * [vcpkg] Fix parsing of nested parentheses in qualifiers * [vcpkg] Fix Linux builds (explicit qualification in declaration) * [vcpkg] Fix Build-Depends implying default features. Fix qualified dependencies regression. * [mmx] Add to skip list and full rebuild -- mmx causes problems by installing 'sched.h' * [libpqxx][mqtt-cpp] Prevent installing include/CMakeLists.txt * [cppitertools] Fix installed include namespace (should be include/cppitertools) * [libsoundio] Move headers into soundio/ subdirectory as per original cmake * [ci.baseline] Temporarily skip charls due to conflict with dcmtk * [vcpkg] Add restricted include files post build check -- bump global abi version * [libsoundio] Hotfix stray line in portfile * [vcpkg] Fix regression: CMake information was not being displayed for build-and-install actions * [jsonnet] Fix installation of internal headers; use system nlohmann-json * [grpc][upb] Teach grpc to use packaged upb. Add find_package(upb). Remove inappropriate upb features. * [zfp] Move problematic 'include/bitstream.h' to 'include/zfp/bitstream.h' * [x265] Bump control version to trigger rebuild after zfp conflict * [akali] Disable parallel configure * [dirent][dlfcn-win32][getopt-win32][pthreads] Grandfather into VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS * [ci.baseline] Update baseline for improved upb support * [tgui] Disable parallel configure * [libiconv] Enable VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS * [aws-sdk-cpp] Disable parallel configure * [vcpkg] Implement policy VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS * [aws-sdk-cpp] Fix amount of escaping semicolons -- Note: I do not know the root cause requiring this change * [libodb-sqlite] Fix configuring into source directory * [gettext] Grandfather into VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS * [libodb] DISABLE_PARALLEL_CONFIGURE * [vcpkg] Add 'config.h' and 'local.h' to restricted header list * [mcpp] Remove unused and problematic include 'config.h' from installed files * [teemo] Move installed headers into subdirectory to prevent conflicts with x265 * [ci.baseline] Update current OSX. Skip libmesh on all platforms due to heavy conflicts. * [vcpkg] Add 'slice.h' as a restricted header * [osg] Improve accuracy of dependencies (disable some, add some to Depends) * [vcpkg] Skip invoking a subprocess for 0 specs in load_tag_vars * [ci.baseline] Skip mongo-c-driver on osx due to flakiness * [teemo] Fix incorrect include file read * [osg] Fix dependency typo: glut -> freeglut * [vcpkg] Recover some lost performance with the addition of vcpkg_get_tags. A huge performance cost was loading the triplet files over and over; instead, we splice the sources into a macro and load it once, then just call that macro for each port. Remove use of hashing because we aren't cross-process-safe anyway (global static will do instead). * [vcpkg] Change Supports atom 'windows' to include UWP. Improve Supports field documentation. * [vcpkg] Add docs for VCPKG_ENV_PASSTHROUGH and VCPKG_DEP_INFO_OVERRIDE_VARS * Fix typo Co-authored-by: Curtis J Bezault <curtbezault@gmail.com> Co-authored-by: Victor Romero <romerosanchezv@gmail.com> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Diffstat (limited to 'ports/upb')
-rw-r--r--ports/upb/CONTROL11
-rw-r--r--ports/upb/add-cmake-install.patch60
-rw-r--r--ports/upb/fix-cmakelists.patch184
-rw-r--r--ports/upb/portfile.cmake26
4 files changed, 73 insertions, 208 deletions
diff --git a/ports/upb/CONTROL b/ports/upb/CONTROL
index d42b9e367..cb9b6041d 100644
--- a/ports/upb/CONTROL
+++ b/ports/upb/CONTROL
@@ -1,13 +1,4 @@
Source: upb
-Version: 2019-10-21
+Version: 2019-10-21-1
Homepage: https://github.com/protocolbuffers/upb/
Description: μpb (often written 'upb') is a small protobuf implementation written in C.
-
-Feature: asan
-Description: build with asan support
-
-Feature: ubsan
-Description: build with ubsan support
-
-Feature: tests
-Description: build tests \ No newline at end of file
diff --git a/ports/upb/add-cmake-install.patch b/ports/upb/add-cmake-install.patch
new file mode 100644
index 000000000..ece6b8db4
--- /dev/null
+++ b/ports/upb/add-cmake-install.patch
@@ -0,0 +1,60 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 836c5ff..6eb8bb5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,7 +8,7 @@ else()
+ cmake_policy(VERSION 3.12)
+ endif()
+
+-cmake_minimum_required (VERSION 3.0)
++cmake_minimum_required (VERSION 3.14)
+ cmake_policy(SET CMP0048 NEW)
+
+ project(upb)
+@@ -59,7 +59,7 @@ elseif(UNIX)
+ endif()
+
+ enable_testing()
+-
++add_library(descriptor_upbproto INTERFACE)
+ add_library(upb
+ upb/decode.c
+ upb/encode.c
+@@ -136,12 +136,35 @@ target_link_libraries(upb_cc_bindings INTERFACE
+ descriptor_upbproto
+ handlers
+ upb)
+-add_library(upb_test
++if(ENABLE_TESTING)
++add_executable(upb_test
+ tests/testmain.cc
+ tests/test_util.h
+ tests/upb_test.h)
+ target_link_libraries(upb_test
+ handlers
+ upb)
++endif()
+
+-
++install(
++ DIRECTORY upb
++ DESTINATION include
++ FILES_MATCHING
++ PATTERN "*.h"
++ PATTERN "*.inc"
++ PATTERN "*.int.h" EXCLUDE
++)
++target_include_directories(upb PUBLIC $<INSTALL_INTERFACE:include>)
++install(TARGETS
++ upb
++ upb_cc_bindings
++ upb_json
++ upb_pb
++ table
++ descriptor_upbproto
++ handlers
++ legacy_msg_reflection
++ reflection
++ EXPORT upb-config
++)
++install(EXPORT upb-config NAMESPACE upb:: DESTINATION share/upb)
diff --git a/ports/upb/fix-cmakelists.patch b/ports/upb/fix-cmakelists.patch
deleted file mode 100644
index 4c7ab1413..000000000
--- a/ports/upb/fix-cmakelists.patch
+++ /dev/null
@@ -1,184 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 836c5ff..6ee66a7 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -58,90 +58,148 @@ elseif(UNIX)
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id")
- endif()
-
--enable_testing()
-+if (ENABLE_TEST)
-+ enable_testing()
-+endif()
-
-+set(UPB_HDRS
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/generated_util.h
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/msg.h
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/table.int.h
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/port_def.inc
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/port_undef.inc
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/decode.h
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/encode.h
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/upb.h
-+)
-+
-+set(UBP_PROJECTS upb)
- add_library(upb
- upb/decode.c
- upb/encode.c
-- upb/generated_util.h
- upb/msg.c
-- upb/msg.h
- upb/port.c
-- upb/port_def.inc
-- upb/port_undef.inc
- upb/table.c
-- upb/table.int.h
- upb/upb.c
-- upb/decode.h
-- upb/encode.h
-- upb/upb.h)
-+ upb/upb.h
-+ ${UPB_HDRS})
-+
-+
-+set(UBP_PROJECTS ${UBP_PROJECTS} generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me)
- 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
- upb)
-+
-+set(REFLECTION_HDRS
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/def.h
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/msgfactory.h
-+)
-+
-+set(UBP_PROJECTS ${UBP_PROJECTS} reflection)
- add_library(reflection
- upb/def.c
- upb/msgfactory.c
-- upb/def.h
-- upb/msgfactory.h)
-+ ${REFLECTION_HDRS})
- target_link_libraries(reflection
- descriptor_upbproto
- table
- upb)
-+
-+set(UBP_PROJECTS ${UBP_PROJECTS} table)
- add_library(table INTERFACE)
- target_link_libraries(table INTERFACE
- upb)
-+
-+set(LEGACY_MSG_HDRS ${CMAKE_CURRENT_LIST_DIR}/upb/legacy_msg_reflection.h)
-+
-+set(UBP_PROJECTS ${UBP_PROJECTS} legacy_msg_reflection)
- add_library(legacy_msg_reflection
- upb/legacy_msg_reflection.c
-- upb/legacy_msg_reflection.h)
-+ ${LEGACY_MSG_HDRS})
- target_link_libraries(legacy_msg_reflection
- table
- upb)
-+
-+set(HANDLERS_HDRS
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/handlers-inl.h
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/handlers.h
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/sink.h
-+)
-+
-+set(UBP_PROJECTS ${UBP_PROJECTS} handlers)
- add_library(handlers
- upb/handlers.c
-- upb/handlers-inl.h
- upb/sink.c
-- upb/handlers.h
-- upb/sink.h)
-+ ${HANDLERS_HDRS})
- target_link_libraries(handlers
- reflection
- table
- upb)
-+
-+set(UPB_PB_HDRS
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/pb/decoder.int.h
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/pb/varint.int.h
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/pb/decoder.h
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/pb/encoder.h
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/pb/textprinter.h
-+)
-+
-+set(UBP_PROJECTS ${UBP_PROJECTS} upb_pb)
- add_library(upb_pb
- upb/pb/compile_decoder.c
- upb/pb/decoder.c
-- upb/pb/decoder.int.h
- upb/pb/encoder.c
- upb/pb/textprinter.c
- upb/pb/varint.c
-- upb/pb/varint.int.h
-- upb/pb/decoder.h
-- upb/pb/encoder.h
-- upb/pb/textprinter.h)
-+ ${UPB_PB_HDRS})
- target_link_libraries(upb_pb
- descriptor_upbproto
- handlers
- reflection
- table
- upb)
-+
-+set(UPB_JSON_HDRS
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/json/parser.h
-+ ${CMAKE_CURRENT_LIST_DIR}/upb/json/printer.h
-+)
-+
-+set(UBP_PROJECTS ${UBP_PROJECTS} upb_json)
- add_library(upb_json
- generated_for_cmake/upb/json/parser.c
- upb/json/printer.c
-- upb/json/parser.h
-- upb/json/printer.h)
-+ ${UPB_JSON_HDRS})
- target_link_libraries(upb_json
- upb
- upb_pb)
-+
-+set(UBP_PROJECTS ${UBP_PROJECTS} upb_cc_bindings)
- add_library(upb_cc_bindings INTERFACE)
- target_link_libraries(upb_cc_bindings INTERFACE
- descriptor_upbproto
- handlers
- upb)
--add_library(upb_test
-- tests/testmain.cc
-- tests/test_util.h
-- tests/upb_test.h)
--target_link_libraries(upb_test
-- handlers
-- upb)
--
-
-+if (ENABLE_TEST)
-+ set(UBP_PROJECTS ${UBP_PROJECTS} upb_test)
-+ add_library(upb_test
-+ tests/testmain.cc
-+ tests/test_util.h
-+ tests/upb_test.h)
-+ target_link_libraries(upb_test
-+ handlers
-+ upb)
-+endif()
-+
-+install(FILES ${UPB_HDRS} ${REFLECTION_HDRS} ${LEGACY_MSG_HDRS} ${HANDLERS_HDRS} DESTINATION include/upb)
-+install(FILES ${UPB_PB_HDRS} DESTINATION include/upb/pb)
-+install(FILES ${UPB_JSON_HDRS} DESTINATION include/upb/json)
-+
-+foreach(PROJ ${UBP_PROJECTS})
-+ install(
-+ TARGETS ${PROJ}
-+ RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION lib
-+ ARCHIVE DESTINATION lib
-+ )
-+endforeach()
-\ No newline at end of file
diff --git a/ports/upb/portfile.cmake b/ports/upb/portfile.cmake
index 303587cea..b5a46253c 100644
--- a/ports/upb/portfile.cmake
+++ b/ports/upb/portfile.cmake
@@ -1,29 +1,27 @@
-vcpkg_fail_port_install(ON_TARGET "Windows")
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
- OUT_SOURCE_PATH SOURCE_PATH
- REPO protocolbuffers/upb
- REF 9effcbcb27f0a665f9f345030188c0b291e32482
- SHA512 416ff26ec21181d53be23e94203205072152ab3a8e4b3b28d16263a601995fd2d2f8afe5d8cfbecdac8543249482287b9fe6129314f7c9a7880660f5508bb85e
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO protocolbuffers/upb
+ REF 9effcbcb27f0a665f9f345030188c0b291e32482
+ SHA512 416ff26ec21181d53be23e94203205072152ab3a8e4b3b28d16263a601995fd2d2f8afe5d8cfbecdac8543249482287b9fe6129314f7c9a7880660f5508bb85e
HEAD_REF master
- PATCHES fix-cmakelists.patch
-)
-
-vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
- asan UPB_ENABLE_ASAN
- ubsan UPB_ENABLE_UBSAN
- tests ENABLE_TEST
+ PATCHES add-cmake-install.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
- OPTIONS ${FEATURE_OPTIONS}
)
vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets()
vcpkg_copy_pdbs()
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/debug/include
+ # empty folder
+ ${CURRENT_PACKAGES_DIR}/include/upb/bindings/lua/upb
+)
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)