Skip to content

Commit

Permalink
[openssl] Change repo to github and update to 3.0.4 (#25451)
Browse files Browse the repository at this point in the history
* [openssl] Change repo to github and update to 3.0.4

* version
  • Loading branch information
JackBoosY authored Jun 29, 2022
1 parent 032d9d0 commit a61559a
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 51 deletions.
17 changes: 11 additions & 6 deletions ports/openssl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@ It can be installed on alpine systems via apk add linux-headers.]]
)
endif()

set(OPENSSL_VERSION 3.0.3)
set(OPENSSL_VERSION 3.0.4)

vcpkg_download_distfile(
ARCHIVE
URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz"
FILENAME "openssl-${OPENSSL_VERSION}.tar.gz"
SHA512 949472025211fabdaf2564122f0a9a3baef0facb6373e90cf6c4485164a50898050b179722d0b358c4d8cf1787384ea30d5fd03b98757634631d3e8978509b1a
if (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_UWP)
set(OPENSSL_PATCHES "${CMAKE_CURRENT_LIST_DIR}/windows/flags.patch")
endif()

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO openssl/openssl
REF openssl-${OPENSSL_VERSION}
SHA512 c58b439addbfc0901cb8d99036494bac60d24a4311815b9b7a559f5daaa027d4b83e49e2eb526f0552ec53f09be89081a08c20b8b6f20a2463081cdb071d6faf
PATCHES ${OPENSSL_PATCHES}
)

vcpkg_find_acquire_program(PERL)
Expand Down
10 changes: 2 additions & 8 deletions ports/openssl/unix/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH MASTER_COPY_SOURCE_PATH
ARCHIVE "${ARCHIVE}"
REF ${OPENSSL_VERSION}
)

if(CMAKE_HOST_WIN32)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES make perl)
set(MAKE "${MSYS_ROOT}/usr/bin/make.exe")
Expand All @@ -18,7 +12,7 @@ endif()
vcpkg_cmake_configure(
SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}"
OPTIONS
-DSOURCE_PATH=${MASTER_COPY_SOURCE_PATH}
-DSOURCE_PATH=${SOURCE_PATH}
-DPERL=${PERL}
-DMAKE=${MAKE}
-DVCPKG_CONCURRENCY=${VCPKG_CONCURRENCY}
Expand All @@ -35,4 +29,4 @@ foreach(HEADER ${HEADERS})
endforeach()

file(INSTALL ${RESOLVED_HEADERS} DESTINATION "${CURRENT_PACKAGES_DIR}/include/openssl")
file(INSTALL "${MASTER_COPY_SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
5 changes: 0 additions & 5 deletions ports/openssl/uwp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
set(OPENSSL_SHARED shared)
endif()

vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
)

vcpkg_find_acquire_program(NASM)
get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
vcpkg_add_to_path(PREPEND "${NASM_EXE_PATH}")
Expand Down
3 changes: 1 addition & 2 deletions ports/openssl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "openssl",
"version": "3.0.3",
"port-version": 2,
"version": "3.0.4",
"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": "Apache-2.0",
Expand Down
57 changes: 35 additions & 22 deletions ports/openssl/windows/flags.patch
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
diff --git a/Configure b/Configure
index faf57b1..690a9b8 100644
--- a/Configure
+++ b/Configure
@@ -556,7 +556,7 @@ my $list_separator_re =
# (we supported those before the change to "make variable" support.
my %user = (
AR => env('AR'),
- ARFLAGS => [],
+ ARFLAGS => [ env('ARFLAGS') || () ],
AS => undef,
ASFLAGS => [],
CC => env('CC'),
@@ -569,7 +569,7 @@ my %user = (
CPPINCLUDES => [], # Alternative for -I
CROSS_COMPILE => env('CROSS_COMPILE'),
HASHBANGPERL=> env('HASHBANGPERL') || env('PERL'),
- LD => undef,
+ LD => env('LD'),
LDFLAGS => [ env('LDFLAGS') || () ], # -L, -Wl,
LDLIBS => [ env('LDLIBS') || () ], # -l
MT => undef,
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index 66bc81d..2364633 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -1302,7 +1302,7 @@ my %targets = (
inherit_from => [ "BASE_Windows" ],
template => 1,
CC => "cl",
- CPP => '"$(CC)" /EP /C',
+ CPP => '$(CC) /EP /C',
CFLAGS => "/W3 /wd4090 /nologo",
coutflag => "/Fo",
LD => "link",
diff --git a/Configure b/Configure
index 8b234f6..e031768 100644
--- a/Configure
+++ b/Configure
@@ -680,7 +680,7 @@ my $list_separator_re =
# (we supported those before the change to "make variable" support.
my %user = (
AR => env('AR'),
- ARFLAGS => [],
+ ARFLAGS => [ env('ARFLAGS') || () ],
AS => undef,
ASFLAGS => [],
CC => env('CC'),
@@ -693,7 +693,7 @@ my %user = (
CPPINCLUDES => [], # Alternative for -I
CROSS_COMPILE => env('CROSS_COMPILE'),
HASHBANGPERL=> env('HASHBANGPERL') || env('PERL'),
- LD => undef,
+ LD => env('LD'),
LDFLAGS => [ env('LDFLAGS') || () ], # -L, -Wl,
LDLIBS => [ env('LDLIBS') || () ], # -l
MT => undef,
6 changes: 0 additions & 6 deletions ports/openssl/windows/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/flags.patch"
)

vcpkg_find_acquire_program(NASM)
get_filename_component(NASM_EXE_PATH "${NASM}" DIRECTORY)
vcpkg_add_to_path(PREPEND "${NASM_EXE_PATH}")
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5217,8 +5217,8 @@
"port-version": 1
},
"openssl": {
"baseline": "3.0.3",
"port-version": 2
"baseline": "3.0.4",
"port-version": 0
},
"openssl-unix": {
"baseline": "1.1.1h",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/openssl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b300461cf187df328c5d2269448840306f64a4e1",
"version": "3.0.4",
"port-version": 0
},
{
"git-tree": "cdd8b7c5c9ebba05598bc90a58f224f13cf0b611",
"version": "3.0.3",
Expand Down

0 comments on commit a61559a

Please sign in to comment.