diff --git a/misc/py-onnxruntime/Makefile b/misc/py-onnxruntime/Makefile index 5ced2db4c40b..4d3a5c167bd4 100644 --- a/misc/py-onnxruntime/Makefile +++ b/misc/py-onnxruntime/Makefile @@ -1,83 +1,83 @@ PORTNAME= onnxruntime DISTVERSIONPREFIX= v DISTVERSION= 1.27.0 -PORTREVISION= 1 +PORTREVISION= 2 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} \ ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}numpy>=1.21.6:math/py-numpy@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=1.21.6:math/py-numpy@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}packaging>=0:devel/py-packaging@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}protobuf>=4.25.8:devel/py-protobuf@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}flatbuffers>=0:devel/py-flatbuffers@${PY_FLAVOR} USES= compiler:c++17-lang python USE_PYTHON= pep517 autoplist concurrent # Build using the official build.py script; wheel is left in ${WRKDIR}/build/Release/dist. PEP517_BUILD_DEPEND= PEP517_INSTALL_CMD= ${PYTHON_CMD} -m installer --destdir ${STAGEDIR} --prefix ${PREFIX} ${WRKDIR}/build/Release/dist/onnxruntime-${DISTVERSION}*.whl 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 \ --enable_pybind \ --build_wheel \ --cmake_extra_defines CMAKE_INSTALL_PREFIX=${PREFIX} \ --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF \ --cmake_extra_defines ONNXRUNTIME_NUMPY_INCLUDE_DIR=${PYTHONPREFIX_SITELIBDIR}/numpy/_core/include # The upstream wheel build does not include the native pybind extension, so # install it alongside the pure-Python files and add it to the autoplist. post-install: ${INSTALL_DATA} ${WRKDIR}/build/Release/onnxruntime/capi/onnxruntime_pybind11_state.so \ ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/onnxruntime/capi/ @${ECHO_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/onnxruntime/capi/onnxruntime_pybind11_state.so \ >> ${_PYTHONPKGLIST} 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 CXXFLAGS_powerpc64le= -Wno-error=deprecated-declarations 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 .include .include diff --git a/misc/py-onnxruntime/Makefile.DISTFILES b/misc/py-onnxruntime/Makefile.DISTFILES index c7ad64e21132..a33ffce525e6 100644 --- a/misc/py-onnxruntime/Makefile.DISTFILES +++ b/misc/py-onnxruntime/Makefile.DISTFILES @@ -1,43 +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 \ + 2f10c9a8d32f81ffeeb6d4885a29cc35d2b0da87.zip:kleidiai_qmx \ duktape-2.7.0.tar.xz:duktape \ v1.4.344:vulkan_headers \