From 3d88aebfb4c994ab70c38f0cbe202390f6d82e9e Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 4 Dec 2024 20:37:58 +0100 Subject: [PATCH] [open62541] Update to 1.3.15, fix android (#42470) --- ports/open62541/android-librt.diff | 13 +++++++++++++ ports/open62541/clang-sanitizer.diff | 12 ++++++++++++ ports/open62541/portfile.cmake | 8 ++++++-- ports/open62541/vcpkg.json | 3 +-- versions/baseline.json | 4 ++-- versions/o-/open62541.json | 5 +++++ 6 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 ports/open62541/android-librt.diff create mode 100644 ports/open62541/clang-sanitizer.diff diff --git a/ports/open62541/android-librt.diff b/ports/open62541/android-librt.diff new file mode 100644 index 0000000000..06bd9f084c --- /dev/null +++ b/ports/open62541/android-librt.diff @@ -0,0 +1,13 @@ +diff --git a/arch/posix/CMakeLists.txt b/arch/posix/CMakeLists.txt +index a53c9f2..badf1e8 100644 +--- a/arch/posix/CMakeLists.txt ++++ b/arch/posix/CMakeLists.txt +@@ -23,7 +23,7 @@ if (${_index} GREATER -1 OR "${UA_ARCHITECTURE}" STREQUAL "posix") + if(UA_MULTITHREADING OR UA_BUILD_UNIT_TESTS) + ua_architecture_append_to_library(pthread) + endif() +- if(NOT APPLE AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")) ++ if(NOT APPLE AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") AND NOT ANDROID) + ua_architecture_append_to_library(rt) + endif() + endif() diff --git a/ports/open62541/clang-sanitizer.diff b/ports/open62541/clang-sanitizer.diff new file mode 100644 index 0000000000..c5a97e7864 --- /dev/null +++ b/ports/open62541/clang-sanitizer.diff @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2c1e4b1..21182cf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -759,6 +759,7 @@ if(NOT UA_FORCE_CPP AND (CMAKE_COMPILER_IS_GNUCC OR "x${CMAKE_C_COMPILER_ID}" ST + + # Debug + if(BUILD_TYPE_LOWER_CASE STREQUAL "debug" AND UNIX AND NOT UA_BUILD_OSS_FUZZ AND ++ UA_ENABLE_DEBUG_SANITIZER AND + "x${CMAKE_C_COMPILER_ID}" STREQUAL "xClang" AND NOT UA_ENABLE_UNIT_TESTS_MEMCHECK) + # Add default sanitizer settings when using clang and Debug build. + # This allows e.g. CLion to find memory locations for SegFaults diff --git a/ports/open62541/portfile.cmake b/ports/open62541/portfile.cmake index 31692bc0cd..caee8c448d 100644 --- a/ports/open62541/portfile.cmake +++ b/ports/open62541/portfile.cmake @@ -1,9 +1,12 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO open62541/open62541 - REF 43afb0471a81c71dfb1d1e33589308762d5a6d18 - SHA512 4c602160baa7ffa464a48f53edcaaaa95bac6933ed40d5113915a04941c0006d0f65267f5ec2462decb0307db5995b8facd3c1d7c4e0e3c3cb9b6f8adb18eb6f + REF v${VERSION} + SHA512 a6493a96e911e4b67dd017125eedf6f3d794a8c931d897e3fdd050a8e65c20dcb84e9dfad207d1fcec6d2f019ad406954d1711827a74c1665fe24cc32f3b019f HEAD_REF master + PATCHES + android-librt.diff + clang-sanitizer.diff ) # disable docs @@ -48,6 +51,7 @@ vcpkg_cmake_configure( ${FEATURE_OPTIONS} ${OPEN62541_ENCRYPTION_OPTIONS} "-DOPEN62541_VERSION=v${VERSION}" + -DUA_ENABLE_DEBUG_SANITIZER=OFF -DUA_MSVC_FORCE_STATIC_CRT=OFF -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON ) diff --git a/ports/open62541/vcpkg.json b/ports/open62541/vcpkg.json index ecc3d729d3..ef55d40a65 100644 --- a/ports/open62541/vcpkg.json +++ b/ports/open62541/vcpkg.json @@ -1,7 +1,6 @@ { "name": "open62541", - "version": "1.3.14", - "port-version": 1, + "version": "1.3.15", "description": "open62541 is an open source C (C99) implementation of OPC UA licensed under the Mozilla Public License v2.0.", "homepage": "https://open62541.org", "license": "MPL-2.0", diff --git a/versions/baseline.json b/versions/baseline.json index 551a12c5ab..98d351cad7 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6613,8 +6613,8 @@ "port-version": 0 }, "open62541": { - "baseline": "1.3.14", - "port-version": 1 + "baseline": "1.3.15", + "port-version": 0 }, "open62541pp": { "baseline": "0.16.0", diff --git a/versions/o-/open62541.json b/versions/o-/open62541.json index 8e38861291..ad096db00f 100644 --- a/versions/o-/open62541.json +++ b/versions/o-/open62541.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "96ef706dfc63eac612ac3a62f5884f88aaba030c", + "version": "1.3.15", + "port-version": 0 + }, { "git-tree": "59654f8355cc95fcb5bbce553890c918356495ab", "version": "1.3.14",