aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>2017-11-08 13:10:26 +0100
committerArmin Kuster <akuster808@gmail.com>2017-11-19 13:41:58 -0800
commitf888426e9039111c6626c31415c00adfe5af7a9c (patch)
treefc3c3775c36f0c61be019eb8babc88f3c188f538
parentf4da4b7ceb6845fccf28879b411f04dd8a93079c (diff)
downloadmeta-openembedded-f888426e9039111c6626c31415c00adfe5af7a9c.zip
meta-openembedded-f888426e9039111c6626c31415c00adfe5af7a9c.tar.gz
meta-openembedded-f888426e9039111c6626c31415c00adfe5af7a9c.tar.bz2
opencv: Download tinydnn manually
OpenCV was downloading tinydnn during configuration via a script. This patch downloads and unpacks tinydnn manually. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-support/opencv/opencv/tinydnn.patch34
-rw-r--r--meta-oe/recipes-support/opencv/opencv_3.3.bb6
2 files changed, 40 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/opencv/opencv/tinydnn.patch b/meta-oe/recipes-support/opencv/opencv/tinydnn.patch
new file mode 100644
index 0000000..c433fc3
--- /dev/null
+++ b/meta-oe/recipes-support/opencv/opencv/tinydnn.patch
@@ -0,0 +1,34 @@
+Upstream-status: Inappropriate [OE specific]
+
+Signed-off-by: Ricardo Ribalda <ricardo.ribalda@gmail.com>
+diff --git a/modules/dnn_modern/CMakeLists.txt b/modules/dnn_modern/CMakeLists.txt
+index 79b64b12160b..ba06a0a163e4 100644
+--- a/modules/dnn_modern/CMakeLists.txt
++++ b/modules/dnn_modern/CMakeLists.txt
+@@ -15,24 +15,8 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+ # MODULE REQUIREMENTS
+ # ----------------------------------------------------------------------------
+
+-set(TINY_DNN_CPP_PATH "${OpenCV_BINARY_DIR}/3rdparty/tinydnn")
+-set(TINY_DNN_CPP_ROOT "${TINY_DNN_CPP_PATH}/tiny-dnn-1.0.0a3")
+-ocv_download(FILENAME "v1.0.0a3.tar.gz"
+- HASH "adb1c512e09ca2c7a6faef36f9c53e59"
+- URL
+- "${OPENCV_TINY_DNN_URL}"
+- "$ENV{OPENCV_TINY_DNN_URL}"
+- "https://github.com/tiny-dnn/tiny-dnn/archive/"
+- DESTINATION_DIR "${TINY_DNN_CPP_PATH}"
+- STATUS TINY_DNN_DOWNLOAD_SUCCESS
+- ID "tiny-dnn"
+- UNPACK RELATIVE_URL)
+-
+-if(NOT TINY_DNN_DOWNLOAD_SUCCESS)
+- message(STATUS "Failed to download tiny-dnn sources")
+-endif()
+-
+-find_package(TinyDNN QUIET)
++set(TINYDNN_INCLUDE_DIRS "${OpenCV_SOURCE_DIR}/3rdparty/tinydnn/tiny-dnn-1.0.0a3")
++set(TinyDNN_FOUND TRUE)
+
+ include(CheckCXXCompilerFlag)
+ CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
diff --git a/meta-oe/recipes-support/opencv/opencv_3.3.bb b/meta-oe/recipes-support/opencv/opencv_3.3.bb
index 1c398aa..8f0aa7f 100644
--- a/meta-oe/recipes-support/opencv/opencv_3.3.bb
+++ b/meta-oe/recipes-support/opencv/opencv_3.3.bb
@@ -15,6 +15,8 @@ SRCREV_contrib = "2a9d1b22ed76eb22fad1a5edf6faf4d05f207b13"
SRCREV_ipp = "a62e20676a60ee0ad6581e217fe7e4bada3b95db"
SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26"
SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d"
+SRC_URI[tinydnn.md5sum] = "adb1c512e09ca2c7a6faef36f9c53e59"
+SRC_URI[tinydnn.sha256sum] = "e2c61ce8c5debaa644121179e9dbdcf83f497f39de853f8dd5175846505aa18b"
def ipp_filename(d):
import re
@@ -41,9 +43,11 @@ SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \
git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20170418;destsuffix=ipp;name=ipp \
git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc \
git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg \
+ https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz;destsuffix=git/3rdparty/tinydnn/tiny-dnn-1.0.0a3;name=tinydnn;unpack=false \
file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \
file://fixpkgconfig.patch \
file://uselocalxfeatures.patch;patchdir=../contrib/ \
+ file://tinydnn.patch;patchdir=../contrib/ \
file://0002-Make-opencv-ts-create-share-library-intead-of-static.patch \
file://0003-To-fix-errors-as-following.patch \
file://0001-build-workaround-GCC-7.1.1-compilation-issue-with-sa.patch \
@@ -60,6 +64,8 @@ PV = "3.3+git${SRCPV}"
S = "${WORKDIR}/git"
do_unpack_extra() {
+ mkdir -p ${S}/3rdparty/tinydnn/
+ tar xzf ${WORKDIR}/v1.0.0a3.tar.gz -C ${S}/3rdparty/tinydnn/
tar xzf ${WORKDIR}/ipp/ippicv/${IPP_FILENAME} -C ${WORKDIR}
cp ${WORKDIR}/vgg/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src
cp ${WORKDIR}/boostdesc/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src