From ffb96495118e74bd5ea7454178f03564a1bd2713 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Wed, 20 Oct 2021 15:55:00 +0800 Subject: [PATCH 01/15] [mbedtls] update to 3.0.0 --- ports/mbedtls/enable-pthread.patch | 167 +++++++++++------------------ ports/mbedtls/portfile.cmake | 25 +++-- ports/mbedtls/vcpkg.json | 13 ++- 3 files changed, 88 insertions(+), 117 deletions(-) diff --git a/ports/mbedtls/enable-pthread.patch b/ports/mbedtls/enable-pthread.patch index 6353103769c327..e92b74cb809d0c 100755 --- a/ports/mbedtls/enable-pthread.patch +++ b/ports/mbedtls/enable-pthread.patch @@ -1,102 +1,65 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8833246..f68ab02 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -28,6 +28,7 @@ set(MBEDTLS_DIR ${CMAKE_CURRENT_SOURCE_DIR}) - - option(USE_PKCS11_HELPER_LIBRARY "Build mbed TLS with the pkcs11-helper library." OFF) - option(ENABLE_ZLIB_SUPPORT "Build mbed TLS with zlib library." OFF) -+option(ENABLE_PTHREAD "Build mbed TLS with pthread" OFF) - - option(ENABLE_PROGRAMS "Build mbed TLS programs." ON) - -@@ -231,6 +232,8 @@ else() - set(LIB_INSTALL_DIR lib) - endif() - -+include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/) -+ - if(ENABLE_ZLIB_SUPPORT) - find_package(ZLIB) - -@@ -239,6 +242,17 @@ if(ENABLE_ZLIB_SUPPORT) - endif(ZLIB_FOUND) - endif(ENABLE_ZLIB_SUPPORT) - -+if(ENABLE_PTHREAD) -+ if(WIN32) -+ find_package(pthreads_windows REQUIRED) -+ include_directories(${PThreads4W_INCLUDE_DIR}) -+ else() -+ set(CMAKE_THREAD_PREFER_PTHREAD ON) -+ find_package(Threads REQUIRED) -+ endif() -+ set(LINK_WITH_PTHREAD ON) -+endif() -+ - add_subdirectory(include) - - add_subdirectory(3rdparty) -diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt -index 62c0f62..7923202 100644 ---- a/include/CMakeLists.txt -+++ b/include/CMakeLists.txt -@@ -1,10 +1,14 @@ - option(INSTALL_MBEDTLS_HEADERS "Install mbed TLS headers." ON) - -+configure_file(mbedtls/config_threading.h.in mbedtls/config_threading.h) -+ - if(INSTALL_MBEDTLS_HEADERS) - - file(GLOB headers "mbedtls/*.h") - file(GLOB psa_headers "psa/*.h") -- -+ -+ set(headers ${headers} ${CMAKE_CURRENT_BINARY_DIR}/mbedtls/config_threading.h) -+ - install(FILES ${headers} - DESTINATION include/mbedtls - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) -diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h -index 1e6e052..51c20da 100644 ---- a/include/mbedtls/config.h -+++ b/include/mbedtls/config.h -@@ -24,6 +24,8 @@ - * limitations under the License. - */ - -+#include "mbedtls/config_threading.h" -+ - #ifndef MBEDTLS_CONFIG_H - #define MBEDTLS_CONFIG_H - -diff --git a/include/mbedtls/config_threading.h.in b/include/mbedtls/config_threading.h.in -new file mode 100644 -index 0000000..9d5d42e ---- /dev/null -+++ b/include/mbedtls/config_threading.h.in -@@ -0,0 +1,6 @@ -+#cmakedefine ENABLE_PTHREAD -+ -+#ifdef ENABLE_PTHREAD -+#define MBEDTLS_THREADING_C -+#define MBEDTLS_THREADING_PTHREAD -+#endif -\ No newline at end of file -diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt -index 33e2cfc..4b99331 100644 ---- a/library/CMakeLists.txt -+++ b/library/CMakeLists.txt -@@ -137,7 +137,11 @@ if(ENABLE_ZLIB_SUPPORT) - endif(ENABLE_ZLIB_SUPPORT) - - if(LINK_WITH_PTHREAD) -- set(libs ${libs} pthread) -+ if(WIN32) -+ set(libs ${libs} ${PThreads4W_LIBRARY}) -+ else() -+ set(libs ${libs} pthread) -+ endif() - endif() - - if(LINK_WITH_TRUSTED_STORAGE) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cf74af5..fbfdf4c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -43,6 +43,7 @@ endif() + set(MBEDTLS_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + + option(ENABLE_PROGRAMS "Build mbed TLS programs." ON) ++option(ENABLE_PTHREAD "Build mbed TLS with pthread" OFF) + + option(UNSAFE_BUILD "Allow unsafe builds. These builds ARE NOT SECURE." OFF) + option(MBEDTLS_FATAL_WARNINGS "Compiler warnings treated as errors" ON) +@@ -222,6 +223,19 @@ else() + set(LIB_INSTALL_DIR lib) + endif() + ++include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/) ++ ++if(ENABLE_PTHREAD) ++ if(WIN32) ++ find_package(pthreads_windows REQUIRED) ++ include_directories(${PThreads4W_INCLUDE_DIR}) ++ else() ++ set(CMAKE_THREAD_PREFER_PTHREAD ON) ++ find_package(Threads REQUIRED) ++ endif() ++ set(LINK_WITH_PTHREAD ON) ++endif() ++ + add_subdirectory(include) + + add_subdirectory(3rdparty) +diff --git a/include/mbedtls/mbedtls_config.h b/include/mbedtls/mbedtls_config.h +index a60db7e..bb2cad5 100644 +--- a/include/mbedtls/mbedtls_config.h ++++ b/include/mbedtls/mbedtls_config.h +@@ -24,6 +24,11 @@ + * limitations under the License. + */ + ++#ifdef ENABLE_PTHREAD ++#define MBEDTLS_THREADING_C ++#define MBEDTLS_THREADING_PTHREAD ++#endif ++ + /** + * This is an optional version symbol that enables comatibility handling of + * config files. +diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt +index 1cd5589..aa06678 100644 +--- a/library/CMakeLists.txt ++++ b/library/CMakeLists.txt +@@ -130,7 +130,11 @@ if(HAIKU) + endif(HAIKU) + + if(LINK_WITH_PTHREAD) +- set(libs ${libs} pthread) ++ if(WIN32) ++ set(libs ${libs} ${PThreads4W_LIBRARY}) ++ else() ++ set(libs ${libs} pthread) ++ endif() + endif() + + if(LINK_WITH_TRUSTED_STORAGE) diff --git a/ports/mbedtls/portfile.cmake b/ports/mbedtls/portfile.cmake index 3bd961fbce827f..669280d1febbad 100644 --- a/ports/mbedtls/portfile.cmake +++ b/ports/mbedtls/portfile.cmake @@ -5,8 +5,8 @@ set(VCPKG_LIBRARY_LINKAGE static) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ARMmbed/mbedtls - REF 523f0554b6cdc7ace5d360885c3f5bbcc73ec0e8 # mbedtls-2.24.0 - SHA512 1ce78f34e8d87c2ce0454e0a08f4c6e5b3129d4b24cfa44162af21c2e8b5dc7feabf849e4fa547ce3781b5ce11aaf675cfed47412bae40091fbdd87bbcdbee07 + REF 8df2f8e7b9c7bb9390ac74bb7bace27edca81a2b # mbedtls-3.0.0 + SHA512 7cc1412664a8e8d35b8d0c578cd2d0fc2b4aee82e1f9583aaf167e4adf893b5fd0c8fd686db11900c13418789e99ee03fc91ea37ac3ef922c28d51f54fa196ad HEAD_REF master PATCHES enable-pthread.patch @@ -15,12 +15,11 @@ vcpkg_from_github( vcpkg_check_features( OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES - pthreads ENABLE_PTHREAD + pthreads ENABLE_PTHREAD ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} -DENABLE_TESTING=OFF @@ -28,14 +27,14 @@ vcpkg_configure_cmake( -DMBEDTLS_FATAL_WARNINGS=FALSE ) -vcpkg_install_cmake() +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(CONFIG_PATH "CMake") -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) if (VCPKG_TARGET_IS_WINDOWS AND pthreads IN_LIST FEATURES) - file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -endif () - -vcpkg_copy_pdbs() \ No newline at end of file + file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +endif () \ No newline at end of file diff --git a/ports/mbedtls/vcpkg.json b/ports/mbedtls/vcpkg.json index ec036a05f62094..236ae20347840f 100644 --- a/ports/mbedtls/vcpkg.json +++ b/ports/mbedtls/vcpkg.json @@ -1,10 +1,19 @@ { "name": "mbedtls", - "version-string": "2.24.0", - "port-version": 3, + "version": "3.0.0", "description": "An open source, portable, easy to use, readable and flexible SSL library", "homepage": "https://github.com/ARMmbed/mbedtls", "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], "features": { "pthreads": { "description": "Multi-threading support", From ecc5dc912551e3ce37fec3b0c076de50f858b22d Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Wed, 20 Oct 2021 15:56:30 +0800 Subject: [PATCH 02/15] update version --- ports/mbedtls/vcpkg.json | 2 +- versions/baseline.json | 4 ++-- versions/m-/mbedtls.json | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ports/mbedtls/vcpkg.json b/ports/mbedtls/vcpkg.json index 236ae20347840f..796319105b222b 100644 --- a/ports/mbedtls/vcpkg.json +++ b/ports/mbedtls/vcpkg.json @@ -12,7 +12,7 @@ { "name": "vcpkg-cmake-config", "host": true - } + } ], "features": { "pthreads": { diff --git a/versions/baseline.json b/versions/baseline.json index f334952134f54d..38478a39ed8208 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4217,8 +4217,8 @@ "port-version": 1 }, "mbedtls": { - "baseline": "2.24.0", - "port-version": 3 + "baseline": "3.0.0", + "port-version": 0 }, "mcpp": { "baseline": "2.7.2.14", diff --git a/versions/m-/mbedtls.json b/versions/m-/mbedtls.json index d9fdc8f6b618c2..9232e5977ccf80 100644 --- a/versions/m-/mbedtls.json +++ b/versions/m-/mbedtls.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "0579930c1af250dd8b65891b533397cf5ca0c067", + "version": "3.0.0", + "port-version": 0 + }, { "git-tree": "a68475211755b3999de8cb2ec1d2fdfe9bb8ab10", "version-string": "2.24.0", From d4b5d576458e7a7ccfb3a9dcc4eeac3553e6979b Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 21 Oct 2021 17:40:42 +0800 Subject: [PATCH 03/15] update version --- versions/m-/mbedtls.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/m-/mbedtls.json b/versions/m-/mbedtls.json index 9232e5977ccf80..fca7356f72a524 100644 --- a/versions/m-/mbedtls.json +++ b/versions/m-/mbedtls.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "0579930c1af250dd8b65891b533397cf5ca0c067", + "git-tree": "1253d35afb1cda738ecfaefd4d36dc3e692c7041", "version": "3.0.0", "port-version": 0 }, From 71eb6f358622718080cd476255003afed1b0038d Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 6 Jan 2022 18:32:51 +0800 Subject: [PATCH 04/15] [mbedtls] update to 3.1.0 --- ports/mbedtls/enable-pthread.patch | 159 +++++++++++++++++------------ ports/mbedtls/portfile.cmake | 10 +- ports/mbedtls/vcpkg.json | 2 +- 3 files changed, 101 insertions(+), 70 deletions(-) diff --git a/ports/mbedtls/enable-pthread.patch b/ports/mbedtls/enable-pthread.patch index e92b74cb809d0c..c7fdbceb29cfc1 100755 --- a/ports/mbedtls/enable-pthread.patch +++ b/ports/mbedtls/enable-pthread.patch @@ -1,65 +1,94 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cf74af5..fbfdf4c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -43,6 +43,7 @@ endif() - set(MBEDTLS_DIR ${CMAKE_CURRENT_SOURCE_DIR}) - - option(ENABLE_PROGRAMS "Build mbed TLS programs." ON) -+option(ENABLE_PTHREAD "Build mbed TLS with pthread" OFF) - - option(UNSAFE_BUILD "Allow unsafe builds. These builds ARE NOT SECURE." OFF) - option(MBEDTLS_FATAL_WARNINGS "Compiler warnings treated as errors" ON) -@@ -222,6 +223,19 @@ else() - set(LIB_INSTALL_DIR lib) - endif() - -+include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/) -+ -+if(ENABLE_PTHREAD) -+ if(WIN32) -+ find_package(pthreads_windows REQUIRED) -+ include_directories(${PThreads4W_INCLUDE_DIR}) -+ else() -+ set(CMAKE_THREAD_PREFER_PTHREAD ON) -+ find_package(Threads REQUIRED) -+ endif() -+ set(LINK_WITH_PTHREAD ON) -+endif() -+ - add_subdirectory(include) - - add_subdirectory(3rdparty) -diff --git a/include/mbedtls/mbedtls_config.h b/include/mbedtls/mbedtls_config.h -index a60db7e..bb2cad5 100644 ---- a/include/mbedtls/mbedtls_config.h -+++ b/include/mbedtls/mbedtls_config.h -@@ -24,6 +24,11 @@ - * limitations under the License. - */ - -+#ifdef ENABLE_PTHREAD -+#define MBEDTLS_THREADING_C -+#define MBEDTLS_THREADING_PTHREAD -+#endif -+ - /** - * This is an optional version symbol that enables comatibility handling of - * config files. -diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt -index 1cd5589..aa06678 100644 ---- a/library/CMakeLists.txt -+++ b/library/CMakeLists.txt -@@ -130,7 +130,11 @@ if(HAIKU) - endif(HAIKU) - - if(LINK_WITH_PTHREAD) -- set(libs ${libs} pthread) -+ if(WIN32) -+ set(libs ${libs} ${PThreads4W_LIBRARY}) -+ else() -+ set(libs ${libs} pthread) -+ endif() - endif() - - if(LINK_WITH_TRUSTED_STORAGE) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6debe35..64e0674 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,6 +51,7 @@ if(WIN32) + else() + option(GEN_FILES "Generate the auto-generated files as needed" ON) + endif() ++option(ENABLE_PTHREAD "Build mbed TLS with pthread" OFF) + + string(REGEX MATCH "Clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER_ID}") + string(REGEX MATCH "GNU" CMAKE_COMPILER_IS_GNU "${CMAKE_C_COMPILER_ID}") +@@ -243,12 +244,26 @@ else() + set(LIB_INSTALL_DIR lib) + endif() + ++include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/) ++ + add_subdirectory(include) + + add_subdirectory(3rdparty) + + add_subdirectory(library) + ++if(ENABLE_PTHREAD) ++ if(WIN32) ++ find_package(pthreads_windows REQUIRED) ++ include_directories(${PThreads4W_INCLUDE_DIR}) ++ else() ++ set(CMAKE_THREAD_PREFER_PTHREAD ON) ++ find_package(Threads REQUIRED) ++ endif() ++ set(LINK_WITH_PTHREAD ON) ++endif() ++ ++ + # + # The C files in tests/src directory contain test code shared among test suites + # and programs. This shared test code is compiled and linked to test suites and +diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt +index e693bc1..7f5216a 100644 +--- a/include/CMakeLists.txt ++++ b/include/CMakeLists.txt +@@ -1,9 +1,13 @@ + option(INSTALL_MBEDTLS_HEADERS "Install mbed TLS headers." ON) + ++configure_file(mbedtls/config_threading.h.in mbedtls/config_threading.h) ++ + if(INSTALL_MBEDTLS_HEADERS) + + file(GLOB headers "mbedtls/*.h") + file(GLOB psa_headers "psa/*.h") ++ ++ set(headers ${headers} ${CMAKE_CURRENT_BINARY_DIR}/mbedtls/config_threading.h) + + install(FILES ${headers} + DESTINATION include/mbedtls +diff --git a/include/mbedtls/mbedtls_config.h b/include/mbedtls/mbedtls_config.h +index 0558ee0..d2fd425 100644 +--- a/include/mbedtls/mbedtls_config.h ++++ b/include/mbedtls/mbedtls_config.h +@@ -24,6 +24,15 @@ + * limitations under the License. + */ + ++#include "mbedtls/config_threading.h" ++ ++#cmakedefine ENABLE_PTHREAD ++ ++#ifdef ENABLE_PTHREAD ++#define MBEDTLS_THREADING_C ++#define MBEDTLS_THREADING_PTHREAD ++#endif ++ + /** + * This is an optional version symbol that enables comatibility handling of + * config files. +diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt +index 07599f5..27e426d 100644 +--- a/library/CMakeLists.txt ++++ b/library/CMakeLists.txt +@@ -189,7 +189,11 @@ if(HAIKU) + endif(HAIKU) + + if(LINK_WITH_PTHREAD) +- set(libs ${libs} pthread) ++ if(WIN32) ++ set(libs ${libs} ${PThreads4W_LIBRARY}) ++ else() ++ set(libs ${libs} pthread) ++ endif() + endif() + + if(LINK_WITH_TRUSTED_STORAGE) diff --git a/ports/mbedtls/portfile.cmake b/ports/mbedtls/portfile.cmake index 669280d1febbad..5c1c84f41bccd3 100644 --- a/ports/mbedtls/portfile.cmake +++ b/ports/mbedtls/portfile.cmake @@ -5,8 +5,8 @@ set(VCPKG_LIBRARY_LINKAGE static) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ARMmbed/mbedtls - REF 8df2f8e7b9c7bb9390ac74bb7bace27edca81a2b # mbedtls-3.0.0 - SHA512 7cc1412664a8e8d35b8d0c578cd2d0fc2b4aee82e1f9583aaf167e4adf893b5fd0c8fd686db11900c13418789e99ee03fc91ea37ac3ef922c28d51f54fa196ad + REF d65aeb37349ad1a50e0f6c9b694d4b5290d60e49 #v3.1.0 + SHA512 a3fde5e6e206d0ab43282502fec45da14f1ccb24974db7a9348a18870d3c07b10fe72419ebf5130cec1b9e819ef804608b0f7b48670f619e328f5b798a8d9eb1 HEAD_REF master PATCHES enable-pthread.patch @@ -28,13 +28,15 @@ vcpkg_cmake_configure( ) vcpkg_cmake_install() -vcpkg_copy_pdbs() + vcpkg_cmake_config_fixup(CONFIG_PATH "CMake") +vcpkg_copy_pdbs() + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) if (VCPKG_TARGET_IS_WINDOWS AND pthreads IN_LIST FEATURES) file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") -endif () \ No newline at end of file +endif () diff --git a/ports/mbedtls/vcpkg.json b/ports/mbedtls/vcpkg.json index 796319105b222b..dafb11878f5fe8 100644 --- a/ports/mbedtls/vcpkg.json +++ b/ports/mbedtls/vcpkg.json @@ -1,6 +1,6 @@ { "name": "mbedtls", - "version": "3.0.0", + "version": "3.1.0", "description": "An open source, portable, easy to use, readable and flexible SSL library", "homepage": "https://github.com/ARMmbed/mbedtls", "supports": "!uwp", From 7992465bd913ab42885334060901fc5d644902f8 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 6 Jan 2022 18:34:00 +0800 Subject: [PATCH 05/15] update version --- versions/baseline.json | 2 +- versions/m-/mbedtls.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index 25649a3cfec470..4f01208723f521 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4325,7 +4325,7 @@ "port-version": 0 }, "mbedtls": { - "baseline": "3.0.0", + "baseline": "3.1.0", "port-version": 0 }, "mcpp": { diff --git a/versions/m-/mbedtls.json b/versions/m-/mbedtls.json index fca7356f72a524..cac44a8067633d 100644 --- a/versions/m-/mbedtls.json +++ b/versions/m-/mbedtls.json @@ -1,8 +1,8 @@ { "versions": [ { - "git-tree": "1253d35afb1cda738ecfaefd4d36dc3e692c7041", - "version": "3.0.0", + "git-tree": "7dba8cab9ca893d1a474235ed289f8ca4815504c", + "version": "3.1.0", "port-version": 0 }, { From b9a9286c2224aa63b4c6f1bcbb13e9b1d44e04a5 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 6 Jan 2022 19:18:56 +0800 Subject: [PATCH 06/15] fix configure_file error --- ports/mbedtls/enable-pthread.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/mbedtls/enable-pthread.patch b/ports/mbedtls/enable-pthread.patch index c7fdbceb29cfc1..e1977964e3ae17 100755 --- a/ports/mbedtls/enable-pthread.patch +++ b/ports/mbedtls/enable-pthread.patch @@ -44,7 +44,7 @@ index e693bc1..7f5216a 100644 @@ -1,9 +1,13 @@ option(INSTALL_MBEDTLS_HEADERS "Install mbed TLS headers." ON) -+configure_file(mbedtls/config_threading.h.in mbedtls/config_threading.h) ++#configure_file(mbedtls/config_threading.h.in mbedtls/config_threading.h) + if(INSTALL_MBEDTLS_HEADERS) From 3eb3c2fd65fab66e0cd72981516c939bed4845c2 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 6 Jan 2022 19:19:20 +0800 Subject: [PATCH 07/15] update version --- versions/m-/mbedtls.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/m-/mbedtls.json b/versions/m-/mbedtls.json index cac44a8067633d..c1a42b55e27f9f 100644 --- a/versions/m-/mbedtls.json +++ b/versions/m-/mbedtls.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "7dba8cab9ca893d1a474235ed289f8ca4815504c", + "git-tree": "3fabf75908c8662c34499dab6e07cca51ca65a97", "version": "3.1.0", "port-version": 0 }, From cff4f3b2817e051b4b0829ac5f850c929aa063a2 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 6 Jan 2022 19:56:12 +0800 Subject: [PATCH 08/15] fix configure_file error --- ports/mbedtls/enable-pthread.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/mbedtls/enable-pthread.patch b/ports/mbedtls/enable-pthread.patch index e1977964e3ae17..e60d8ccf426aaf 100755 --- a/ports/mbedtls/enable-pthread.patch +++ b/ports/mbedtls/enable-pthread.patch @@ -51,7 +51,7 @@ index e693bc1..7f5216a 100644 file(GLOB headers "mbedtls/*.h") file(GLOB psa_headers "psa/*.h") + -+ set(headers ${headers} ${CMAKE_CURRENT_BINARY_DIR}/mbedtls/config_threading.h) ++ #set(headers ${headers} ${CMAKE_CURRENT_BINARY_DIR}/mbedtls/config_threading.h) install(FILES ${headers} DESTINATION include/mbedtls From 6ebf844ee792b41dfdacc77a4502a284a3cfe396 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 6 Jan 2022 19:56:39 +0800 Subject: [PATCH 09/15] update version --- versions/m-/mbedtls.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/m-/mbedtls.json b/versions/m-/mbedtls.json index c1a42b55e27f9f..8285c75ec42b7e 100644 --- a/versions/m-/mbedtls.json +++ b/versions/m-/mbedtls.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "3fabf75908c8662c34499dab6e07cca51ca65a97", + "git-tree": "39e7a2b8fdf00334393aba7615a4538638011dc9", "version": "3.1.0", "port-version": 0 }, From e28701cfb564c8a1b7983be5cf657534ef4f1525 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 6 Jan 2022 21:10:17 +0800 Subject: [PATCH 10/15] fix configure_file error --- ports/mbedtls/enable-pthread.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/mbedtls/enable-pthread.patch b/ports/mbedtls/enable-pthread.patch index e60d8ccf426aaf..e52aa2334b3a96 100755 --- a/ports/mbedtls/enable-pthread.patch +++ b/ports/mbedtls/enable-pthread.patch @@ -44,14 +44,14 @@ index e693bc1..7f5216a 100644 @@ -1,9 +1,13 @@ option(INSTALL_MBEDTLS_HEADERS "Install mbed TLS headers." ON) -+#configure_file(mbedtls/config_threading.h.in mbedtls/config_threading.h) ++ + if(INSTALL_MBEDTLS_HEADERS) file(GLOB headers "mbedtls/*.h") file(GLOB psa_headers "psa/*.h") + -+ #set(headers ${headers} ${CMAKE_CURRENT_BINARY_DIR}/mbedtls/config_threading.h) ++ install(FILES ${headers} DESTINATION include/mbedtls @@ -63,7 +63,7 @@ index 0558ee0..d2fd425 100644 * limitations under the License. */ -+#include "mbedtls/config_threading.h" ++ + +#cmakedefine ENABLE_PTHREAD + @@ -80,7 +80,7 @@ index 07599f5..27e426d 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -189,7 +189,11 @@ if(HAIKU) - endif(HAIKU) + endif(HAIKU) if(LINK_WITH_PTHREAD) - set(libs ${libs} pthread) From c056c4d009f22021ccc24c6cea7bf178646e33b3 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 6 Jan 2022 21:10:40 +0800 Subject: [PATCH 11/15] upadte version --- versions/m-/mbedtls.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/m-/mbedtls.json b/versions/m-/mbedtls.json index 8285c75ec42b7e..22e3b325902589 100644 --- a/versions/m-/mbedtls.json +++ b/versions/m-/mbedtls.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "39e7a2b8fdf00334393aba7615a4538638011dc9", + "git-tree": "7b340b1479e15744592d010fae2298f94d6d3af5", "version": "3.1.0", "port-version": 0 }, From b1870eef4647cb653f7e5186fafeef17cce446ee Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 6 Jan 2022 21:38:39 +0800 Subject: [PATCH 12/15] fix configure_file error --- ports/mbedtls/enable-pthread.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/mbedtls/enable-pthread.patch b/ports/mbedtls/enable-pthread.patch index e52aa2334b3a96..088c2b1701c364 100755 --- a/ports/mbedtls/enable-pthread.patch +++ b/ports/mbedtls/enable-pthread.patch @@ -14,7 +14,7 @@ index 6debe35..64e0674 100644 set(LIB_INSTALL_DIR lib) endif() -+include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/) ++#include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/) + add_subdirectory(include) @@ -44,14 +44,14 @@ index e693bc1..7f5216a 100644 @@ -1,9 +1,13 @@ option(INSTALL_MBEDTLS_HEADERS "Install mbed TLS headers." ON) -+ ++#configure_file(mbedtls/config_threading.h.in mbedtls/config_threading.h) + if(INSTALL_MBEDTLS_HEADERS) file(GLOB headers "mbedtls/*.h") file(GLOB psa_headers "psa/*.h") + -+ ++ #set(headers ${headers} ${CMAKE_CURRENT_BINARY_DIR}/mbedtls/config_threading.h) install(FILES ${headers} DESTINATION include/mbedtls @@ -80,7 +80,7 @@ index 07599f5..27e426d 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -189,7 +189,11 @@ if(HAIKU) - endif(HAIKU) + endif(HAIKU) if(LINK_WITH_PTHREAD) - set(libs ${libs} pthread) From eddc93168758726312b8c516d69ffdc2a2325617 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 6 Jan 2022 21:38:57 +0800 Subject: [PATCH 13/15] update version --- versions/m-/mbedtls.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/m-/mbedtls.json b/versions/m-/mbedtls.json index 22e3b325902589..f0e07a2c0333c2 100644 --- a/versions/m-/mbedtls.json +++ b/versions/m-/mbedtls.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "7b340b1479e15744592d010fae2298f94d6d3af5", + "git-tree": "d166fd001341f0db9228c7ebc0e1ce26b49c492c", "version": "3.1.0", "port-version": 0 }, From 213d49e2cc3ebce158d02194dfaf977981c4d384 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 6 Jan 2022 21:55:17 +0800 Subject: [PATCH 14/15] fix configure_file error --- ports/mbedtls/enable-pthread.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/mbedtls/enable-pthread.patch b/ports/mbedtls/enable-pthread.patch index 088c2b1701c364..ce97c797c0596b 100755 --- a/ports/mbedtls/enable-pthread.patch +++ b/ports/mbedtls/enable-pthread.patch @@ -65,7 +65,7 @@ index 0558ee0..d2fd425 100644 + + -+#cmakedefine ENABLE_PTHREAD ++ + +#ifdef ENABLE_PTHREAD +#define MBEDTLS_THREADING_C From 4ca64918fea6fcd4e917ce6a12a39edfda622bc1 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 6 Jan 2022 21:55:37 +0800 Subject: [PATCH 15/15] update version --- versions/m-/mbedtls.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/m-/mbedtls.json b/versions/m-/mbedtls.json index f0e07a2c0333c2..b0288d0a8d12db 100644 --- a/versions/m-/mbedtls.json +++ b/versions/m-/mbedtls.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "d166fd001341f0db9228c7ebc0e1ce26b49c492c", + "git-tree": "cb24bc09987c40f55865d21693afc27649fbcb85", "version": "3.1.0", "port-version": 0 },