aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-09-06 16:26:25 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2022-09-06 16:26:25 +0000
commitb67c501a4aef0f3ee3685028b1c6772fbdb80150 (patch)
treeb2f3278b012c27922f441b789b3b491fd8d36798
parent258e95b1faee70d25f552938ee948972deb83b74 (diff)
downloadports-b67c501a4aef0f3ee3685028b1c6772fbdb80150.tar.gz
ports-b67c501a4aef0f3ee3685028b1c6772fbdb80150.zip
misc/nn-insight: Fix build for new flatbuffers version and on aarch64
Reported by: fallout
-rw-r--r--misc/nn-insight/Makefile7
-rw-r--r--misc/nn-insight/files/patch-CMakeLists.txt11
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)