[botan] Update to 3.1.1 (#33424)

This commit is contained in:
MonicaLiu 2023-10-09 15:05:22 -07:00 committed by GitHub
parent 9c2fc5d351
commit 6b09245259
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 31 additions and 116 deletions

View File

@ -1,23 +0,0 @@
diff --git a/src/lib/utils/mul128.h b/src/lib/utils/mul128.h
index 8cdaae2..54bb670 100644
--- a/src/lib/utils/mul128.h
+++ b/src/lib/utils/mul128.h
@@ -39,10 +39,15 @@ namespace Botan {
#elif defined(BOTAN_BUILD_COMPILER_IS_MSVC) && defined(BOTAN_TARGET_CPU_HAS_NATIVE_64BIT)
#include <intrin.h>
-#pragma intrinsic(_umul128)
-
-#define BOTAN_FAST_64X64_MUL(a,b,lo,hi) \
+#if defined(_M_ARM64)
+ #pragma intrinsic(__umulh)
+ #define BOTAN_FAST_64X64_MUL(a,b,lo,hi) \
+ do { *lo = a * b; *hi = __umulh(a, b); } while(0)
+#else
+ #pragma intrinsic(_umul128)
+ #define BOTAN_FAST_64X64_MUL(a,b,lo,hi) \
do { *lo = _umul128(a, b, hi); } while(0)
+#endif
#elif defined(BOTAN_USE_GCC_INLINE_ASM)

View File

@ -1,13 +0,0 @@
diff --git a/configure.py b/configure.py
index 89f87d4..ba7914f 100644
--- a/configure.py
+++ b/configure.py
@@ -2076,7 +2076,7 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch,
'maintainer_mode': options.maintainer_mode,
'out_dir': build_dir,
- 'build_dir': build_paths.build_dir,
+ 'build_dir': os.path.abspath(build_paths.build_dir),
'doc_stamp_file': os.path.join(build_paths.build_dir, 'doc.stamp'),
'makefile_path': os.path.join(build_paths.build_dir, '..', 'Makefile'),

View File

@ -1,23 +0,0 @@
diff --git a/configure.py b/configure.py
index 2474860a5..7d320d470 100755
--- a/configure.py
+++ b/configure.py
@@ -1821,13 +1821,12 @@ def yield_objectfile_list(sources, obj_dir, obj_suffix, options):
for src in sources:
(directory, filename) = os.path.split(os.path.normpath(src))
- parts = directory.split(os.sep)
+ parts_in_src = directory.split(os.sep + 'src' + os.sep)
+ parts = []
- if 'src' in parts:
- parts = parts[parts.index('src')+2:]
- elif options.amalgamation and filename.find(options.name_amalgamation) != -1:
- parts = []
- else:
+ if len(parts_in_src) > 1:
+ parts = [ 'src' ] + parts_in_src[-1].split(os.sep)
+ elif not options.amalgamation or filename.find(options.name_amalgamation) == -1:
raise InternalError("Unexpected file '%s/%s'" % (directory, filename))
if parts != []:

View File

@ -1,5 +1,5 @@
diff --git a/src/build-data/botan.pc.in b/src/build-data/botan.pc.in
index 7139436..81214fe 100644
index c18b522..a5722c9 100644
--- a/src/build-data/botan.pc.in
+++ b/src/build-data/botan.pc.in
@@ -1,7 +1,7 @@
@ -11,4 +11,4 @@ index 7139436..81214fe 100644
+includedir=${prefix}/include
Name: Botan
Description: Crypto and TLS for C++11
Description: Crypto and TLS for Modern C++

View File

@ -3,16 +3,13 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO randombit/botan
REF "${VERSION}"
SHA512 0f99ef4026e5180dd65dc0e935ba2cabaf750862c651699294b3521053463b7e65a90847fef6f0d640eb9f9eb5efce64b13e999aa9c215310998817d13bd5332
SHA512 fb6be83b0292bb28319061721fe10ea16776a942b381780a8d4bece9b86e3525a0f533e3572e54c6498b08c4dc421a746bff8f0302f3ea0d810e266811331a65
HEAD_REF master
PATCHES
fix-generate-build-path.patch
embed-debug-info.patch
arm64-windows.patch
pkgconfig.patch
verbose-install.patch
configure-zlib.patch
fix-objectfile-list.patch # https://github.com/randombit/botan/pull/3069
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/configure" DESTINATION "${SOURCE_PATH}")
@ -147,13 +144,13 @@ else()
vcpkg_copy_tools(TOOL_NAMES botan AUTO_CLEAN)
endif()
file(RENAME "${CURRENT_PACKAGES_DIR}/include/botan-2/botan" "${CURRENT_PACKAGES_DIR}/include/botan")
file(RENAME "${CURRENT_PACKAGES_DIR}/include/botan-3/botan" "${CURRENT_PACKAGES_DIR}/include/botan")
if(pkgconfig_requires)
list(JOIN pkgconfig_requires ", " pkgconfig_requires)
file(APPEND "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/botan-2.pc" "Requires.private: ${pkgconfig_requires}")
file(APPEND "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/botan-3.pc" "Requires.private: ${pkgconfig_requires}")
if(NOT VCPKG_BUILD_TYPE)
file(APPEND "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/botan-2.pc" "Requires.private: ${pkgconfig_requires}")
file(APPEND "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/botan-3.pc" "Requires.private: ${pkgconfig_requires}")
endif()
endif()
vcpkg_fixup_pkgconfig()
@ -161,7 +158,7 @@ vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/include/botan-2"
"${CURRENT_PACKAGES_DIR}/include/botan-3"
)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/botan/build.h" "#define BOTAN_INSTALL_PREFIX R\"(${CURRENT_PACKAGES_DIR})\"" "")
@ -169,4 +166,4 @@ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/botan/build.h" "#define BO
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/botan/build.h" "#define BOTAN_INSTALL_LIB_DIR R\"(${CURRENT_PACKAGES_DIR}/lib)\"" "")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/botan/build.h" "--prefix=${CURRENT_PACKAGES_DIR}" "")
file(INSTALL "${SOURCE_PATH}/license.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/license.txt")

View File

@ -1,7 +1,6 @@
{
"name": "botan",
"version": "2.19.3",
"port-version": 2,
"version": "3.1.1",
"description": "A cryptography library written in C++11",
"homepage": "https://botan.randombit.net",
"license": "BSD-2-Clause",

View File

@ -1,13 +1,13 @@
diff --git a/src/build-data/makefile.in b/src/build-data/makefile.in
index 4839112..5102933 100644
index 1d50a31..64789a5 100644
--- a/src/build-data/makefile.in
+++ b/src/build-data/makefile.in
@@ -58,7 +58,7 @@ distclean:
@@ -61,7 +61,7 @@ distclean:
"$(PYTHON_EXE)" "$(SCRIPTS_DIR)/cleanup.py" --build-dir="%{build_dir}" --distclean
install: %{install_targets}
- "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/install.py" --prefix="%{prefix}" --build-dir="%{build_dir}" --bindir="%{bindir}" --libdir="%{libdir}" --docdir="%{docdir}" --includedir="%{includedir}"
+ "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/install.py" --prefix="%{prefix}" --build-dir="%{build_dir}" --bindir="%{bindir}" --libdir="%{libdir}" --docdir="%{docdir}" --includedir="%{includedir}" --verbose
- "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/install.py" --build-dir="%{build_dir}"
+ "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/install.py" --build-dir="%{build_dir}" --verbose
check: tests
"$(PYTHON_EXE)" "$(SCRIPTS_DIR)/check.py" --build-dir="%{build_dir}"

View File

@ -23,35 +23,4 @@ index 80af6e84..ba86310d 100644
endmacro(install_pdb)
macro(normalize_path PATH)
diff --git a/plugins/qca-ossl/qca-ossl.cpp b/plugins/qca-ossl/qca-ossl.cpp
index b2c5d3d3..4250ec26 100644
--- a/plugins/qca-ossl/qca-ossl.cpp
+++ b/plugins/qca-ossl/qca-ossl.cpp
@@ -6846,6 +6846,7 @@ public:
else if (type == QLatin1String("aes256-ccm"))
return new opensslCipherContext(EVP_aes_256_ccm(), 0, this, type);
#endif
+#ifndef OPENSSL_NO_BF
else if (type == QLatin1String("blowfish-ecb"))
return new opensslCipherContext(EVP_bf_ecb(), 0, this, type);
else if (type == QLatin1String("blowfish-cfb"))
@@ -6856,6 +6857,8 @@ public:
return new opensslCipherContext(EVP_bf_cbc(), 0, this, type);
else if (type == QLatin1String("blowfish-cbc-pkcs7"))
return new opensslCipherContext(EVP_bf_cbc(), 1, this, type);
+#endif
+#ifndef OPENSSL_NO_DES
else if (type == QLatin1String("tripledes-ecb"))
return new opensslCipherContext(EVP_des_ede3(), 0, this, type);
else if (type == QLatin1String("tripledes-cbc"))
@@ -6872,6 +6875,7 @@ public:
return new opensslCipherContext(EVP_des_cfb(), 0, this, type);
else if (type == QLatin1String("des-ofb"))
return new opensslCipherContext(EVP_des_ofb(), 0, this, type);
+#endif
#ifndef OPENSSL_NO_CAST
else if (type == QLatin1String("cast5-ecb"))
return new opensslCipherContext(EVP_cast5_ecb(), 0, this, type);
--
2.31.1

View File

@ -11,8 +11,8 @@ vcpkg_add_to_path("${PERL_EXE_PATH}")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KDE/qca
REF v2.3.5
SHA512 c83ac69597f22d915479fd4fd1557b89c56ba384321c324f93cf2f1bd32a819cb6d7b008c44e7606fa39c8184043d97c36ee1210d23a6e8ce24c41c8a83e4fb9
REF "v${VERSION}"
SHA512 de06173aaea32aac19a24510b5dbb4bb79681217eb1e4256de36db9f7158ad485fa450ffba5e13c12a0425866923b54f9b4d6164d0eaf659fdf40e458f5ee017
PATCHES
0001-fix-path-for-vcpkg.patch
0002-fix-build-error.patch
@ -92,4 +92,4 @@ file(REMOVE_RECURSE
vcpkg_fixup_pkgconfig()
# Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")

View File

@ -1,7 +1,6 @@
{
"name": "qca",
"version": "2.3.5",
"port-version": 2,
"version": "2.3.7",
"description": "Qt Cryptographic Architecture (QCA).",
"homepage": "https://userbase.kde.org/QCA",
"dependencies": [

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d66e60d97a7a4e77df4e559fed1926a45dac3f52",
"version": "3.1.1",
"port-version": 0
},
{
"git-tree": "575322265c701c0ff15d79c65a47ad38e7958235",
"version": "2.19.3",

View File

@ -1285,8 +1285,8 @@
"port-version": 0
},
"botan": {
"baseline": "2.19.3",
"port-version": 2
"baseline": "3.1.1",
"port-version": 0
},
"box2d": {
"baseline": "2.4.1",
@ -6701,8 +6701,8 @@
"port-version": 0
},
"qca": {
"baseline": "2.3.5",
"port-version": 2
"baseline": "2.3.7",
"port-version": 0
},
"qcustomplot": {
"baseline": "2.1.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "f4a6f18e51fa29570a8e35e20668aa86e60f6ff7",
"version": "2.3.7",
"port-version": 0
},
{
"git-tree": "32321bfdc0e4563ed40687585b48038d551f6149",
"version": "2.3.5",