diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/libressl/portfile.cmake | |
Diffstat (limited to 'vcpkg/ports/libressl/portfile.cmake')
| -rw-r--r-- | vcpkg/ports/libressl/portfile.cmake | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/vcpkg/ports/libressl/portfile.cmake b/vcpkg/ports/libressl/portfile.cmake new file mode 100644 index 0000000..73b7220 --- /dev/null +++ b/vcpkg/ports/libressl/portfile.cmake @@ -0,0 +1,56 @@ +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h")
+ message(FATAL_ERROR "Can't build libressl if openssl is installed. Please remove openssl, and try install libressl again if you need it.")
+endif()
+
+vcpkg_download_distfile(
+ LIBRESSL_SOURCE_ARCHIVE
+ URLS "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${PORT}-${VERSION}.tar.gz"
+ "https://github.com/libressl/portable/releases/download/v${VERSION}/${PORT}-${VERSION}.tar.gz"
+ FILENAME "${PORT}-${VERSION}.tar.gz"
+ SHA512 b06eccff7b332da38efbc5a039d8ee54bd26437f3d5957f59ac2d93b4464f181c9a665a2c957272be5d9f91f447720f6dfa29b4b72407279ac8a7722c322dac0
+)
+
+vcpkg_extract_source_archive(
+ SOURCE_PATH
+ ARCHIVE "${LIBRESSL_SOURCE_ARCHIVE}"
+ PATCHES
+ pkgconfig.diff
+ aarch64-windows.diff
+)
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ "tools" LIBRESSL_APPS
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ ${FEATURE_OPTIONS}
+ -DLIBRESSL_INSTALL_CMAKEDIR=share/${PORT}
+ -DLIBRESSL_TESTS=OFF
+ OPTIONS_DEBUG
+ -DLIBRESSL_APPS=OFF
+)
+
+vcpkg_cmake_install()
+vcpkg_copy_pdbs()
+vcpkg_fixup_pkgconfig()
+vcpkg_cmake_config_fixup()
+
+# libressl as openssl replacement
+configure_file("${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/openssl/vcpkg-cmake-wrapper.cmake" @ONLY)
+
+if("tools" IN_LIST FEATURES)
+ vcpkg_copy_tools(TOOL_NAMES ocspcheck openssl DESTINATION "${CURRENT_PACKAGES_DIR}/tools/openssl" AUTO_CLEAN)
+endif()
+
+file(REMOVE_RECURSE
+ "${CURRENT_PACKAGES_DIR}/etc/ssl/certs"
+ "${CURRENT_PACKAGES_DIR}/debug/etc/ssl/certs"
+ "${CURRENT_PACKAGES_DIR}/debug/include"
+ "${CURRENT_PACKAGES_DIR}/debug/share"
+ "${CURRENT_PACKAGES_DIR}/share/man"
+)
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|