mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[boringssl] Add new port (#8455)
* [boringssl] Add new port * removed usage of deprecated vcpkg functions * let the ci treat boringssl like libressl * applied requested changes * [boringssl] Update to commit 590265773@2020-04-07 (#8455) * [boringssl] Restore scripts/ci.baseline.txt
This commit is contained in:
parent
941d546454
commit
1e19af09e5
32
ports/boringssl/0001-vcpkg.patch
Normal file
32
ports/boringssl/0001-vcpkg.patch
Normal file
@ -0,0 +1,32 @@
|
||||
diff --git i/CMakeLists.txt w/CMakeLists.txt
|
||||
index 75bf9981b..15589a760 100644
|
||||
--- i/CMakeLists.txt
|
||||
+++ w/CMakeLists.txt
|
||||
@@ -564,7 +564,7 @@ endif()
|
||||
|
||||
# Add minimal googletest targets. The provided one has many side-effects, and
|
||||
# googletest has a very straightforward build.
|
||||
-add_library(boringssl_gtest third_party/googletest/src/gtest-all.cc)
|
||||
+add_library(boringssl_gtest STATIC third_party/googletest/src/gtest-all.cc)
|
||||
target_include_directories(boringssl_gtest PRIVATE third_party/googletest)
|
||||
|
||||
include_directories(third_party/googletest/include)
|
||||
@@ -621,3 +621,18 @@ add_custom_target(
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
DEPENDS all_tests bssl_shim handshaker
|
||||
${MAYBE_USES_TERMINAL})
|
||||
+
|
||||
+install(TARGETS crypto ssl
|
||||
+ RUNTIME DESTINATION bin
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION lib)
|
||||
+
|
||||
+option(INSTALL_HEADERS "Install headers" ON)
|
||||
+if(INSTALL_HEADERS)
|
||||
+ install(DIRECTORY include/ DESTINATION include)
|
||||
+endif()
|
||||
+
|
||||
+option(INSTALL_TOOLS "Install bssl executable" OFF)
|
||||
+if(INSTALL_TOOLS)
|
||||
+ install(TARGETS bssl DESTINATION tools/boringssl)
|
||||
+endif()
|
8
ports/boringssl/CONTROL
Normal file
8
ports/boringssl/CONTROL
Normal file
@ -0,0 +1,8 @@
|
||||
Source: boringssl
|
||||
Version: 2020-04-07
|
||||
Homepage: https://boringssl.googlesource.com/boringssl
|
||||
Description: BoringSSl is a fork of OpenSSL developed by Google
|
||||
Supports: !uwp
|
||||
|
||||
Feature: tools
|
||||
Description: Build bssl executable
|
51
ports/boringssl/portfile.cmake
Normal file
51
ports/boringssl/portfile.cmake
Normal file
@ -0,0 +1,51 @@
|
||||
vcpkg_fail_port_install(ON_TARGET "UWP")
|
||||
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h")
|
||||
message(WARNING "Can't build BoringSSL if OpenSSL is installed. Please remove OpenSSL, and try to install BoringSSL again if you need it. Build will continue since BoringSSL is a drop-in replacement for OpenSSL")
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
return()
|
||||
endif()
|
||||
|
||||
vcpkg_find_acquire_program(PERL)
|
||||
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
|
||||
vcpkg_add_to_path(${PERL_EXE_PATH})
|
||||
|
||||
vcpkg_find_acquire_program(NASM)
|
||||
get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
|
||||
vcpkg_add_to_path(${NASM_EXE_PATH})
|
||||
|
||||
vcpkg_find_acquire_program(GO)
|
||||
get_filename_component(GO_EXE_PATH ${GO} DIRECTORY)
|
||||
vcpkg_add_to_path(${GO_EXE_PATH})
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
tools INSTALL_TOOLS
|
||||
)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO google/boringssl
|
||||
REF 5902657734e2a796a514731e0fd0e80081ae43dc
|
||||
SHA512 89458748ccf7e00e2e12a1026e7c41099298dfb6d0daaf885f52b98c84e833a4407e997dd3a5b92d56ede495ef431325a4b228c2d81598bde082141339b16684
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0001-vcpkg.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
OPTIONS_DEBUG
|
||||
-DINSTALL_HEADERS=OFF
|
||||
-DINSTALL_TOOLS=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
if(IS_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boringssl)
|
||||
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/boringssl")
|
||||
endif()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
@ -883,6 +883,14 @@ librdkafka:arm-uwp=fail
|
||||
librdkafka:x64-uwp=fail
|
||||
|
||||
# Conflicts with openssl
|
||||
boringssl:arm64-windows = skip
|
||||
boringssl:arm-uwp = skip
|
||||
boringssl:x64-linux = skip
|
||||
boringssl:x64-osx = skip
|
||||
boringssl:x64-uwp = skip
|
||||
boringssl:x64-windows = skip
|
||||
boringssl:x64-windows-static = skip
|
||||
boringssl:x86-windows = skip
|
||||
libressl:arm64-windows = skip
|
||||
libressl:arm-uwp = skip
|
||||
libressl:x64-linux = skip
|
||||
|
Loading…
x
Reference in New Issue
Block a user