Skip to contentSkip to conversation

vcpkg-ports: remove openssl port

PATCH In review Lev Stipakov 2 participants 2 messages Mar 17, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vcpkg-ports: remove openssl port

From: Lev Stipakov <[email protected]...>

We've added functionality to openvpn-build

f83f21ef "windows-msi: add ability to specify port overlays in openvpn-build"

(which is used for release building) to use overlay ports, which enables us to build releases with updated ports (like openssl) without making changes to openvpn repo. This means that openssl port overlay from this repo could be removed.

Developers can still use openvpn repo for Windows development and use whatever openssl version is provided by vcpkg official repo. When we need to build a release and the latest openssl is not there, we add port overlay to openvpn-build.

While on it, bump vcpkg commit id in github actions.

---
 .github/workflows/build.yaml                  |   2 +-
 .../openssl/install-pc-files.cmake            |  32 ----
 contrib/vcpkg-ports/openssl/openssl.pc.in     |   6 -
 contrib/vcpkg-ports/openssl/portfile.cmake    |  28 ---
 contrib/vcpkg-ports/openssl/usage             |   4 -
 .../openssl/vcpkg-cmake-wrapper.cmake.in      |  78 --------
 contrib/vcpkg-ports/openssl/vcpkg.json        |  18 --
 .../openssl/windows/portfile.cmake            | 172 ------------------
 8 files changed, 1 insertion(+), 339 deletions(-)
 delete mode 100644 contrib/vcpkg-ports/openssl/install-pc-files.cmake
 delete mode 100644 contrib/vcpkg-ports/openssl/openssl.pc.in
 delete mode 100644 contrib/vcpkg-ports/openssl/portfile.cmake
 delete mode 100644 contrib/vcpkg-ports/openssl/usage
 delete mode 100644 contrib/vcpkg-ports/openssl/vcpkg-cmake-wrapper.cmake.in
 delete mode 100644 contrib/vcpkg-ports/openssl/vcpkg.json
 delete mode 100644 contrib/vcpkg-ports/openssl/windows/portfile.cmake
.github/workflows/build.yaml +1 -1
index 6f49350e..dbb05739 100644
@@ -271,7 +271,7 @@ jobs:
       - name: Restore artifacts, or run vcpkg, build and cache artifacts
         uses: lukka/[email protected]...
         with:
-          vcpkgGitCommitId: 'a2fcb03749ff5897b5985092934dc6057680c789'
+          vcpkgGitCommitId: 'a69b65229b3956b7f45abd81671b7330114bcaad'
           vcpkgArguments: 'openssl lz4 lzo pkcs11-helper tap-windows6'
           vcpkgTriplet: '${{ matrix.triplet }}-windows-ovpn'
           cleanAfterBuild: false
contrib/vcpkg-ports/openssl/install-pc-files.cmake deleted +0 -32
deleted file mode 100644
index eb8d2b8c..00000000
@@ -1,32 +0,0 @@
-function(install_pc_file name pc_data)
-    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: OpenSSL
-Description: Secure Sockets Layer and cryptography libraries and tools
-Requires: libssl libcrypto
-]])
-
-install_pc_file(libssl [[
-Name: OpenSSL-libssl
-Description: Secure Sockets Layer and cryptography libraries
-Libs: -L"${libdir}" -llibssl
-Requires: libcrypto
-Cflags: -I"${includedir}"
-]])
-
-install_pc_file(libcrypto [[
-Name: OpenSSL-libcrypto
-Description: OpenSSL cryptography library
-Libs: -L"${libdir}" -llibcrypto
-Libs.private: -lcrypt32 -lws2_32
-Cflags: -I"${includedir}"
-]])
-
-vcpkg_fixup_pkgconfig()
contrib/vcpkg-ports/openssl/openssl.pc.in deleted +0 -6
deleted file mode 100644
index 3033e180..00000000
@@ -1,6 +0,0 @@
-prefix=${pcfiledir}/../..
-exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
-includedir=${prefix}/include
-Version: @OPENSSL_VERSION@
[email protected]...@
contrib/vcpkg-ports/openssl/portfile.cmake deleted +0 -28
deleted file mode 100644
index e94e7a83..00000000
@@ -1,28 +0,0 @@
-if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h")
-    message(FATAL_ERROR "Can't build openssl if libressl/boringssl is installed. Please remove libressl/boringssl, and try install openssl again if you need it.")
-endif()
-
-set(OPENSSL_VERSION 1.1.1n)
-vcpkg_download_distfile(
-    ARCHIVE
-    URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz"
-    FILENAME "openssl-${OPENSSL_VERSION}.tar.gz"
-    SHA512 1937796736613dcf4105a54e42ecb61f95a1cea74677156f9459aea0f2c95159359e766089632bf364ee6b0d28d661eb9957bce8fecc9d2436378d8d79e8d0a4
-)
-
-vcpkg_find_acquire_program(PERL)
-get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
-vcpkg_add_to_path("${PERL_EXE_PATH}")
-
-if(VCPKG_TARGET_IS_UWP)
-    include("${CMAKE_CURRENT_LIST_DIR}/uwp/portfile.cmake")
-    include("${CMAKE_CURRENT_LIST_DIR}/install-pc-files.cmake")
-elseif(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
-    include("${CMAKE_CURRENT_LIST_DIR}/windows/portfile.cmake")
-    include("${CMAKE_CURRENT_LIST_DIR}/install-pc-files.cmake")
-else()
-    include("${CMAKE_CURRENT_LIST_DIR}/unix/portfile.cmake")
-endif()
-
-configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
-file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
contrib/vcpkg-ports/openssl/usage deleted +0 -4
deleted file mode 100644
index cf83f339..00000000
@@ -1,4 +0,0 @@
-The package openssl is compatible with built-in CMake targets:
-
-    find_package(OpenSSL REQUIRED)
-    target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto)
contrib/vcpkg-ports/openssl/vcpkg-cmake-wrapper.cmake.in deleted +0 -78

78 lines not on this page · raw message

contrib/vcpkg-ports/openssl/vcpkg.json deleted +0 -18
deleted file mode 100644
index 18e6dde6..00000000
@@ -1,18 +0,0 @@
-{
-  "name": "openssl",
-  "version-string": "1.1.1n",
-  "port-version": 2,
-  "description": "OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.",
-  "homepage": "https://www.openssl.org",
-  "license": "OpenSSL",
-  "dependencies": [
-    {
-      "name": "vcpkg-cmake",
-      "host": true
-    },
-    {
-      "name": "vcpkg-cmake-config",
-      "host": true
-    }
-  ]
-}
contrib/vcpkg-ports/openssl/windows/portfile.cmake deleted +0 -172

172 lines not on this page · raw message

Signature · 1 line
2.23.0.windows.1
Acked-by on v1 1/1
#1 lore raw

As discussed :-)

Your patch has been applied to the release/2.5 branch.

commit aa6f15dd2a1df68409384d6f955f68692595b77b (release/2.5)

Author: Lev Stipakov
Date:   Thu Mar 17 15:57:28 2022 +0200
     vcpkg-ports: remove openssl port

     Signed-off-by: Lev Stipakov <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg23993.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering