diff options
| author | Maksim Moisiuk <ConEmu.Maximus5@gmail.com> | 2020-08-07 21:19:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-07 12:19:15 -0700 |
| commit | c74bc921fecbc9c9c629b348b584dd128758e148 (patch) | |
| tree | af79d4695a9063ab70b3784ae4626f1dd7cd55f8 | |
| parent | 15141fbc95f1994c164ec55b93cad163008ca0b0 (diff) | |
| download | vcpkg-c74bc921fecbc9c9c629b348b584dd128758e148.tar.gz vcpkg-c74bc921fecbc9c9c629b348b584dd128758e148.zip | |
[libressl] add download mirror (#11949)
* [libressl] add download mirror
* increment version in CONTROL file
* drop cmake_minimum_required
* use vcpkg_fail_port_install
* use vcpkg_check_features
* remove deprecated VCPKG_CMAKE_SYSTEM_NAME
* rename deprecated function to vcpkg_copy_tools
* leave pkgconfig
* [libressl] Restore vcpkg_copy_tool_dependencies
* Update portfile.cmake
Update the deprecated functions or variables
* [libressl] use vcpkg_copy_tools in port file
* [libressl] fix tools copying
* Update ports/libressl/CONTROL
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
| -rw-r--r-- | ports/libressl/CONTROL | 3 | ||||
| -rw-r--r-- | ports/libressl/portfile.cmake | 31 |
2 files changed, 11 insertions, 23 deletions
diff --git a/ports/libressl/CONTROL b/ports/libressl/CONTROL index a5dfd10c7..2b7d62ec2 100644 --- a/ports/libressl/CONTROL +++ b/ports/libressl/CONTROL @@ -1,5 +1,6 @@ Source: libressl
-Version: 2.9.1-2
+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)
diff --git a/ports/libressl/portfile.cmake b/ports/libressl/portfile.cmake index 5c8e5b964..7e37c207e 100644 --- a/ports/libressl/portfile.cmake +++ b/ports/libressl/portfile.cmake @@ -1,26 +1,17 @@ -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)
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()
-
-include(vcpkg_common_functions)
+vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp")
set(LIBRESSL_VERSION 2.9.1)
set(LIBRESSL_HASH 7051911e566bb093c48a70da72c9981b870e3bf49a167ba6c934eece873084cc41221fbe3cd0c8baba268d0484070df7164e4b937854e716337540a87c214354)
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}
)
@@ -34,16 +25,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
@@ -51,8 +41,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake()
-if(LIBRESSL_APPS)
- if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
+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")
@@ -73,15 +63,12 @@ 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()
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}")
|
