[grpc][openssl][upb] Fix install on uwp

This commit is contained in:
Robert Schumacher 2020-03-09 16:37:52 -07:00
parent d0b1f2a9e8
commit 670a2656df
6 changed files with 34 additions and 4 deletions

View File

@ -15,6 +15,7 @@ vcpkg_from_github(
00004-link-gdi32-on-windows.patch
00005-fix-uwp-error.patch
00009-use-system-upb.patch
snprintf.patch
)
if(VCPKG_TARGET_IS_UWP OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")

12
ports/grpc/snprintf.patch Normal file
View File

@ -0,0 +1,12 @@
diff --git a/src/core/tsi/alts/crypt/aes_gcm.cc b/src/core/tsi/alts/crypt/aes_gcm.cc
index c638ce7..3dc3b2e 100644
--- a/src/core/tsi/alts/crypt/aes_gcm.cc
+++ b/src/core/tsi/alts/crypt/aes_gcm.cc
@@ -28,6 +28,7 @@
#include <openssl/evp.h>
#include <openssl/hmac.h>
#include <string.h>
+#include <cstdio>
#include <grpc/support/alloc.h>

View File

@ -2,4 +2,4 @@ Source: openssl
Version: 1.1.1d
Homepage: https://www.openssl.org
Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.
Build-Depends: openssl-windows (windows), openssl-uwp (uwp), openssl-unix (!uwp&!windows)
Build-Depends: openssl-windows (!uwp&windows), openssl-uwp (uwp), openssl-unix (!uwp&!windows)

View File

@ -1,4 +1,4 @@
Source: upb
Version: 2019-10-21-1
Version: 2019-10-21-2
Homepage: https://github.com/protocolbuffers/upb/
Description: μpb (often written 'upb') is a small protobuf implementation written in C.

15
ports/upb/fix-uwp.patch Normal file
View File

@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6eb8bb5..1506a64 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,10 @@ cmake_policy(SET CMP0048 NEW)
project(upb)
+add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+if(MSVC)
+ add_compile_options(/wd4146)
+endif()
# Prevent CMake from setting -rdynamic on Linux (!!).
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")

View File

@ -3,10 +3,12 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO protocolbuffers/upb
REF 9effcbcb27f0a665f9f345030188c0b291e32482
REF 9effcbcb27f0a665f9f345030188c0b291e32482
SHA512 416ff26ec21181d53be23e94203205072152ab3a8e4b3b28d16263a601995fd2d2f8afe5d8cfbecdac8543249482287b9fe6129314f7c9a7880660f5508bb85e
HEAD_REF master
PATCHES add-cmake-install.patch
PATCHES
add-cmake-install.patch
fix-uwp.patch
)
vcpkg_configure_cmake(