svn commit: r549394 - in branches/2020Q3/misc/mnn: . files
Yuri Victorovich
yuri at FreeBSD.org
Sun Sep 20 21:07:58 UTC 2020
Author: yuri
Date: Sun Sep 20 21:07:56 2020
New Revision: 549394
URL: https://svnweb.freebsd.org/changeset/ports/549394
Log:
MFH: r549125
misc/mnn: Fix build on 13 by unbundling Flatbuffers
The bundled Flatbuffers was failing to build on 13 for some reason.
Reported by: fallout
Approved by: ports-secteam (joneum)
Added:
branches/2020Q3/misc/mnn/files/patch-CMakeLists.txt
- copied unchanged from r549125, head/misc/mnn/files/patch-CMakeLists.txt
branches/2020Q3/misc/mnn/files/patch-schema_generate.sh
- copied unchanged from r549125, head/misc/mnn/files/patch-schema_generate.sh
Modified:
branches/2020Q3/misc/mnn/Makefile
Directory Properties:
branches/2020Q3/ (props changed)
Modified: branches/2020Q3/misc/mnn/Makefile
==============================================================================
--- branches/2020Q3/misc/mnn/Makefile Sun Sep 20 20:47:21 2020 (r549393)
+++ branches/2020Q3/misc/mnn/Makefile Sun Sep 20 21:07:56 2020 (r549394)
@@ -12,9 +12,10 @@ LICENSE= APACHE20
BROKEN_i386= always_inline function '_mm_set1_ps' requires target feature 'sse', but would be inlined into function 'Vec4' that is compiled without support for 'sse'
-BUILD_DEPENDS= bash:shells/bash
+BUILD_DEPENDS= bash:shells/bash \
+ flatc:devel/flatbuffers
-USES= cmake compiler:c++11-lang shebangfix
+USES= cmake compiler:c++11-lang localbase shebangfix
USE_GITHUB= yes
GH_ACCOUNT= alibaba
GH_PROJECT= MNN
@@ -49,7 +50,7 @@ CMAKE_ARGS+= -DMNN_USE_AVX:BOOL=OFF \
.endif
pre-build: # https://github.com/alibaba/MNN/issues/648
- @cd ${WRKSRC}/schema && ./generate.sh
+ @cd ${WRKSRC}/schema && FREEBSD_FLATC=${LOCALBASE}/bin/flatc ./generate.sh
do-install-APPS-on:
.for f in MNNConvert MNNV2Basic.out mobilenetTest.out backendTest.out testModel.out testModelWithDescrisbe.out getPerformance.out checkInvalidValue.out timeProfile.out quantized.out \
Copied: branches/2020Q3/misc/mnn/files/patch-CMakeLists.txt (from r549125, head/misc/mnn/files/patch-CMakeLists.txt)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2020Q3/misc/mnn/files/patch-CMakeLists.txt Sun Sep 20 21:07:56 2020 (r549394, copy of r549125, head/misc/mnn/files/patch-CMakeLists.txt)
@@ -0,0 +1,10 @@
+--- CMakeLists.txt.orig 2020-09-20 17:36:43 UTC
++++ CMakeLists.txt
+@@ -268,7 +268,6 @@ include_directories(${CMAKE_CURRENT_LIST_DIR}/include/
+ ${CMAKE_CURRENT_LIST_DIR}/source/
+ ${CMAKE_CURRENT_LIST_DIR}/schema/current/
+ ${CMAKE_CURRENT_LIST_DIR}/3rd_party/
+- ${CMAKE_CURRENT_LIST_DIR}/3rd_party/flatbuffers/include
+ ${CMAKE_CURRENT_LIST_DIR}/3rd_party/half
+ ${CMAKE_CURRENT_LIST_DIR}/3rd_party/imageHelper
+ ${CMAKE_CURRENT_LIST_DIR}/3rd_party/OpenCLHeaders/
Copied: branches/2020Q3/misc/mnn/files/patch-schema_generate.sh (from r549125, head/misc/mnn/files/patch-schema_generate.sh)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2020Q3/misc/mnn/files/patch-schema_generate.sh Sun Sep 20 21:07:56 2020 (r549394, copy of r549125, head/misc/mnn/files/patch-schema_generate.sh)
@@ -0,0 +1,20 @@
+--- schema/generate.sh.orig 2020-09-20 17:43:01 UTC
++++ schema/generate.sh
+@@ -9,7 +9,7 @@ if [[ "$1" == "-lazy" ]] && [[ -d current ]]; then
+ fi
+
+ # check is flatbuffer installed or not
+-FLATC=../3rd_party/flatbuffers/tmp/flatc
++FLATC=${FREEBSD_FLATC}
+ if [ ! -e $FLATC ]; then
+ echo "*** building flatc ***"
+
+@@ -39,7 +39,7 @@ rm -f current/*.h
+ # flatc all fbs
+ pushd current > /dev/null
+ echo "*** generating fbs under $DIR ***"
+-find ../$DIR/*.fbs | xargs ../$FLATC -c -b --gen-object-api --reflect-names
++find ../$DIR/*.fbs | xargs $FLATC -c -b --gen-object-api --reflect-names
+ popd > /dev/null
+
+ # finish
More information about the svn-ports-all
mailing list