diff options
| -rw-r--r-- | ports/boringssl/0001-vcpkg.patch | 32 | ||||
| -rw-r--r-- | ports/boringssl/CONTROL | 8 | ||||
| -rw-r--r-- | ports/boringssl/portfile.cmake | 51 | ||||
| -rw-r--r-- | scripts/ci.baseline.txt | 8 |
4 files changed, 99 insertions, 0 deletions
diff --git a/ports/boringssl/0001-vcpkg.patch b/ports/boringssl/0001-vcpkg.patch new file mode 100644 index 000000000..88547d8c3 --- /dev/null +++ b/ports/boringssl/0001-vcpkg.patch @@ -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() diff --git a/ports/boringssl/CONTROL b/ports/boringssl/CONTROL new file mode 100644 index 000000000..fb8d41ce7 --- /dev/null +++ b/ports/boringssl/CONTROL @@ -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 diff --git a/ports/boringssl/portfile.cmake b/ports/boringssl/portfile.cmake new file mode 100644 index 000000000..a4b5acbc4 --- /dev/null +++ b/ports/boringssl/portfile.cmake @@ -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) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index c81014f9c..44a951e9f 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -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
|
