git: 60661f3d3dad - main - misc/py-onnxruntime: New port: Cross-platform, high performance ML inferencing & training accelerator
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 03 Jul 2026 06:31:15 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=60661f3d3dada77944ee7932428712e4be5a0583
commit 60661f3d3dada77944ee7932428712e4be5a0583
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-07-03 03:59:11 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-07-03 06:31:10 +0000
misc/py-onnxruntime: New port: Cross-platform, high performance ML inferencing & training accelerator
---
misc/Makefile | 1 +
misc/py-onnxruntime/Makefile | 63 +++++++++++
misc/py-onnxruntime/Makefile.DISTFILES | 43 ++++++++
misc/py-onnxruntime/Makefile.MASTER_SITES | 43 ++++++++
misc/py-onnxruntime/distinfo | 93 ++++++++++++++++
misc/py-onnxruntime/files/convert-deps.sh | 32 ++++++
.../patch-onnxruntime_core_common_spin__pause.cc | 11 ++
.../patch-onnxruntime_core_platform_posix_env.cc | 44 ++++++++
misc/py-onnxruntime/pkg-descr | 14 +++
misc/py-onnxruntime/pkg-plist | 121 +++++++++++++++++++++
10 files changed, 465 insertions(+)
diff --git a/misc/Makefile b/misc/Makefile
index d28378ad36ba..2fb31e849e97 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -573,6 +573,7 @@
SUBDIR += py-onnx
SUBDIR += py-onnx-tf
SUBDIR += py-onnxconverter-common
+ SUBDIR += py-onnxruntime
SUBDIR += py-openai
SUBDIR += py-openai-harmony
SUBDIR += py-openai-whisper
diff --git a/misc/py-onnxruntime/Makefile b/misc/py-onnxruntime/Makefile
new file mode 100644
index 000000000000..213710c006d0
--- /dev/null
+++ b/misc/py-onnxruntime/Makefile
@@ -0,0 +1,63 @@
+PORTNAME= onnxruntime
+DISTVERSIONPREFIX= v
+DISTVERSION= 1.27.0
+CATEGORIES= misc # machine-learning
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DIST_SUBDIR= ${PORTNAME}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Cross-platform, high performance ML inferencing & training accelerator
+WWW= https://onnxruntime.ai/ \
+ https://github.com/microsoft/onnxruntime
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= cmake:devel/cmake-core \
+ ${PYTHON_PKGNAMEPREFIX}packaging>=0:devel/py-packaging@${PY_FLAVOR}
+
+USES= compiler:c++17-lang python
+
+# Build using the official build.py script
+do-build:
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
+ ${PYTHON_CMD} tools/ci_build/build.py \
+ --build_dir ${WRKDIR}/build \
+ --config Release \
+ --parallel \
+ --skip_tests \
+ --skip_submodule_sync \
+ --allow_running_as_root \
+ --cmake_extra_defines CMAKE_INSTALL_PREFIX=${PREFIX} \
+ --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF
+
+do-install:
+ cd ${WRKDIR}/build/Release && ${SETENV} ${MAKE_ENV} \
+ ${MAKE_CMD} install DESTDIR=${STAGEDIR}
+
+USE_GITHUB= yes
+GH_ACCOUNT= microsoft
+GH_TUPLE= emscripten-core:emsdk:0742117:emsdk/cmake/external/emsdk \
+ google:libprotobuf-mutator:7a2ed51a6b682a83e345ff49fc4cfd7ca47550db:libprotobuf_mutator/cmake/external/libprotobuf-mutator \
+ onnx:onnx:b8baa8446686496da4cc8fda09f2b6fe65c2a02c:onnx/cmake/external/onnx
+
+CXXFLAGS+= -Wno-array-bounds # workaround for https://github.com/microsoft/onnxruntime/issues/23410
+CXXFLAGS+= -I${WRKSRC}/include/onnxruntime/core/common/logging # otherwise logging.h isn't found
+
+DEPS_FILE= ${WRKSRC}/cmake/deps.txt
+
+CONFLICTS_BUILD= abseil benchmark nsync googletest dlpack flatbuffers gsl mimalloc \
+ nlohmann-json onnx protobuf psimd pthreadpool pybind11 re2
+
+dev-update-deps-in-makefiles: extract # this should be run when the port is updated
+ @${FILESDIR}/convert-deps.sh ${DEPS_FILE}
+
+post-patch:
+ @${FIND} ${WRKSRC}/cmake/external -name "*.cmake" -exec ${REINPLACE_CMD} -e 's|--binary ||g' {} +
+
+pre-configure:
+ @${REINPLACE_CMD} -E 's|;(https://.*)/([^/]+\.zip);|;file://${DISTDIR}/${DIST_SUBDIR}/\2;|' ${DEPS_FILE}
+
+.include <Makefile.MASTER_SITES>
+.include <Makefile.DISTFILES>
+.include <bsd.port.mk>
diff --git a/misc/py-onnxruntime/Makefile.DISTFILES b/misc/py-onnxruntime/Makefile.DISTFILES
new file mode 100644
index 000000000000..c7ad64e21132
--- /dev/null
+++ b/misc/py-onnxruntime/Makefile.DISTFILES
@@ -0,0 +1,43 @@
+DISTFILES= \
+ 20250814.0.zip:abseil_cpp \
+ 7.1.zip:coremltools \
+ 3c73d91c0b04e2b59462f0a741be8c07024c1bc0.zip:cxxopts \
+ v3.0.1.zip:date \
+ 5c210da409e7f1e51ddf445134a4376fdbd70d7d.zip:dlpack \
+ eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip:eigen \
+ v23.5.26.zip:flatbuffers \
+ 0a92994d729ff76a58f692d3028ca1b64b145d91.zip:fp16 \
+ 63058eff77e11aa15bf531df5dd34395ec3017c8.zip:fxdiv \
+ v1.8.5.zip:google_benchmark \
+ v1.17.0.zip:googletest \
+ 3cf85e705098622d59056dcb8f5f963ea7bb0a00.zip:googlexnnpack \
+ v3.11.3.zip:json \
+ v4.2.1.zip:microsoft_gsl \
+ v1.0.250325.1.zip:microsoft_wil \
+ v2.1.1.zip:mimalloc \
+ boost-1.82.0.zip:mp11 \
+ v1.21.0.zip:onnx \
+ d5dce67db7c2e64b07e055571f5ec06f7f254de2.zip:onnx_tensorrt \
+ v21.12.zip:protobuf \
+ protoc-21.12-win64.zip:protoc_win64 \
+ protoc-21.12-win32.zip:protoc_win32 \
+ protoc-21.12-linux-x86_64.zip:protoc_linux_x64 \
+ protoc-21.12-linux-x86_32.zip:protoc_linux_x86 \
+ protoc-21.12-linux-aarch_64.zip:protoc_linux_aarch64 \
+ protoc-21.12-osx-universal_binary.zip:protoc_mac_universal \
+ 072586a71b55b7f8c584153d223e95687148a900.zip:psimd \
+ dcc9f28589066af0dbd4555579281230abbf74dd.zip:pthreadpool \
+ v3.0.2.zip:pybind11 \
+ 403d652dca4c1046e8145950b1c0997a9f748b57.zip:pytorch_cpuinfo \
+ 2024-07-02.zip:re2 \
+ 3.0.28.zip:safeint \
+ 373eb09e4c5d2b3cc2493f0949dc4be6b6a45e81.zip:tensorboard \
+ v4.4.2.zip:cutlass \
+ c24b7bab0c12f53da76d0c31b03b9f0f8ec8f3b4.zip:extensions \
+ v1.613.1.zip:directx_headers \
+ v1.12.0.zip:cudnn_frontend \
+ ec7b457e5bb1fcec6f59733c4f3dd84d2f885a38.zip:dawn \
+ v1.20.0.tar.gz:kleidiai \
+ 2f10c9a8d32f81ffeeb6d4885a29cc35d2b0da87.zip:kleidiai-qmx \
+ duktape-2.7.0.tar.xz:duktape \
+ v1.4.344:vulkan_headers \
diff --git a/misc/py-onnxruntime/Makefile.MASTER_SITES b/misc/py-onnxruntime/Makefile.MASTER_SITES
new file mode 100644
index 000000000000..cf2e3aba36ef
--- /dev/null
+++ b/misc/py-onnxruntime/Makefile.MASTER_SITES
@@ -0,0 +1,43 @@
+MASTER_SITES= \
+ https://github.com/abseil/abseil-cpp/archive/refs/tags/:abseil_cpp \
+ https://github.com/apple/coremltools/archive/refs/tags/:coremltools \
+ https://github.com/jarro2783/cxxopts/archive/:cxxopts \
+ https://github.com/HowardHinnant/date/archive/refs/tags/:date \
+ https://github.com/dmlc/dlpack/archive/:dlpack \
+ https://github.com/eigen-mirror/eigen/archive/1d8b82b0740839c0de7f1242a3585e3390ff5f33/:eigen \
+ https://github.com/google/flatbuffers/archive/refs/tags/:flatbuffers \
+ https://github.com/Maratyszcza/FP16/archive/:fp16 \
+ https://github.com/Maratyszcza/FXdiv/archive/:fxdiv \
+ https://github.com/google/benchmark/archive/refs/tags/:google_benchmark \
+ https://github.com/google/googletest/archive/refs/tags/:googletest \
+ https://github.com/google/XNNPACK/archive/:googlexnnpack \
+ https://github.com/nlohmann/json/archive/refs/tags/:json \
+ https://github.com/microsoft/GSL/archive/refs/tags/:microsoft_gsl \
+ https://github.com/microsoft/wil/archive/refs/tags/:microsoft_wil \
+ https://github.com/microsoft/mimalloc/archive/refs/tags/:mimalloc \
+ https://github.com/boostorg/mp11/archive/refs/tags/:mp11 \
+ https://github.com/onnx/onnx/archive/refs/tags/:onnx \
+ https://github.com/onnx/onnx-tensorrt/archive/:onnx_tensorrt \
+ https://github.com/protocolbuffers/protobuf/archive/refs/tags/:protobuf \
+ https://github.com/protocolbuffers/protobuf/releases/download/v21.12/:protoc_win64 \
+ https://github.com/protocolbuffers/protobuf/releases/download/v21.12/:protoc_win32 \
+ https://github.com/protocolbuffers/protobuf/releases/download/v21.12/:protoc_linux_x64 \
+ https://github.com/protocolbuffers/protobuf/releases/download/v21.12/:protoc_linux_x86 \
+ https://github.com/protocolbuffers/protobuf/releases/download/v21.12/:protoc_linux_aarch64 \
+ https://github.com/protocolbuffers/protobuf/releases/download/v21.12/:protoc_mac_universal \
+ https://github.com/Maratyszcza/psimd/archive/:psimd \
+ https://github.com/google/pthreadpool/archive/:pthreadpool \
+ https://github.com/pybind/pybind11/archive/refs/tags/:pybind11 \
+ https://github.com/pytorch/cpuinfo/archive/:pytorch_cpuinfo \
+ https://github.com/google/re2/archive/refs/tags/:re2 \
+ https://github.com/dcleblanc/SafeInt/archive/refs/tags/:safeint \
+ https://github.com/tensorflow/tensorboard/archive/:tensorboard \
+ https://github.com/NVIDIA/cutlass/archive/refs/tags/:cutlass \
+ https://github.com/microsoft/onnxruntime-extensions/archive/:extensions \
+ https://github.com/microsoft/DirectX-Headers/archive/refs/tags/:directx_headers \
+ https://github.com/NVIDIA/cudnn-frontend/archive/refs/tags/:cudnn_frontend \
+ https://github.com/google/dawn/archive/:dawn \
+ https://github.com/ARM-software/kleidiai/archive/refs/tags/:kleidiai \
+ https://github.com/qualcomm/kleidiai/archive/:kleidiai_qmx \
+ https://github.com/svaarala/duktape/releases/download/v2.7.0/:duktape \
+ https://codeload.github.com/KhronosGroup/Vulkan-Headers/tar.gz/refs/tags/:vulkan_headers \
diff --git a/misc/py-onnxruntime/distinfo b/misc/py-onnxruntime/distinfo
new file mode 100644
index 000000000000..bfb2ebe5b8bf
--- /dev/null
+++ b/misc/py-onnxruntime/distinfo
@@ -0,0 +1,93 @@
+TIMESTAMP = 1783043785
+SHA256 (onnxruntime/20250814.0.zip) = b2bdcf6682d8cb53df365bcc5d6c318a22e55821d9978a10fdb61404c026daff
+SIZE (onnxruntime/20250814.0.zip) = 3194036
+SHA256 (onnxruntime/7.1.zip) = a9a95d3b3d1cbf9b9e00c145bcae4050f89042dc5b777635421dcdaf85010890
+SIZE (onnxruntime/7.1.zip) = 20043908
+SHA256 (onnxruntime/3c73d91c0b04e2b59462f0a741be8c07024c1bc0.zip) = 57b5f012372d4c0e0a975b2e534e9af647cd20530fc72f73a75a61e05e0f997e
+SIZE (onnxruntime/3c73d91c0b04e2b59462f0a741be8c07024c1bc0.zip) = 98330
+SHA256 (onnxruntime/v3.0.1.zip) = f4300b96f7a304d4ef9bf6e0fa3ded72159f7f2d0f605bdde3e030a0dba7cf9f
+SIZE (onnxruntime/v3.0.1.zip) = 941286
+SHA256 (onnxruntime/5c210da409e7f1e51ddf445134a4376fdbd70d7d.zip) = 14e8b3f03ab7461f56b3fa7ffd4acfb6e6a65f895dc4b50548cab259229afcbd
+SIZE (onnxruntime/5c210da409e7f1e51ddf445134a4376fdbd70d7d.zip) = 228363
+SHA256 (onnxruntime/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip) = 6a60d76351f97132669daeeb721d6bf14b008101883ad2d687a3201c5c461eb0
+SIZE (onnxruntime/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.zip) = 4075744
+SHA256 (onnxruntime/v23.5.26.zip) = 57bd580c0772fd1a726c34ab8bf05325293bc5f9c165060a898afa1feeeb95e1
+SIZE (onnxruntime/v23.5.26.zip) = 3209602
+SHA256 (onnxruntime/0a92994d729ff76a58f692d3028ca1b64b145d91.zip) = e66e65515fa09927b348d3d584c68be4215cfe664100d01c9dbc7655a5716d70
+SIZE (onnxruntime/0a92994d729ff76a58f692d3028ca1b64b145d91.zip) = 91373
+SHA256 (onnxruntime/63058eff77e11aa15bf531df5dd34395ec3017c8.zip) = 3d7b0e9c4c658a84376a1086126be02f9b7f753caa95e009d9ac38d11da444db
+SIZE (onnxruntime/63058eff77e11aa15bf531df5dd34395ec3017c8.zip) = 16646
+SHA256 (onnxruntime/v1.8.5.zip) = 39f57865cdbfa06f02ae91ea76465246046cc47d5908aa5a3abeb9026fb73dcc
+SIZE (onnxruntime/v1.8.5.zip) = 327614
+SHA256 (onnxruntime/v1.17.0.zip) = 40d4ec942217dcc84a9ebe2a68584ada7d4a33a8ee958755763278ea1c5e18ff
+SIZE (onnxruntime/v1.17.0.zip) = 1114942
+SHA256 (onnxruntime/3cf85e705098622d59056dcb8f5f963ea7bb0a00.zip) = e4af7bc17f1e0bce0e83098af24c3c3c2ade70351c2e29318aff1404a8974544
+SIZE (onnxruntime/3cf85e705098622d59056dcb8f5f963ea7bb0a00.zip) = 22580852
+SHA256 (onnxruntime/v3.11.3.zip) = 04022b05d806eb5ff73023c280b68697d12b93e1b7267a0b22a1a39ec7578069
+SIZE (onnxruntime/v3.11.3.zip) = 8489998
+SHA256 (onnxruntime/v4.2.1.zip) = c9291d95f5f6e5c561990d06a589b01d89e553d0f366f0ce723dd1788e7a6076
+SIZE (onnxruntime/v4.2.1.zip) = 84222
+SHA256 (onnxruntime/v1.0.250325.1.zip) = 48f7fdc3c7d0b284efae783c1266836b61b63fd0c94749098a60dc8ec78b0725
+SIZE (onnxruntime/v1.0.250325.1.zip) = 577341
+SHA256 (onnxruntime/v2.1.1.zip) = 23b1bffb2eff57b1e3cb8edc9410d448db2bb43400206a151e107dcabcad773a
+SIZE (onnxruntime/v2.1.1.zip) = 1301043
+SHA256 (onnxruntime/boost-1.82.0.zip) = 81431bdc44c439a324e02c07ed067f8f556419fd86f2d8b486ff568df6aac899
+SIZE (onnxruntime/boost-1.82.0.zip) = 232716
+SHA256 (onnxruntime/v1.21.0.zip) = b8b56570d94ecce49fee94e6380db456bb42035722b967015c9dd6459359433e
+SIZE (onnxruntime/v1.21.0.zip) = 18072652
+SHA256 (onnxruntime/d5dce67db7c2e64b07e055571f5ec06f7f254de2.zip) = 5b5c8ea250104d7f21c2f6ebf3c7f69cbcd9201960a69ad1b9019789d306f437
+SIZE (onnxruntime/d5dce67db7c2e64b07e055571f5ec06f7f254de2.zip) = 245171
+SHA256 (onnxruntime/v21.12.zip) = 6a31b662deaeb0ac35e6287bda2f3369b19836e6c9f8828d4da444346f420298
+SIZE (onnxruntime/v21.12.zip) = 7180794
+SHA256 (onnxruntime/protoc-21.12-win64.zip) = 71852a30cf62975358edfcbbff93086e8857a079c8e4d6904881aa968d65c7f9
+SIZE (onnxruntime/protoc-21.12-win64.zip) = 2278456
+SHA256 (onnxruntime/protoc-21.12-win32.zip) = 6de4ef4e65c7edb834a2a9fca6d85388adc5dd71fc8bff8b60569717d01dabea
+SIZE (onnxruntime/protoc-21.12-win32.zip) = 2306903
+SHA256 (onnxruntime/protoc-21.12-linux-x86_64.zip) = 3a4c1e5f2516c639d3079b1586e703fc7bcfa2136d58bda24d1d54f949c315e8
+SIZE (onnxruntime/protoc-21.12-linux-x86_64.zip) = 1585982
+SHA256 (onnxruntime/protoc-21.12-linux-x86_32.zip) = dd4b5972cb3de92bfff9d7d3b361a7c281d27a010c8872d1e6efc43895253f71
+SIZE (onnxruntime/protoc-21.12-linux-x86_32.zip) = 1692297
+SHA256 (onnxruntime/protoc-21.12-linux-aarch_64.zip) = 2dd17f75d66a682640b136e31848da9fb2eefe68d55303baf8b32617374f6711
+SIZE (onnxruntime/protoc-21.12-linux-aarch_64.zip) = 1582596
+SHA256 (onnxruntime/protoc-21.12-osx-universal_binary.zip) = 1acab3d1f774d120d5a38bccb78fd379d35226b254dc258978bc45593478ca4c
+SIZE (onnxruntime/protoc-21.12-osx-universal_binary.zip) = 2822292
+SHA256 (onnxruntime/072586a71b55b7f8c584153d223e95687148a900.zip) = dc615342bcbe51ca885323e51b68b90ed9bb9fa7df0f4419dbfa0297d5e837b7
+SIZE (onnxruntime/072586a71b55b7f8c584153d223e95687148a900.zip) = 8327
+SHA256 (onnxruntime/dcc9f28589066af0dbd4555579281230abbf74dd.zip) = b193fcb18abf0d5bdb989968ccd8e274ae0ce8d89b0f1a61763582fb716b259c
+SIZE (onnxruntime/dcc9f28589066af0dbd4555579281230abbf74dd.zip) = 104991
+SHA256 (onnxruntime/v3.0.2.zip) = e3754d16ea536bdc968ce1464fa822e198a1217881d31bd9bf3d287fed2bbf4c
+SIZE (onnxruntime/v3.0.2.zip) = 1112516
+SHA256 (onnxruntime/403d652dca4c1046e8145950b1c0997a9f748b57.zip) = 357d9824b8d3f4c05f0b2287e45b4e0d982422c27b67b968eb23a643dc52b5e2
+SIZE (onnxruntime/403d652dca4c1046e8145950b1c0997a9f748b57.zip) = 3853314
+SHA256 (onnxruntime/2024-07-02.zip) = a835fe55fbdcd8e80f38584ab22d0840662c67f2feb36bd679402da9641dc71e
+SIZE (onnxruntime/2024-07-02.zip) = 451539
+SHA256 (onnxruntime/3.0.28.zip) = 3ffbd9a2fdff45da77da3e7269e9aa512ea43bed5c38ce8fd8f3d1068a032c3f
+SIZE (onnxruntime/3.0.28.zip) = 626378
+SHA256 (onnxruntime/373eb09e4c5d2b3cc2493f0949dc4be6b6a45e81.zip) = c7c77b30e7056dc77c067ec70fce24e80a927522b973ebefac33888ba18b5a7d
+SIZE (onnxruntime/373eb09e4c5d2b3cc2493f0949dc4be6b6a45e81.zip) = 76560689
+SHA256 (onnxruntime/v4.4.2.zip) = 313ed4c54613f21da80153db4bebc7cdbdef259f56e9551cce0a394d1e9e8b5b
+SIZE (onnxruntime/v4.4.2.zip) = 48209463
+SHA256 (onnxruntime/c24b7bab0c12f53da76d0c31b03b9f0f8ec8f3b4.zip) = d0af92533f33344ef7291d18b2cb3300d512650e710f2eaff540519a6a6a2d65
+SIZE (onnxruntime/c24b7bab0c12f53da76d0c31b03b9f0f8ec8f3b4.zip) = 83551041
+SHA256 (onnxruntime/v1.613.1.zip) = c356d242e63f6c8e6fa8dec01f7d526b172621f0f6687611239f772095842e4c
+SIZE (onnxruntime/v1.613.1.zip) = 472978
+SHA256 (onnxruntime/v1.12.0.zip) = c64ccc6493019220e7c42deb15a7c73f12f3d276d7dc6f882af06adf51a8a7e7
+SIZE (onnxruntime/v1.12.0.zip) = 904346
+SHA256 (onnxruntime/ec7b457e5bb1fcec6f59733c4f3dd84d2f885a38.zip) = 4046fc60d9956fd9621ae6ce9148fb81a36b9b54e69952e735c4315909dc56dd
+SIZE (onnxruntime/ec7b457e5bb1fcec6f59733c4f3dd84d2f885a38.zip) = 94578448
+SHA256 (onnxruntime/v1.20.0.tar.gz) = e4b84c369f0f39af1660ac71c30f74038d4b89e1f20dde070bb96398382a111f
+SIZE (onnxruntime/v1.20.0.tar.gz) = 2372189
+SHA256 (onnxruntime/2f10c9a8d32f81ffeeb6d4885a29cc35d2b0da87.zip) = ee43dee0fac9a641f87285fa357c5db3849aa7a4955e86f6818390313e610e5e
+SIZE (onnxruntime/2f10c9a8d32f81ffeeb6d4885a29cc35d2b0da87.zip) = 2994473
+SHA256 (onnxruntime/duktape-2.7.0.tar.xz) = 90f8d2fa8b5567c6899830ddef2c03f3c27960b11aca222fa17aa7ac613c2890
+SIZE (onnxruntime/duktape-2.7.0.tar.xz) = 1026524
+SHA256 (onnxruntime/v1.4.344) = 88b86b441eed931fb4cba595aff46fbb14177d72274c1554411d6bbd2117e86f
+SIZE (onnxruntime/v1.4.344) = 3018460
+SHA256 (onnxruntime/microsoft-onnxruntime-v1.27.0_GH0.tar.gz) = b41d09905a3c2f3a25709d1dcce8ef3942a4c2799d1046f74be7b6bbebc45e6a
+SIZE (onnxruntime/microsoft-onnxruntime-v1.27.0_GH0.tar.gz) = 285714570
+SHA256 (onnxruntime/emscripten-core-emsdk-0742117_GH0.tar.gz) = ebd5a51e31742e6ae1d11271bd5d84c2083623b746b98ef5b32adf6e223d48b8
+SIZE (onnxruntime/emscripten-core-emsdk-0742117_GH0.tar.gz) = 114343
+SHA256 (onnxruntime/google-libprotobuf-mutator-7a2ed51a6b682a83e345ff49fc4cfd7ca47550db_GH0.tar.gz) = d51365191580c4bf5e9ff104eebcfe34f7ff5f471006d7a460c15dcb3657501c
+SIZE (onnxruntime/google-libprotobuf-mutator-7a2ed51a6b682a83e345ff49fc4cfd7ca47550db_GH0.tar.gz) = 38336
+SHA256 (onnxruntime/onnx-onnx-b8baa8446686496da4cc8fda09f2b6fe65c2a02c_GH0.tar.gz) = b741da9ecd0021df2d5bcd5ee73c5b9d88f8d870df7b489fa4b15ef6951e9a13
+SIZE (onnxruntime/onnx-onnx-b8baa8446686496da4cc8fda09f2b6fe65c2a02c_GH0.tar.gz) = 12464148
diff --git a/misc/py-onnxruntime/files/convert-deps.sh b/misc/py-onnxruntime/files/convert-deps.sh
new file mode 100755
index 000000000000..48368219321c
--- /dev/null
+++ b/misc/py-onnxruntime/files/convert-deps.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+set -euo pipefail
+
+# args
+deps_file="$1"
+
+# initialize Makefile.xx files
+echo "MASTER_SITES= \\" > Makefile.MASTER_SITES
+echo "DISTFILES= \\" > Makefile.DISTFILES
+
+# loop
+cat $deps_file | grep -v "^#" | (while read -r line; do
+ line=$(echo $line | sed -e 's|;| |g')
+ #echo "LINE $line"
+
+ # extract fields
+ name=$(echo $line | sed -e 's| .*||')
+ url=$(echo $line | sed -e "s|$name ||; s| .*||")
+ #echo "... name=$name url=$url"
+
+ # split url
+ url_split=$(echo $url | sed -E 's|(.*)/([^/]+)|\1 \2|')
+ #echo "... url_split=$url_split"
+ url_dir=$(echo $url_split | sed -e 's| .*||')
+ url_file=$(echo $url_split | sed -e 's|.* ||')
+ #echo "... url_dir=$url_dir url_file=$url_file"
+
+ # write Makefile.xx files
+ echo " $url_dir/:$name \\" >> Makefile.MASTER_SITES
+ echo " $url_file:$name \\" >> Makefile.DISTFILES
+done)
diff --git a/misc/py-onnxruntime/files/patch-onnxruntime_core_common_spin__pause.cc b/misc/py-onnxruntime/files/patch-onnxruntime_core_common_spin__pause.cc
new file mode 100644
index 000000000000..af251a80aad8
--- /dev/null
+++ b/misc/py-onnxruntime/files/patch-onnxruntime_core_common_spin__pause.cc
@@ -0,0 +1,11 @@
+--- onnxruntime/core/common/spin_pause.cc.orig 2026-06-12 15:12:02 UTC
++++ onnxruntime/core/common/spin_pause.cc
+@@ -34,7 +34,7 @@ void SpinPause() {
+ !defined(__APPLE__)
+
+ static const bool has_tpause = CPUIDInfo::GetCPUIDInfo().HasTPAUSE();
+- static constexpr uint64_t tpause_spin_delay_cycles = 1000;
++ //static constexpr uint64_t tpause_spin_delay_cycles = 1000; // unused variable error breaking the build
+ if (has_tpause) {
+ #if defined(_WIN32) || defined(__WAITPKG__)
+ _tpause(0x0, __rdtsc() + tpause_spin_delay_cycles);
diff --git a/misc/py-onnxruntime/files/patch-onnxruntime_core_platform_posix_env.cc b/misc/py-onnxruntime/files/patch-onnxruntime_core_platform_posix_env.cc
new file mode 100644
index 000000000000..368bcab7d772
--- /dev/null
+++ b/misc/py-onnxruntime/files/patch-onnxruntime_core_platform_posix_env.cc
@@ -0,0 +1,44 @@
+--- onnxruntime/core/platform/posix/env.cc.orig 2026-06-12 15:12:02 UTC
++++ onnxruntime/core/platform/posix/env.cc
+@@ -20,6 +20,7 @@ limitations under the License.
+ #include <dlfcn.h>
+ #include <fcntl.h>
+ #include <ftw.h>
++#include <pthread_np.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <stdio.h>
+@@ -219,13 +220,13 @@ class PosixThread : public EnvThread {
+ }
+ auto ret = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
+ if (0 == ret) {
+- LOGS_DEFAULT(VERBOSE) << "pthread_setaffinity_np succeed for thread: " << syscall(SYS_gettid)
++ LOGS_DEFAULT(VERBOSE) << "pthread_setaffinity_np succeed for thread: " << ::pthread_self()
+ << ", index: " << p->index
+ << ", mask: " << *p->affinity;
+ } else {
+ errno = ret;
+ auto [err_no, err_msg] = GetErrnoInfo();
+- LOGS_DEFAULT(ERROR) << "pthread_setaffinity_np failed for thread: " << syscall(SYS_gettid)
++ LOGS_DEFAULT(ERROR) << "pthread_setaffinity_np failed for thread: " << ::pthread_self()
+ << ", index: " << p->index
+ << ", mask: " << *p->affinity
+ << ", error code: " << err_no << " error msg: " << err_msg
+@@ -267,7 +268,7 @@ class PosixEnv : public Env {
+
+ // Return the number of physical cores
+ int GetNumPhysicalCpuCores() const override {
+-#ifdef ORT_USE_CPUINFO
++#if defined(ORT_USE_CPUINFO) && defined(__linux__)
+ if (cpuinfo_available_) {
+ return narrow<int>(cpuinfo_get_cores_count());
+ }
+@@ -640,7 +641,7 @@ class PosixEnv : public Env {
+
+ private:
+ Telemetry telemetry_provider_;
+-#ifdef ORT_USE_CPUINFO
++#if defined(ORT_USE_CPUINFO) && defined(__linux__)
+ PosixEnv() {
+ cpuinfo_available_ = cpuinfo_initialize();
+ if (!cpuinfo_available_) {
diff --git a/misc/py-onnxruntime/pkg-descr b/misc/py-onnxruntime/pkg-descr
new file mode 100644
index 000000000000..8674f6be2e8e
--- /dev/null
+++ b/misc/py-onnxruntime/pkg-descr
@@ -0,0 +1,14 @@
+ONNX Runtime is a cross-platform inference and training machine-learning
+accelerator.
+
+ONNX Runtime inference can enable faster customer experiences and lower costs,
+supporting models from deep learning frameworks such as PyTorch and
+TensorFlow/Keras as well as classical machine learning libraries such as
+scikit-learn, LightGBM, XGBoost, etc. ONNX Runtime is compatible with different
+hardware, drivers, and operating systems, and provides optimal performance by
+leveraging hardware accelerators where applicable alongside graph optimizations
+and transforms.
+
+ONNX Runtime training can accelerate the model training time on multi-node
+NVIDIA GPUs for transformer models with a one-line addition for existing PyTorch
+training scripts.
diff --git a/misc/py-onnxruntime/pkg-plist b/misc/py-onnxruntime/pkg-plist
new file mode 100644
index 000000000000..49428b44319c
--- /dev/null
+++ b/misc/py-onnxruntime/pkg-plist
@@ -0,0 +1,121 @@
+include/onnxruntime/core/common/basic_types.h
+include/onnxruntime/core/common/code_location.h
+include/onnxruntime/core/common/common.h
+include/onnxruntime/core/common/const_pointer_container.h
+include/onnxruntime/core/common/denormal.h
+include/onnxruntime/core/common/eigen_common_wrapper.h
+include/onnxruntime/core/common/endian.h
+include/onnxruntime/core/common/exceptions.h
+include/onnxruntime/core/common/float16.h
+include/onnxruntime/core/common/float8.h
+include/onnxruntime/core/common/gpu_profiler_common.h
+include/onnxruntime/core/common/hash_combine.h
+include/onnxruntime/core/common/inlined_containers.h
+include/onnxruntime/core/common/inlined_containers_fwd.h
+include/onnxruntime/core/common/logging/capture.h
+include/onnxruntime/core/common/logging/isink.h
+include/onnxruntime/core/common/logging/logging.h
+include/onnxruntime/core/common/logging/macros.h
+include/onnxruntime/core/common/logging/severity.h
+include/onnxruntime/core/common/logging/sink_types.h
+include/onnxruntime/core/common/make_string.h
+include/onnxruntime/core/common/narrow.h
+include/onnxruntime/core/common/optional.h
+include/onnxruntime/core/common/parse_string.h
+include/onnxruntime/core/common/profiler_common.h
+include/onnxruntime/core/common/span_utils.h
+include/onnxruntime/core/common/spin_pause.h
+include/onnxruntime/core/common/status.h
+include/onnxruntime/core/common/string_helper.h
+include/onnxruntime/core/framework/alloc_kind.h
+include/onnxruntime/core/framework/allocator.h
+include/onnxruntime/core/framework/buffer_deleter.h
+include/onnxruntime/core/framework/customregistry.h
+include/onnxruntime/core/framework/data_types.h
+include/onnxruntime/core/framework/data_types_internal.h
+include/onnxruntime/core/framework/execution_provider.h
+include/onnxruntime/core/framework/float4.h
+include/onnxruntime/core/framework/framework_common.h
+include/onnxruntime/core/framework/framework_provider_common.h
+include/onnxruntime/core/framework/func_api.h
+include/onnxruntime/core/framework/int2.h
+include/onnxruntime/core/framework/int4.h
+include/onnxruntime/core/framework/kernel_def_builder.h
+include/onnxruntime/core/framework/kernel_registry.h
+include/onnxruntime/core/framework/op_kernel.h
+include/onnxruntime/core/framework/op_kernel_context.h
+include/onnxruntime/core/framework/op_kernel_info.h
+include/onnxruntime/core/framework/op_node_proto_helper.h
+include/onnxruntime/core/framework/ort_value.h
+include/onnxruntime/core/framework/ortdevice.h
+include/onnxruntime/core/framework/ortmemoryinfo.h
+include/onnxruntime/core/framework/provider_options.h
+include/onnxruntime/core/framework/provider_options_utils.h
+include/onnxruntime/core/framework/provider_shutdown.h
+include/onnxruntime/core/framework/resource_accountant.h
+include/onnxruntime/core/framework/run_options.h
+include/onnxruntime/core/framework/sparse_tensor.h
+include/onnxruntime/core/framework/stream_handles.h
+include/onnxruntime/core/framework/tensor.h
+include/onnxruntime/core/framework/tensor_shape.h
+include/onnxruntime/core/framework/to_tensor_proto_element_type.h
+include/onnxruntime/core/graph/basic_types.h
+include/onnxruntime/core/graph/constants.h
+include/onnxruntime/core/graph/function.h
+include/onnxruntime/core/graph/graph.h
+include/onnxruntime/core/graph/graph_nodes.h
+include/onnxruntime/core/graph/graph_viewer.h
+include/onnxruntime/core/graph/indexed_sub_graph.h
+include/onnxruntime/core/graph/model_saving_options.h
+include/onnxruntime/core/graph/node_arg.h
+include/onnxruntime/core/graph/onnx_protobuf.h
+include/onnxruntime/core/graph/schema_registry.h
+include/onnxruntime/core/optimizer/graph_transformer.h
+include/onnxruntime/core/optimizer/graph_transformer_config.h
+include/onnxruntime/core/optimizer/graph_transformer_level.h
+include/onnxruntime/core/optimizer/graph_transformer_utils.h
+include/onnxruntime/core/optimizer/rewrite_rule.h
+include/onnxruntime/core/optimizer/rule_based_graph_transformer.h
+include/onnxruntime/core/providers/custom_op_context.h
+include/onnxruntime/core/providers/resource.h
+include/onnxruntime/core/session/environment.h
+include/onnxruntime/core/session/experimental_onnxruntime_cxx_api.h
+include/onnxruntime/core/session/experimental_onnxruntime_cxx_inline.h
+include/onnxruntime/core/session/onnxruntime_c_api.h
+include/onnxruntime/core/session/onnxruntime_cxx_api.h
+include/onnxruntime/core/session/onnxruntime_cxx_inline.h
+include/onnxruntime/core/session/onnxruntime_env_config_keys.h
+include/onnxruntime/core/session/onnxruntime_ep_c_api.h
+include/onnxruntime/core/session/onnxruntime_ep_device_ep_metadata_keys.h
+include/onnxruntime/core/session/onnxruntime_float16.h
+include/onnxruntime/core/session/onnxruntime_lite_custom_op.h
+include/onnxruntime/core/session/onnxruntime_run_options_config_keys.h
+include/onnxruntime/core/session/onnxruntime_session_options_config_keys.h
+include/onnxruntime/core/session/snippets.dox
+include/onnxruntime/cpu_provider_factory.h
+include/onnxruntime/onnxruntime_c_api.h
+include/onnxruntime/onnxruntime_cxx_api.h
+include/onnxruntime/onnxruntime_cxx_inline.h
+include/onnxruntime/onnxruntime_env_config_keys.h
+include/onnxruntime/onnxruntime_ep_c_api.h
+include/onnxruntime/onnxruntime_ep_device_ep_metadata_keys.h
+include/onnxruntime/onnxruntime_float16.h
+include/onnxruntime/onnxruntime_lite_custom_op.h
+include/onnxruntime/onnxruntime_run_options_config_keys.h
+include/onnxruntime/onnxruntime_session_options_config_keys.h
+lib/libonnxruntime_common.a
+lib/libonnxruntime_flatbuffers.a
+lib/libonnxruntime_framework.a
+lib/libonnxruntime_graph.a
+lib/libonnxruntime_lora.a
+lib/libonnxruntime_mlas.a
+lib/libonnxruntime_optimizer.a
+lib/libonnxruntime_providers.a
+lib/libonnxruntime_providers_shared.so
+lib/libonnxruntime_session.a
+lib/libonnxruntime_util.a
+lib/cmake/onnxruntime/onnxruntimeConfig.cmake
+lib/cmake/onnxruntime/onnxruntimeConfigVersion.cmake
+lib/cmake/onnxruntime/onnxruntimeTargets-release.cmake
+lib/cmake/onnxruntime/onnxruntimeTargets.cmake
+libdata/pkgconfig/libonnxruntime.pc