Index: branches/2020Q3/misc/mnn/Makefile =================================================================== --- branches/2020Q3/misc/mnn/Makefile (revision 549393) +++ branches/2020Q3/misc/mnn/Makefile (revision 549394) @@ -1,69 +1,70 @@ # $FreeBSD$ PORTNAME= mnn DISTVERSION= 1.0.0 PORTREVISION= 3 CATEGORIES= misc # machine-learning MAINTAINER= yuri@FreeBSD.org COMMENT= Lightweight deep neural network inference engine 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 SHEBANG_GLOB= *.sh USE_LDCONFIG= yes CXXFLAGS+= -pthread LDFLAGS+= -pthread CFLAGS+= -fPIC # workaround for https://github.com/alibaba/MNN/issues/553 CXXFLAGS+= -fPIC OPTIONS_DEFINE= APPS CONVERTER HARD_FP OPTIONS_DEFAULT= CONVERTER HARD_FP OPTIONS_SUB= yes APPS_DESC= Build ML training, quantization tools APPS_CMAKE_BOOL= MNN_BUILD_QUANTOOLS MNN_BUILD_TOOLS MNN_BUILD_TRAIN CONVERTER_DESC= Build the model converter tool CONVERTER_CMAKE_BOOL= MNN_BUILD_CONVERTER CONVERTER_LIB_DEPENDS= libprotobuf.so:devel/protobuf HARD_FP_DESC= Hard floating point numbers HARD_FP_CMAKE_BOOL= MNN_BUILD_HARD .include .if ${ARCH} != amd64 && ${ARCH} != i386 CMAKE_ARGS+= -DMNN_USE_AVX:BOOL=OFF \ -DMNN_USE_SSE: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 \ transformer.out train.out rawDataTransform.out dataTransformer.out runTrainDemo.out ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${f} ${STAGEDIR}${PREFIX}/bin .endfor do-install-CONVERTER-on: ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/MNNConvert ${STAGEDIR}${PREFIX}/bin do-test: @cd ${BUILD_WRKSRC} && \ ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -DMNN_BUILD_TEST:BOOL=ON ${CMAKE_SOURCE_PATH} && \ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \ cd ${BUILD_WRKSRC} && ./run_test.out .include Index: branches/2020Q3/misc/mnn/files/patch-CMakeLists.txt =================================================================== --- branches/2020Q3/misc/mnn/files/patch-CMakeLists.txt (nonexistent) +++ branches/2020Q3/misc/mnn/files/patch-CMakeLists.txt (revision 549394) @@ -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/ Property changes on: branches/2020Q3/misc/mnn/files/patch-CMakeLists.txt ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2020Q3/misc/mnn/files/patch-schema_generate.sh =================================================================== --- branches/2020Q3/misc/mnn/files/patch-schema_generate.sh (nonexistent) +++ branches/2020Q3/misc/mnn/files/patch-schema_generate.sh (revision 549394) @@ -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 Property changes on: branches/2020Q3/misc/mnn/files/patch-schema_generate.sh ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2020Q3 =================================================================== --- branches/2020Q3 (revision 549393) +++ branches/2020Q3 (revision 549394) Property changes on: branches/2020Q3 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r549125