git: b67c501a4aef - main - misc/nn-insight: Fix build for new flatbuffers version and on aarch64
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 06 Sep 2022 16:28:01 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=b67c501a4aef0f3ee3685028b1c6772fbdb80150
commit b67c501a4aef0f3ee3685028b1c6772fbdb80150
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-09-06 16:26:25 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-09-06 16:26:25 +0000
misc/nn-insight: Fix build for new flatbuffers version and on aarch64
Reported by: fallout
---
misc/nn-insight/Makefile | 7 +++++--
misc/nn-insight/files/patch-CMakeLists.txt | 11 +++++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/misc/nn-insight/Makefile b/misc/nn-insight/Makefile
index 6203e7a50326..a5ba3f8a1956 100644
--- a/misc/nn-insight/Makefile
+++ b/misc/nn-insight/Makefile
@@ -1,5 +1,6 @@
PORTNAME= nn-insight
DISTVERSION= 1.0.7
+PORTREVISION= 1
CATEGORIES= misc # machine-learning
MAINTAINER= yuri@FreeBSD.org
@@ -25,11 +26,13 @@ USE_QT= core gui svg widgets buildtools_build qmake_build
USE_GITHUB= yes
GH_ACCOUNT= yurivict
-CMAKE_ARGS_aarch64= -DENABLE_NATIVE_OPTIMIZATIONS=OFF
-
PLIST_FILES= bin/nn-insight \
libexec/nn-insight/tf-lite-plugin.so
PORTSCOUT= limit:^.*[1-9]\. # prevent hashes
+OPTIONS_DEFINE= NATIVE
+NATIVE_DESC= Build with native optimizations (-march=native)
+NATIVE_CMAKE_BOOL= ENABLE_NATIVE_OPTIMIZATIONS
+
.include <bsd.port.mk>
diff --git a/misc/nn-insight/files/patch-CMakeLists.txt b/misc/nn-insight/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..7efb2696accb
--- /dev/null
+++ b/misc/nn-insight/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig 2022-09-06 16:20:58 UTC
++++ CMakeLists.txt
+@@ -63,7 +63,7 @@ find_path(HALF_PRECISION half.hpp)
+ if (NOT HALF_PRECISION)
+ message(FATAL_ERROR "Failed to find the half-precision floating point library (half.hpp)")
+ endif()
+-find_package(Flatbuffers REQUIRED)
++find_package(FlatBuffers REQUIRED)
+ pkg_check_modules(libcgraph libgvc REQUIRED IMPORTED_TARGET libcgraph)
+ if (USE_PERFTOOLS)
+ pkg_check_modules(libtcmalloc REQUIRED IMPORTED_TARGET libtcmalloc)