!76 [sync] PR-75: Fix messy code for openssl-1.1.1wa version
From: @openeuler-sync-bot Reviewed-by: @lyn1001 Signed-off-by: @lyn1001
This commit is contained in:
commit
b836522309
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
Name: cmake
|
Name: cmake
|
||||||
Version: 3.22.0
|
Version: 3.22.0
|
||||||
Release: 8
|
Release: 9
|
||||||
Summary: Cross-platform make system
|
Summary: Cross-platform make system
|
||||||
License: BSD and MIT and zlib
|
License: BSD and MIT and zlib
|
||||||
URL: http://www.cmake.org
|
URL: http://www.cmake.org
|
||||||
@ -27,6 +27,7 @@ Patch2: cmake-mingw-dl.patch
|
|||||||
%ifarch sw_64
|
%ifarch sw_64
|
||||||
Patch3: cmake-3.22.0-sw.patch
|
Patch3: cmake-3.22.0-sw.patch
|
||||||
%endif
|
%endif
|
||||||
|
Patch4: fix-messy-code-for-openssl-1.1.1wa-version.patch
|
||||||
|
|
||||||
BuildRequires: coreutils findutils gcc-c++ gcc-gfortran sed
|
BuildRequires: coreutils findutils gcc-c++ gcc-gfortran sed
|
||||||
BuildRequires: emacs python3-devel pkgconfig(Qt5Widgets) desktop-file-utils
|
BuildRequires: emacs python3-devel pkgconfig(Qt5Widgets) desktop-file-utils
|
||||||
@ -237,6 +238,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||||||
%exclude %{_pkgdocdir}/Copyright.txt
|
%exclude %{_pkgdocdir}/Copyright.txt
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Apr 28 2024 wangkai <13474090681@163.com> - 3.22.0-9
|
||||||
|
- Fix messy code for openssl-1.1.1wa version
|
||||||
|
|
||||||
* Fri Feb 2 2024 liyanan <liyanan61@h-partners.com> - 3.22.0-8
|
* Fri Feb 2 2024 liyanan <liyanan61@h-partners.com> - 3.22.0-8
|
||||||
- Remove Windows_TemporaryKey.pfx
|
- Remove Windows_TemporaryKey.pfx
|
||||||
|
|
||||||
|
|||||||
32
fix-messy-code-for-openssl-1.1.1wa-version.patch
Normal file
32
fix-messy-code-for-openssl-1.1.1wa-version.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
|
||||||
|
index 8474e05c..ac742855 100644
|
||||||
|
--- a/Modules/FindOpenSSL.cmake
|
||||||
|
+++ b/Modules/FindOpenSSL.cmake
|
||||||
|
@@ -520,7 +520,6 @@ if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
|
||||||
|
from_hex("${OPENSSL_VERSION_PATCH}" _tmp)
|
||||||
|
# 96 is the ASCII code of 'a' minus 1
|
||||||
|
math(EXPR OPENSSL_VERSION_PATCH_ASCII "${_tmp} + 96")
|
||||||
|
- unset(_tmp)
|
||||||
|
# Once anyone knows how OpenSSL would call the patch versions beyond 'z'
|
||||||
|
# this should be updated to handle that, too. This has not happened yet
|
||||||
|
# so it is simply ignored here for now.
|
||||||
|
@@ -528,6 +527,16 @@ if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
set(OPENSSL_VERSION "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}${OPENSSL_VERSION_PATCH_STRING}")
|
||||||
|
+
|
||||||
|
+ if ("${_tmp}" GREATER 26)
|
||||||
|
+ # openssl version 1.1.1wa get text directly
|
||||||
|
+ file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_text
|
||||||
|
+ REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_TEXT[\t ]+\"OpenSSL[^\"]*\".*")
|
||||||
|
+ string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+[a-zA-Z]+" version_number ${openssl_version_text})
|
||||||
|
+ set(OPENSSL_VERSION "${version_number}")
|
||||||
|
+ endif ()
|
||||||
|
+ unset(_tmp)
|
||||||
|
+
|
||||||
|
else ()
|
||||||
|
# Since OpenSSL 3.0.0, the new version format is MAJOR.MINOR.PATCH and
|
||||||
|
# a new OPENSSL_VERSION_STR macro contains exactly that
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user