From d1cad3743d935c5b2bbc1829e7cdfde01939eb45 Mon Sep 17 00:00:00 2001 From: Maksim Moisiuk Date: Mon, 15 Jun 2020 12:24:16 +0200 Subject: [PATCH 01/13] [libressl] add download mirror --- ports/libressl/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libressl/portfile.cmake b/ports/libressl/portfile.cmake index 5c8e5b964ce65d..cc3bead46bea41 100644 --- a/ports/libressl/portfile.cmake +++ b/ports/libressl/portfile.cmake @@ -20,7 +20,7 @@ set(LIBRESSL_HASH 7051911e566bb093c48a70da72c9981b870e3bf49a167ba6c934eece873084 vcpkg_download_distfile( LIBRESSL_SOURCE_ARCHIVE - URLS https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${PORT}-${LIBRESSL_VERSION}.tar.gz + URLS https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${PORT}-${LIBRESSL_VERSION}.tar.gz https://ftp.fau.de/openbsd/LibreSSL/${PORT}-${LIBRESSL_VERSION}.tar.gz FILENAME ${PORT}-${LIBRESSL_VERSION}.tar.gz SHA512 ${LIBRESSL_HASH} ) From 60f7ebb3651cbd9cc768a6eac7949426cc975446 Mon Sep 17 00:00:00 2001 From: Maksim Moisiuk Date: Tue, 16 Jun 2020 11:05:30 +0200 Subject: [PATCH 02/13] increment version in CONTROL file --- ports/libressl/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libressl/CONTROL b/ports/libressl/CONTROL index a5dfd10c70e388..f490f09fd47baa 100644 --- a/ports/libressl/CONTROL +++ b/ports/libressl/CONTROL @@ -1,5 +1,5 @@ Source: libressl -Version: 2.9.1-2 +Version: 2.9.1-3 Description: LibreSSL is a version of the TLS/crypto stack forked from OpenSSL in 2014, with goals of modernizing the codebase, improving security, and applying best practice development processes. Supports: !(uwp|arm) From f4067ccc3113801074696514415a47749420b6e0 Mon Sep 17 00:00:00 2001 From: Maksim Moisiuk Date: Tue, 16 Jun 2020 11:05:59 +0200 Subject: [PATCH 03/13] drop cmake_minimum_required --- ports/libressl/portfile.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/ports/libressl/portfile.cmake b/ports/libressl/portfile.cmake index cc3bead46bea41..b29b655e2b62cb 100644 --- a/ports/libressl/portfile.cmake +++ b/ports/libressl/portfile.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.13) - if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") message(WARNING "Can't build libressl if openssl is installed. Please remove openssl, and try install libressl again if you need it. Build will continue since libressl is a subset of openssl") set(VCPKG_POLICY_EMPTY_PACKAGE enabled) From c27406181667b3c1c2cbd5d6e04a22936ea80eff Mon Sep 17 00:00:00 2001 From: Maksim Moisiuk Date: Tue, 16 Jun 2020 12:15:19 +0200 Subject: [PATCH 04/13] use vcpkg_fail_port_install --- ports/libressl/portfile.cmake | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ports/libressl/portfile.cmake b/ports/libressl/portfile.cmake index b29b655e2b62cb..51e172a23932d0 100644 --- a/ports/libressl/portfile.cmake +++ b/ports/libressl/portfile.cmake @@ -4,12 +4,7 @@ if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") return() endif() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() -if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - message(FATAL_ERROR "${PORT} does not support ARM") -endif() +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") include(vcpkg_common_functions) From 91a6d21a3569471d7ae27823442f1d51fb29a519 Mon Sep 17 00:00:00 2001 From: Maksim Moisiuk Date: Tue, 16 Jun 2020 12:15:47 +0200 Subject: [PATCH 05/13] use vcpkg_check_features --- ports/libressl/portfile.cmake | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ports/libressl/portfile.cmake b/ports/libressl/portfile.cmake index 51e172a23932d0..f721c21ecbbca1 100644 --- a/ports/libressl/portfile.cmake +++ b/ports/libressl/portfile.cmake @@ -27,16 +27,15 @@ vcpkg_extract_source_archive_ex( 0002-suppress-msvc-warnings.patch ) -set(LIBRESSL_APPS OFF) -if("tools" IN_LIST FEATURES) - set(LIBRESSL_APPS ON) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "tools" LIBRESSL_APPS +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DLIBRESSL_APPS=${LIBRESSL_APPS} + ${FEATURE_OPTIONS} -DLIBRESSL_TESTS=OFF OPTIONS_DEBUG -DLIBRESSL_APPS=OFF From e8c1f1570da54d1c97327a5eaf11e24141b7c283 Mon Sep 17 00:00:00 2001 From: Maksim Moisiuk Date: Tue, 16 Jun 2020 12:16:26 +0200 Subject: [PATCH 06/13] remove deprecated VCPKG_CMAKE_SYSTEM_NAME --- ports/libressl/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libressl/portfile.cmake b/ports/libressl/portfile.cmake index f721c21ecbbca1..3b1fd7b4eceaa7 100644 --- a/ports/libressl/portfile.cmake +++ b/ports/libressl/portfile.cmake @@ -44,7 +44,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() if(LIBRESSL_APPS) - if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) set(EXECUTABLE_SUFFIX .exe) endif() file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/openssl") From 45e2320f5e49af403416ef065ba0a2a41adc64f3 Mon Sep 17 00:00:00 2001 From: Maksim Moisiuk Date: Tue, 16 Jun 2020 12:16:57 +0200 Subject: [PATCH 07/13] rename deprecated function to vcpkg_copy_tools --- ports/libressl/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libressl/portfile.cmake b/ports/libressl/portfile.cmake index 3b1fd7b4eceaa7..3fb647f2ed08e6 100644 --- a/ports/libressl/portfile.cmake +++ b/ports/libressl/portfile.cmake @@ -50,7 +50,7 @@ if(LIBRESSL_APPS) file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/openssl") file(RENAME "${CURRENT_PACKAGES_DIR}/bin/openssl${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/openssl/openssl${EXECUTABLE_SUFFIX}") file(RENAME "${CURRENT_PACKAGES_DIR}/bin/ocspcheck${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/openssl/ocspcheck${EXECUTABLE_SUFFIX}") - vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/openssl") + vcpkg_copy_tools("${CURRENT_PACKAGES_DIR}/tools/openssl") endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") From 0946052931cbd73c7726c89fcc5173a296aeec2c Mon Sep 17 00:00:00 2001 From: Maksim Moisiuk Date: Tue, 16 Jun 2020 12:17:22 +0200 Subject: [PATCH 08/13] leave pkgconfig --- ports/libressl/portfile.cmake | 3 --- 1 file changed, 3 deletions(-) diff --git a/ports/libressl/portfile.cmake b/ports/libressl/portfile.cmake index 3fb647f2ed08e6..81ed3e0ed17f04 100644 --- a/ports/libressl/portfile.cmake +++ b/ports/libressl/portfile.cmake @@ -65,9 +65,6 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share" ) -if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig") -endif() vcpkg_copy_pdbs() From d6d9a89d4771638bad9e4e6137b8189eaca80918 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 7 Jul 2020 14:43:35 -0700 Subject: [PATCH 09/13] [libressl] Restore vcpkg_copy_tool_dependencies --- ports/libressl/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libressl/portfile.cmake b/ports/libressl/portfile.cmake index 81ed3e0ed17f04..07f2ade6c6dd31 100644 --- a/ports/libressl/portfile.cmake +++ b/ports/libressl/portfile.cmake @@ -50,7 +50,7 @@ if(LIBRESSL_APPS) file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/openssl") file(RENAME "${CURRENT_PACKAGES_DIR}/bin/openssl${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/openssl/openssl${EXECUTABLE_SUFFIX}") file(RENAME "${CURRENT_PACKAGES_DIR}/bin/ocspcheck${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/openssl/ocspcheck${EXECUTABLE_SUFFIX}") - vcpkg_copy_tools("${CURRENT_PACKAGES_DIR}/tools/openssl") + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/openssl") endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") From 277c43019e1d28daab809537ee89cfbe72db5430 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Thu, 9 Jul 2020 17:22:33 +0800 Subject: [PATCH 10/13] Update portfile.cmake Update the deprecated functions or variables --- ports/libressl/portfile.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ports/libressl/portfile.cmake b/ports/libressl/portfile.cmake index 07f2ade6c6dd31..a25a467276fe39 100644 --- a/ports/libressl/portfile.cmake +++ b/ports/libressl/portfile.cmake @@ -6,8 +6,6 @@ endif() vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") -include(vcpkg_common_functions) - set(LIBRESSL_VERSION 2.9.1) set(LIBRESSL_HASH 7051911e566bb093c48a70da72c9981b870e3bf49a167ba6c934eece873084cc41221fbe3cd0c8baba268d0484070df7164e4b937854e716337540a87c214354) @@ -70,7 +68,7 @@ vcpkg_copy_pdbs() file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) -if((NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) AND (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")) +if((VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) AND (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")) file(GLOB_RECURSE LIBS "${CURRENT_PACKAGES_DIR}/*.lib") foreach(LIB ${LIBS}) string(REGEX REPLACE "(.+)-[0-9]+\\.lib" "\\1.lib" LINK "${LIB}") From 52c2f429447e0c26222eadaccde5fb2ab540c744 Mon Sep 17 00:00:00 2001 From: Maksim Moisiuk Date: Fri, 10 Jul 2020 15:50:01 +0200 Subject: [PATCH 11/13] [libressl] use vcpkg_copy_tools in port file --- ports/libressl/portfile.cmake | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ports/libressl/portfile.cmake b/ports/libressl/portfile.cmake index a25a467276fe39..bf4f2af520161a 100644 --- a/ports/libressl/portfile.cmake +++ b/ports/libressl/portfile.cmake @@ -42,13 +42,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() if(LIBRESSL_APPS) - if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) - set(EXECUTABLE_SUFFIX .exe) - endif() - file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/openssl") - file(RENAME "${CURRENT_PACKAGES_DIR}/bin/openssl${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/openssl/openssl${EXECUTABLE_SUFFIX}") - file(RENAME "${CURRENT_PACKAGES_DIR}/bin/ocspcheck${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/openssl/ocspcheck${EXECUTABLE_SUFFIX}") - vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/openssl") + vcpkg_copy_tools(TOOL_NAMES openssl ocspcheck) endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") From d73ec0bde5c512543e09ba1ebdbbe9d94512d215 Mon Sep 17 00:00:00 2001 From: Maksim Moisiuk Date: Fri, 10 Jul 2020 22:27:59 +0200 Subject: [PATCH 12/13] [libressl] fix tools copying --- ports/libressl/portfile.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ports/libressl/portfile.cmake b/ports/libressl/portfile.cmake index bf4f2af520161a..7e37c207edd966 100644 --- a/ports/libressl/portfile.cmake +++ b/ports/libressl/portfile.cmake @@ -41,8 +41,14 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -if(LIBRESSL_APPS) - vcpkg_copy_tools(TOOL_NAMES openssl ocspcheck) +if("tools" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) + set(EXECUTABLE_SUFFIX .exe) + endif() + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/openssl") + file(RENAME "${CURRENT_PACKAGES_DIR}/bin/openssl${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/openssl/openssl${EXECUTABLE_SUFFIX}") + file(RENAME "${CURRENT_PACKAGES_DIR}/bin/ocspcheck${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/openssl/ocspcheck${EXECUTABLE_SUFFIX}") + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/openssl") endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") From 3865667ff77aefb303c93d0afcb5930b3cb86bc7 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Fri, 24 Jul 2020 16:37:22 +0800 Subject: [PATCH 13/13] Update ports/libressl/CONTROL --- ports/libressl/CONTROL | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/libressl/CONTROL b/ports/libressl/CONTROL index f490f09fd47baa..2b7d62ec20a9a6 100644 --- a/ports/libressl/CONTROL +++ b/ports/libressl/CONTROL @@ -1,5 +1,6 @@ Source: libressl -Version: 2.9.1-3 +Version: 2.9.1 +Port-Version: 3 Description: LibreSSL is a version of the TLS/crypto stack forked from OpenSSL in 2014, with goals of modernizing the codebase, improving security, and applying best practice development processes. Supports: !(uwp|arm)