[boringssl] Add pkg-config file so it still works with gRPC (#27082)

* [boringssl] Add pkg-config file so it still works with gRPC

* Update baseline
This commit is contained in:
Ryan A. Pavlik 2022-10-09 15:57:27 -05:00 committed by GitHub
parent ef91cf7b8d
commit 125df1bb8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 55 additions and 3 deletions

View File

@ -0,0 +1,39 @@
function(install_pc_file name pc_data)
# fix platform-specific details
if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW)
string(REPLACE "-llibssl" "-lssl" pc_data "${pc_data}")
string(REPLACE "-llibcrypt" "-lcrypto" pc_data "${pc_data}")
string(REPLACE "-lcrypt32" "" pc_data "${pc_data}")
string(REPLACE "-lws2_32" "" pc_data "${pc_data}")
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
configure_file("${CMAKE_CURRENT_LIST_DIR}/openssl.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${name}.pc" @ONLY)
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
configure_file("${CMAKE_CURRENT_LIST_DIR}/openssl.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${name}.pc" @ONLY)
endif()
endfunction()
install_pc_file(openssl [[
Name: BoringSSL
Description: Secure Sockets Layer and cryptography libraries and tools
Requires: libssl libcrypto
]])
install_pc_file(libssl [[
Name: BoringSSL-libssl
Description: Secure Sockets Layer and cryptography libraries
Libs: -L"${libdir}" -llibssl
Requires: libcrypto
Cflags: -I"${includedir}"
]])
install_pc_file(libcrypto [[
Name: BoringSSL-libcrypto
Description: OpenSSL cryptography library
Libs: -L"${libdir}" -llibcrypto
Libs.private: -lcrypt32 -lws2_32
Cflags: -I"${includedir}"
]])
vcpkg_fixup_pkgconfig()

View File

@ -0,0 +1,6 @@
prefix=${pcfiledir}/../..
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Version: @OPENSSL_VERSION@
@pc_data@

View File

@ -41,6 +41,8 @@ vcpkg_cmake_configure(
vcpkg_cmake_install()
include("${CMAKE_CURRENT_LIST_DIR}/install-pc-files.cmake")
if(IS_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boringssl)
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/boringssl")
endif()

View File

@ -1,8 +1,8 @@
{
"name": "boringssl",
"version-date": "2021-06-23",
"port-version": 2,
"description": "BoringSSl is a fork of OpenSSL developed by Google",
"port-version": 3,
"description": "BoringSSL is a fork of OpenSSL developed by Google",
"homepage": "https://boringssl.googlesource.com/boringssl",
"supports": "!uwp",
"dependencies": [

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "cb83700b7bf53177773421dfb803fb8478e6a72d",
"version-date": "2021-06-23",
"port-version": 3
},
{
"git-tree": "8d28c72d322cf2245e69075deef73c5edefee0b5",
"version-date": "2021-06-23",

View File

@ -1162,7 +1162,7 @@
},
"boringssl": {
"baseline": "2021-06-23",
"port-version": 2
"port-version": 3
},
"botan": {
"baseline": "2.19.1",