aboutsummaryrefslogtreecommitdiff
path: root/misc/py-onnx
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-12-14 16:22:46 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-12-14 17:03:07 +0000
commit19998317be411820e5d183725a39bead3480de7f (patch)
treef759650b041ee2d807c484108994dcbb8d5bca30 /misc/py-onnx
parentb4f7ce8773083a30b43cb4ca30ca7c36af5ebc39 (diff)
downloadports-19998317be411820e5d183725a39bead3480de7f.tar.gz
ports-19998317be411820e5d183725a39bead3480de7f.zip
misc/py-onnx: Fix build with protobuf 22+
Diffstat (limited to 'misc/py-onnx')
-rw-r--r--misc/py-onnx/Makefile2
-rw-r--r--misc/py-onnx/files/patch-CMakeLists.txt11
2 files changed, 11 insertions, 2 deletions
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
@@ -21,7 +21,7 @@ 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
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,4 +1,4 @@
---- 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)
@@ -9,3 +9,12 @@
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()