Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ports/libressl/CONTROL
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
31 changes: 9 additions & 22 deletions ports/libressl/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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)

Comment thread
NancyLi1013 marked this conversation as resolved.
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}
)
Comment thread
NancyLi1013 marked this conversation as resolved.
Expand All @@ -34,25 +25,24 @@ 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
)

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")
Expand All @@ -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()

Comment thread
NancyLi1013 marked this conversation as resolved.
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}")
Expand Down