From owner-svn-ports-head@freebsd.org Sun Sep 20 18:14:40 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 096DB3E975E; Sun, 20 Sep 2020 18:14:40 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BvbM36NCLz3cKk; Sun, 20 Sep 2020 18:14:39 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BDEFA21521; Sun, 20 Sep 2020 18:14:39 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08KIEdMU075516; Sun, 20 Sep 2020 18:14:39 GMT (envelope-from yuri@FreeBSD.org) Received: (from yuri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08KIEdJu075514; Sun, 20 Sep 2020 18:14:39 GMT (envelope-from yuri@FreeBSD.org) Message-Id: <202009201814.08KIEdJu075514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuri set sender to yuri@FreeBSD.org using -f From: Yuri Victorovich Date: Sun, 20 Sep 2020 18:14:39 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r549125 - in head/misc/mnn: . files X-SVN-Group: ports-head X-SVN-Commit-Author: yuri X-SVN-Commit-Paths: in head/misc/mnn: . files X-SVN-Commit-Revision: 549125 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Sep 2020 18:14:40 -0000 Author: yuri Date: Sun Sep 20 18:14:38 2020 New Revision: 549125 URL: https://svnweb.freebsd.org/changeset/ports/549125 Log: misc/mnn: Fix build on 13 by unbundling Flatbuffers The bundled Flatbuffers was failing to build on 13 for some reason. Reported by: fallout MFH: 2020Q3 Added: head/misc/mnn/files/patch-CMakeLists.txt (contents, props changed) head/misc/mnn/files/patch-schema_generate.sh (contents, props changed) Modified: head/misc/mnn/Makefile Modified: head/misc/mnn/Makefile ============================================================================== --- head/misc/mnn/Makefile Sun Sep 20 16:52:10 2020 (r549124) +++ head/misc/mnn/Makefile Sun Sep 20 18:14:38 2020 (r549125) @@ -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 \ Added: head/misc/mnn/files/patch-CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/mnn/files/patch-CMakeLists.txt Sun Sep 20 18:14:38 2020 (r549125) @@ -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/ Added: head/misc/mnn/files/patch-schema_generate.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/mnn/files/patch-schema_generate.sh Sun Sep 20 18:14:38 2020 (r549125) @@ -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