diff --git a/misc/py-onnx/Makefile b/misc/py-onnx/Makefile index ef62aca59178..2ca2a40f231a 100644 --- a/misc/py-onnx/Makefile +++ b/misc/py-onnx/Makefile @@ -1,36 +1,36 @@ PORTNAME= onnx DISTVERSION= 1.14.1 CATEGORIES= misc # machine-learning MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= yuri@FreeBSD.org COMMENT= Open Neural Network eXchange WWW= https://onnx.ai/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= bash:shells/bash \ cmake:devel/cmake-core \ protoc-gen-mypy:devel/py-mypy-protobuf@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pybind11>0:devel/py-pybind11@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytest-runner>=0:devel/py-pytest-runner@${PY_FLAVOR} LIB_DEPENDS= libprotobuf.so:devel/protobuf RUN_DEPENDS= ${PYNUMPY} \ ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}typing-extensions>=3.6.2.1:devel/py-typing-extensions@${PY_FLAVOR} -USES= compiler:c11 python shebangfix +USES= compiler:c++17-lang python shebangfix USE_PYTHON= distutils concurrent autoplist CXXFLAGS+= -Dstat64=stat SHEBANG_FILES= tools/protoc-gen-mypy.sh.in BINARY_ALIAS= python=${PYTHON_CMD} post-install: @${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/onnx/onnx_cpp2py_export*.so .include diff --git a/misc/py-onnx/files/patch-CMakeLists.txt b/misc/py-onnx/files/patch-CMakeLists.txt index 57ed278e4e2f..07e389904c09 100644 --- a/misc/py-onnx/files/patch-CMakeLists.txt +++ b/misc/py-onnx/files/patch-CMakeLists.txt @@ -1,11 +1,20 @@ ---- CMakeLists.txt.orig 2023-04-12 23:29:41 UTC +--- CMakeLists.txt.orig 2023-08-08 18:33:06 UTC +++ CMakeLists.txt @@ -18,7 +18,7 @@ project(onnx C CXX) option(ONNX_BUILD_BENCHMARKS "Build ONNX micro-benchmarks" OFF) option(ONNX_USE_PROTOBUF_SHARED_LIBS "Build ONNX using protobuf shared library. Sets PROTOBUF_USE_DLLS CMAKE Flag and Protobuf_USE_STATIC_LIBS. " OFF) -option(BUILD_ONNX_PYTHON "Build Python binaries" OFF) +option(BUILD_ONNX_PYTHON "Build Python binaries" ON) option(ONNX_GEN_PB_TYPE_STUBS "Generate protobuf python type stubs" ON) option(ONNX_WERROR "Build with Werror" OFF) option(ONNX_COVERAGE "Build with coverage instrumentation" OFF) +@@ -58,7 +58,7 @@ endif() + # Required to use /std:c++17 or higher on Windows + # For other platforms, set C++11 as standard for the whole project + if(NOT MSVC) +- set(CMAKE_CXX_STANDARD 11) ++ set(CMAKE_CXX_STANDARD 17) + else() + string(APPEND CMAKE_CXX_FLAGS " /std:c++17") + endif()