From 6b0924525956bd55016a99352e638e477d96772e Mon Sep 17 00:00:00 2001 From: MonicaLiu <110024546+MonicaLiu0311@users.noreply.github.com> Date: Mon, 9 Oct 2023 15:05:22 -0700 Subject: [PATCH] [botan] Update to 3.1.1 (#33424) --- ports/botan/arm64-windows.patch | 23 ----------------- ports/botan/fix-generate-build-path.patch | 13 ---------- ports/botan/fix-objectfile-list.patch | 23 ----------------- ports/botan/pkgconfig.patch | 4 +-- ports/botan/portfile.cmake | 15 +++++------ ports/botan/vcpkg.json | 3 +-- ports/botan/verbose-install.patch | 8 +++--- ports/qca/0002-fix-build-error.patch | 31 ----------------------- ports/qca/portfile.cmake | 6 ++--- ports/qca/vcpkg.json | 3 +-- versions/b-/botan.json | 5 ++++ versions/baseline.json | 8 +++--- versions/q-/qca.json | 5 ++++ 13 files changed, 31 insertions(+), 116 deletions(-) delete mode 100644 ports/botan/arm64-windows.patch delete mode 100644 ports/botan/fix-generate-build-path.patch delete mode 100644 ports/botan/fix-objectfile-list.patch diff --git a/ports/botan/arm64-windows.patch b/ports/botan/arm64-windows.patch deleted file mode 100644 index 54f98b7a9dfb8b..00000000000000 --- a/ports/botan/arm64-windows.patch +++ /dev/null @@ -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 --#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) - diff --git a/ports/botan/fix-generate-build-path.patch b/ports/botan/fix-generate-build-path.patch deleted file mode 100644 index 455c1f1391897c..00000000000000 --- a/ports/botan/fix-generate-build-path.patch +++ /dev/null @@ -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'), diff --git a/ports/botan/fix-objectfile-list.patch b/ports/botan/fix-objectfile-list.patch deleted file mode 100644 index b76c5fd7985377..00000000000000 --- a/ports/botan/fix-objectfile-list.patch +++ /dev/null @@ -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 != []: diff --git a/ports/botan/pkgconfig.patch b/ports/botan/pkgconfig.patch index 95f74c2805ae1b..1f4b921e6cccce 100644 --- a/ports/botan/pkgconfig.patch +++ b/ports/botan/pkgconfig.patch @@ -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++ diff --git a/ports/botan/portfile.cmake b/ports/botan/portfile.cmake index fe71f942239e34..7d265ba541360a 100644 --- a/ports/botan/portfile.cmake +++ b/ports/botan/portfile.cmake @@ -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") diff --git a/ports/botan/vcpkg.json b/ports/botan/vcpkg.json index d8f0e4e72536a0..067569ba68f380 100644 --- a/ports/botan/vcpkg.json +++ b/ports/botan/vcpkg.json @@ -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", diff --git a/ports/botan/verbose-install.patch b/ports/botan/verbose-install.patch index 6b1e4672984049..4f6101e10b1217 100644 --- a/ports/botan/verbose-install.patch +++ b/ports/botan/verbose-install.patch @@ -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}" diff --git a/ports/qca/0002-fix-build-error.patch b/ports/qca/0002-fix-build-error.patch index 69993e79a11eae..5515d21f738aed 100644 --- a/ports/qca/0002-fix-build-error.patch +++ b/ports/qca/0002-fix-build-error.patch @@ -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 diff --git a/ports/qca/portfile.cmake b/ports/qca/portfile.cmake index 599801eaeaeed7..6f1246f622cb45 100644 --- a/ports/qca/portfile.cmake +++ b/ports/qca/portfile.cmake @@ -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") diff --git a/ports/qca/vcpkg.json b/ports/qca/vcpkg.json index dde4c6dcd4a54d..cc1315838fa9b3 100644 --- a/ports/qca/vcpkg.json +++ b/ports/qca/vcpkg.json @@ -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": [ diff --git a/versions/b-/botan.json b/versions/b-/botan.json index ab55eb09922052..7ee8c91e54d24a 100644 --- a/versions/b-/botan.json +++ b/versions/b-/botan.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "d66e60d97a7a4e77df4e559fed1926a45dac3f52", + "version": "3.1.1", + "port-version": 0 + }, { "git-tree": "575322265c701c0ff15d79c65a47ad38e7958235", "version": "2.19.3", diff --git a/versions/baseline.json b/versions/baseline.json index 89251ff88e13a1..ea6d5f2562f3e8 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -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", diff --git a/versions/q-/qca.json b/versions/q-/qca.json index d032255dc1d0a8..24a56166d38006 100644 --- a/versions/q-/qca.json +++ b/versions/q-/qca.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "f4a6f18e51fa29570a8e35e20668aa86e60f6ff7", + "version": "2.3.7", + "port-version": 0 + }, { "git-tree": "32321bfdc0e4563ed40687585b48038d551f6149", "version": "2.3.5",