git: 19998317be41 - main - misc/py-onnx: Fix build with protobuf 22+
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 14 Dec 2023 17:03:41 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=19998317be411820e5d183725a39bead3480de7f
commit 19998317be411820e5d183725a39bead3480de7f
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-12-14 16:22:46 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-12-14 17:03:07 +0000
misc/py-onnx: Fix build with protobuf 22+
---
misc/py-onnx/Makefile | 2 +-
misc/py-onnx/files/patch-CMakeLists.txt | 11 ++++++++++-
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()