From 89a169117062bc25ee3aee8cc89150c777085d7c Mon Sep 17 00:00:00 2001 From: Chongyun Lee Date: Fri, 23 May 2025 01:30:13 +0800 Subject: [PATCH] python3.12-onnxruntime: bump to 1.22.0 --- .../0001-build-providers.patch | 8 +++---- .../0003-shorten-64-to-32.patch | 22 +++++++++++++++++++ tur-pypi-312/python3.12-onnxruntime/build.sh | 2 +- 3 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 tur-pypi-312/python3.12-onnxruntime/0003-shorten-64-to-32.patch diff --git a/tur-pypi-312/python3.12-onnxruntime/0001-build-providers.patch b/tur-pypi-312/python3.12-onnxruntime/0001-build-providers.patch index 9663c35..cc212bc 100644 --- a/tur-pypi-312/python3.12-onnxruntime/0001-build-providers.patch +++ b/tur-pypi-312/python3.12-onnxruntime/0001-build-providers.patch @@ -1,19 +1,19 @@ --- a/cmake/onnxruntime_providers_cpu.cmake +++ b/cmake/onnxruntime_providers_cpu.cmake -@@ -225,7 +225,6 @@ +@@ -218,7 +218,6 @@ if (NOT onnxruntime_MINIMAL_BUILD AND NOT onnxruntime_EXTENDED_MINIMAL_BUILD - AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin|iOS|visionOS" + AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin|iOS|visionOS|tvOS" - AND NOT CMAKE_SYSTEM_NAME STREQUAL "Android" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") file(GLOB onnxruntime_providers_shared_cc_srcs CONFIGURE_DEPENDS "${ONNXRUNTIME_ROOT}/core/providers/shared/*.h" --- a/cmake/onnxruntime_python.cmake +++ b/cmake/onnxruntime_python.cmake -@@ -707,7 +707,6 @@ +@@ -740,7 +740,6 @@ if (NOT onnxruntime_MINIMAL_BUILD AND NOT onnxruntime_EXTENDED_MINIMAL_BUILD - AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin|iOS|visionOS" + AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin|iOS|visionOS|tvOS" - AND NOT CMAKE_SYSTEM_NAME STREQUAL "Android" AND NOT onnxruntime_USE_ROCM AND NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") diff --git a/tur-pypi-312/python3.12-onnxruntime/0003-shorten-64-to-32.patch b/tur-pypi-312/python3.12-onnxruntime/0003-shorten-64-to-32.patch new file mode 100644 index 0000000..a1a6480 --- /dev/null +++ b/tur-pypi-312/python3.12-onnxruntime/0003-shorten-64-to-32.patch @@ -0,0 +1,22 @@ +--- a/onnxruntime/test/shared_lib/custom_op_utils.cc ++++ b/onnxruntime/test/shared_lib/custom_op_utils.cc +@@ -1,6 +1,11 @@ + // Copyright (c) Microsoft Corporation. All rights reserved. + // Licensed under the MIT License. + ++#if defined(__ANDROID__) && !defined(__LP64__) ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wshorten-64-to-32" ++#endif ++ + #include + #include "gtest/gtest.h" + +@@ -659,3 +664,7 @@ + + return nullptr; + } ++ ++#if defined(__ANDROID__) && !defined(__LP64__) ++#pragma GCC diagnostic pop ++#endif diff --git a/tur-pypi-312/python3.12-onnxruntime/build.sh b/tur-pypi-312/python3.12-onnxruntime/build.sh index 133ed7e..8082c92 100644 --- a/tur-pypi-312/python3.12-onnxruntime/build.sh +++ b/tur-pypi-312/python3.12-onnxruntime/build.sh @@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://onnxruntime.ai/ TERMUX_PKG_DESCRIPTION="Cross-platform, high performance ML inferencing and training accelerator" TERMUX_PKG_LICENSE="MIT" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION="1.21.1" +TERMUX_PKG_VERSION="1.22.0" TERMUX_PKG_SRCURL=git+https://github.com/microsoft/onnxruntime TERMUX_PKG_DEPENDS="libc++, python" TERMUX_PKG_BUILD_DEPENDS="python-numpy"