misc/nn-insight: Fix build for new flatbuffers version and on aarch64

Reported by:	fallout
This commit is contained in:
Yuri Victorovich 2022-09-06 09:26:25 -07:00
parent 258e95b1fa
commit b67c501a4a
2 changed files with 16 additions and 2 deletions

View file

@ -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>

View file

@ -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)