summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>2020-11-03 19:44:24 -0800
committerSai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>2020-11-03 19:44:24 -0800
commitd7ba6a9308c075fc1080ecb7fa58e42e1891638a (patch)
tree91c79132de9e8b3bf70da4c9e3783228824fc2e2
parent7c2d5aa29a410f9fec49cb5240dc7382333bbe33 (diff)
downloadmeta-xilinx-d7ba6a9308c075fc1080ecb7fa58e42e1891638a.tar.gz
opencv_3.4.3: Remove support for opencv 3.4
Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>
-rw-r--r--meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3.bb188
-rw-r--r--meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch36
-rw-r--r--meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-Add-missing-multi-line-separator.patch36
-rw-r--r--meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-Check-for-clang-before-using-isystem.patch32
-rw-r--r--meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-Dont-use-isystem.patch28
-rw-r--r--meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch31
-rw-r--r--meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0002-Make-opencv-ts-create-share-library-intead-of-static.patch24
-rw-r--r--meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0003-To-fix-errors-as-following.patch70
-rw-r--r--meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/fixpkgconfig.patch30
-rw-r--r--meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/uselocalxfeatures.patch20
10 files changed, 0 insertions, 495 deletions
diff --git a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3.bb b/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3.bb
deleted file mode 100644
index e5d83706..00000000
--- a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3.bb
+++ /dev/null
@@ -1,188 +0,0 @@
1SUMMARY = "Opencv : The Open Computer Vision Library"
2HOMEPAGE = "http://opencv.org/"
3SECTION = "libs"
4
5FILESEXTRAPATHS_prepend := "${THISDIR}/opencv_3.4.3:"
6
7LICENSE = "BSD-3-Clause"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=62d89c5dcb0583609ea919c56be0ee76"
9
10ARM_INSTRUCTION_SET_armv4 = "arm"
11ARM_INSTRUCTION_SET_armv5 = "arm"
12
13DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp"
14
15SRCREV_opencv = "b38c50b3d0c31e82294315ec44b54b7ef559ef12"
16SRCREV_contrib = "1f6d6f06266e1ef336437ae5404bee1c65d42cda"
17SRCREV_ipp = "bdb7bb85f34a8cb0d35e40a81f58da431aa1557a"
18SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26"
19SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d"
20
21def ipp_filename(d):
22 import re
23 arch = d.getVar('TARGET_ARCH', True)
24 if re.match("i.86$", arch):
25 return "ippicv_2017u3_lnx_ia32_general_20180518.tgz"
26 else:
27 return "ippicv_2017u3_lnx_intel64_general_20180518.tgz"
28
29def ipp_md5sum(d):
30 import re
31 arch = d.getVar('TARGET_ARCH', True)
32 if re.match("i.86$", arch):
33 return "ea72de74dae3c604eb6348395366e78e"
34 else:
35 return "b7cc351267db2d34b9efa1cd22ff0572"
36
37IPP_FILENAME = "${@ipp_filename(d)}"
38IPP_MD5 = "${@ipp_md5sum(d)}"
39
40SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg"
41SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \
42 git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib \
43 git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20180518;destsuffix=ipp;name=ipp \
44 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc \
45 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg \
46 file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \
47 file://uselocalxfeatures.patch;patchdir=../contrib/ \
48 file://0001-Add-missing-multi-line-separator.patch;patchdir=../contrib/ \
49 file://0002-Make-opencv-ts-create-share-library-intead-of-static.patch \
50 file://0003-To-fix-errors-as-following.patch \
51 file://fixpkgconfig.patch \
52 file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \
53 file://0001-Dont-use-isystem.patch \
54 file://0001-Check-for-clang-before-using-isystem.patch \
55"
56PV = "3.4.3+git${SRCPV}"
57
58S = "${WORKDIR}/git"
59
60do_unpack_extra() {
61 tar xzf ${WORKDIR}/ipp/ippicv/${IPP_FILENAME} -C ${WORKDIR}
62 cp ${WORKDIR}/vgg/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src
63 cp ${WORKDIR}/boostdesc/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src
64}
65addtask unpack_extra after do_unpack before do_patch
66
67EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \
68 -DWITH_1394=OFF \
69 -DENABLE_PRECOMPILED_HEADERS=OFF \
70 -DCMAKE_SKIP_RPATH=ON \
71 -DOPENCV_ICV_HASH=${IPP_MD5} \
72 -DIPPROOT=${WORKDIR}/ippicv_lnx \
73 ${@bb.utils.contains("TARGET_CC_ARCH", "-msse3", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1", "", d)} \
74 ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)} \
75 ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.2", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1 -DENABLE_SSE42=1", "", d)} \
76 ${@oe.utils.conditional("libdir", "/usr/lib64", "-DLIB_SUFFIX=64", "", d)} \
77 ${@oe.utils.conditional("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "", d)} \
78"
79EXTRA_OECMAKE_append_x86 = " -DX86=ON"
80
81PACKAGECONFIG ??= "python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \
82 ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)} \
83 ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "libav", "", d)}"
84
85PACKAGECONFIG[amdblas] = "-DWITH_OPENCLAMDBLAS=ON,-DWITH_OPENCLAMDBLAS=OFF,libclamdblas,"
86PACKAGECONFIG[amdfft] = "-DWITH_OPENCLAMDFFT=ON,-DWITH_OPENCLAMDFFT=OFF,libclamdfft,"
87PACKAGECONFIG[eigen] = "-DWITH_EIGEN=ON,-DWITH_EIGEN=OFF,libeigen gflags glog,"
88PACKAGECONFIG[freetype] = "-DBUILD_opencv_freetype=ON,-DBUILD_opencv_freetype=OFF,freetype,"
89PACKAGECONFIG[gphoto2] = "-DWITH_GPHOTO2=ON,-DWITH_GPHOTO2=OFF,libgphoto2,"
90PACKAGECONFIG[gstreamer] = "-DWITH_GSTREAMER=ON,-DWITH_GSTREAMER=OFF,gstreamer1.0 gstreamer1.0-plugins-base,"
91PACKAGECONFIG[gtk] = "-DWITH_GTK=ON,-DWITH_GTK=OFF,gtk+3,"
92PACKAGECONFIG[jasper] = "-DWITH_JASPER=ON,-DWITH_JASPER=OFF,jasper,"
93PACKAGECONFIG[java] = "-DJAVA_INCLUDE_PATH=${JAVA_HOME}/include -DJAVA_INCLUDE_PATH2=${JAVA_HOME}/include/linux -DJAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include -DJAVA_AWT_LIBRARY=${JAVA_HOME}/lib/amd64/libjawt.so -DJAVA_JVM_LIBRARY=${JAVA_HOME}/lib/amd64/server/libjvm.so,,ant-native fastjar-native openjdk-8-native,"
94PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON,-DWITH_JPEG=OFF,jpeg,"
95PACKAGECONFIG[libav] = "-DWITH_FFMPEG=ON,-DWITH_FFMPEG=OFF,libav,"
96PACKAGECONFIG[libv4l] = "-DWITH_LIBV4L=ON,-DWITH_LIBV4L=OFF,v4l-utils,"
97PACKAGECONFIG[opencl] = "-DWITH_OPENCL=ON,-DWITH_OPENCL=OFF,opencl-headers virtual/opencl-icd,"
98PACKAGECONFIG[oracle-java] = "-DJAVA_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_INCLUDE_PATH2=${ORACLE_JAVA_HOME}/include/linux -DJAVA_AWT_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_AWT_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/libjawt.so -DJAVA_JVM_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/server/libjvm.so,,ant-native oracle-jse-jdk oracle-jse-jdk-native,"
99PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng,"
100PACKAGECONFIG[python2] = "-DPYTHON2_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python-numpy,"
101PACKAGECONFIG[python3] = "-DPYTHON3_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python3-numpy,"
102PACKAGECONFIG[samples] = "-DBUILD_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON,-DBUILD_EXAMPLES=OFF,,"
103PACKAGECONFIG[tbb] = "-DWITH_TBB=ON,-DWITH_TBB=OFF,tbb,"
104PACKAGECONFIG[text] = "-DBUILD_opencv_text=ON,-DBUILD_opencv_text=OFF,tesseract,"
105PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff,"
106PACKAGECONFIG[v4l] = "-DWITH_V4L=ON,-DWITH_V4L=OFF,v4l-utils,"
107
108inherit pkgconfig cmake
109
110inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'distutils3-base', '', d)}
111inherit ${@bb.utils.contains('PACKAGECONFIG', 'python2', 'distutils-base', '', d)}
112
113export PYTHON_CSPEC="-I${STAGING_INCDIR}/${PYTHON_DIR}"
114export PYTHON="${STAGING_BINDIR_NATIVE}/${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3', 'python', d)}"
115export ORACLE_JAVA_HOME="${STAGING_DIR_NATIVE}/usr/bin/java"
116export JAVA_HOME="${STAGING_DIR_NATIVE}/usr/lib/jvm/openjdk-8-native"
117export ANT_DIR="${STAGING_DIR_NATIVE}/usr/share/ant/"
118
119TARGET_CC_ARCH += "-I${S}/include "
120
121PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'samples', '${PN}-samples', '', d)} \
122 ${@bb.utils.contains('PACKAGECONFIG', 'oracle-java', '${PN}-java', '', d)} \
123 ${@bb.utils.contains('PACKAGECONFIG', 'java', '${PN}-java', '', d)} \
124 ${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python-${BPN}', '', d)} \
125 ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-${BPN}', '', d)} \
126 ${PN}-apps"
127
128python populate_packages_prepend () {
129 cv_libdir = d.expand('${libdir}')
130 do_split_packages(d, cv_libdir, '^lib(.*)\.so$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev', allow_links=True)
131 do_split_packages(d, cv_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
132 do_split_packages(d, cv_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
133 do_split_packages(d, cv_libdir, '^lib(.*)\.so\.*', 'lib%s', 'OpenCV %s library', extra_depends='', allow_links=True)
134
135 pn = d.getVar('PN')
136 metapkg = pn + '-dev'
137 d.setVar('ALLOW_EMPTY_' + metapkg, "1")
138 blacklist = [ metapkg ]
139 metapkg_rdepends = [ ]
140 packages = d.getVar('PACKAGES').split()
141 for pkg in packages[1:]:
142 if not pkg in blacklist and not pkg in metapkg_rdepends and pkg.endswith('-dev'):
143 metapkg_rdepends.append(pkg)
144 d.setVar('RRECOMMENDS_' + metapkg, ' '.join(metapkg_rdepends))
145
146 metapkg = pn
147 d.setVar('ALLOW_EMPTY_' + metapkg, "1")
148 blacklist = [ metapkg, "libopencv-ts" ]
149 metapkg_rdepends = [ ]
150 for pkg in packages[1:]:
151 if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.endswith('-doc') and not pkg.endswith('-locale') and not pkg.endswith('-staticdev'):
152 metapkg_rdepends.append(pkg)
153 d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends))
154}
155
156PACKAGES_DYNAMIC += "^libopencv-.*"
157
158FILES_${PN} = ""
159FILES_${PN}-dbg += "${datadir}/OpenCV/java/.debug/* ${datadir}/OpenCV/samples/bin/.debug/*"
160FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig ${datadir}/OpenCV/*.cmake"
161FILES_${PN}-staticdev += "${datadir}/OpenCV/3rdparty/lib/*.a"
162FILES_${PN}-apps = "${bindir}/* ${datadir}/OpenCV"
163FILES_${PN}-java = "${datadir}/OpenCV/java"
164FILES_${PN}-samples = "${datadir}/OpenCV/samples/"
165
166INSANE_SKIP_${PN}-java = "libdir"
167INSANE_SKIP_${PN}-dbg = "libdir"
168
169ALLOW_EMPTY_${PN} = "1"
170
171SUMMARY_python-opencv = "Python bindings to opencv"
172FILES_python-opencv = "${PYTHON_SITEPACKAGES_DIR}/*"
173RDEPENDS_python-opencv = "python-core python-numpy"
174
175SUMMARY_python3-opencv = "Python bindings to opencv"
176FILES_python3-opencv = "${PYTHON_SITEPACKAGES_DIR}/*"
177RDEPENDS_python3-opencv = "python3-core python3-numpy"
178
179do_install_append() {
180 cp ${S}/include/opencv/*.h ${D}${includedir}/opencv/
181 sed -i '/blobtrack/d' ${D}${includedir}/opencv/cvaux.h
182
183 # Move Python files into correct library folder (for multilib build)
184 if [ "$libdir" != "/usr/lib" -a -d ${D}/usr/lib ]; then
185 mv ${D}/usr/lib/* ${D}/${libdir}/
186 rm -rf ${D}/usr/lib
187 fi
188}
diff --git a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch b/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch
deleted file mode 100644
index 5f909c1a..00000000
--- a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1From 85b882b4ceb57fe6538f47af58d0a970923fde0e Mon Sep 17 00:00:00 2001
2From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
3Date: Thu, 31 Mar 2016 00:20:15 +0200
4Subject: [PATCH] 3rdparty/ippicv: Use pre-downloaded ipp
5
6Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
7Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
8
9---
10 3rdparty/ippicv/ippicv.cmake | 15 +--------------
11 1 file changed, 1 insertion(+), 14 deletions(-)
12
13diff --git a/3rdparty/ippicv/ippicv.cmake b/3rdparty/ippicv/ippicv.cmake
14index ae8748c..305abdb 100644
15--- a/3rdparty/ippicv/ippicv.cmake
16+++ b/3rdparty/ippicv/ippicv.cmake
17@@ -39,18 +39,5 @@ function(download_ippicv root_var)
18 endif()
19
20 set(THE_ROOT "${OpenCV_BINARY_DIR}/3rdparty/ippicv")
21- ocv_download(FILENAME ${OPENCV_ICV_NAME}
22- HASH ${OPENCV_ICV_HASH}
23- URL
24- "${OPENCV_IPPICV_URL}"
25- "$ENV{OPENCV_IPPICV_URL}"
26- "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_COMMIT}/ippicv/"
27- DESTINATION_DIR "${THE_ROOT}"
28- ID IPPICV
29- STATUS res
30- UNPACK RELATIVE_URL)
31-
32- if(res)
33- set(${root_var} "${THE_ROOT}/${OPENCV_ICV_PACKAGE_SUBDIR}" PARENT_SCOPE)
34- endif()
35+ set(${root_var} "${THE_ROOT}/${OPENCV_ICV_PACKAGE_SUBDIR}" PARENT_SCOPE)
36 endfunction()
diff --git a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-Add-missing-multi-line-separator.patch b/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-Add-missing-multi-line-separator.patch
deleted file mode 100644
index aa196a5f..00000000
--- a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-Add-missing-multi-line-separator.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1From 60857229aab13ccc426572a43ab891409bb76ea4 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 9 Sep 2018 22:52:55 -0700
4Subject: [PATCH] Add missing multi-line separator
5
6Otherwise this fails to build ( found on mips )
7
8Fixes
9contrib/modules/surface_matching/src/hash_murmur86.hpp:97:15: error:
10expected constructor, destructor, or type conversion before '(' token
11 && defined(__GNUC__) && (__GNUC__>4 || (__GNUC__==4 &&
12__GNUC_MINOR__>=3))
13 ^
14
15Upstream-Status: Submitted [https://github.com/opencv/opencv_contrib/pull/1764]
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 modules/surface_matching/src/hash_murmur86.hpp | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/modules/surface_matching/src/hash_murmur86.hpp b/modules/surface_matching/src/hash_murmur86.hpp
22index 1edf6bf4..0477d37e 100644
23--- a/modules/surface_matching/src/hash_murmur86.hpp
24+++ b/modules/surface_matching/src/hash_murmur86.hpp
25@@ -93,7 +93,7 @@ void hashMurmurx86 ( const void * key, const int len, const uint seed, void * ou
26 /* Now find best way we can to READ_UINT32 */
27 #ifndef WORDS_BIGENDIAN
28 # define READ_UINT32(ptr) (*((uint32_t*)(ptr)))
29-#elif defined(WORDS_BIGENDIAN)
30+#elif defined(WORDS_BIGENDIAN) \
31 && defined(__GNUC__) && (__GNUC__>4 || (__GNUC__==4 && __GNUC_MINOR__>=3))
32 # define READ_UINT32(ptr) (__builtin_bswap32(*((uint32_t*)(ptr))))
33 #endif
34--
352.18.0
36
diff --git a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-Check-for-clang-before-using-isystem.patch b/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-Check-for-clang-before-using-isystem.patch
deleted file mode 100644
index fe784330..00000000
--- a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-Check-for-clang-before-using-isystem.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From fa76d8646bb2b9b514728eeef41afed7c43a36f2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 11 Sep 2018 18:18:33 -0700
4Subject: [PATCH] Check for clang before using -isystem
5
6When cross compiling with clang, the internal C++ headers are not found
7when adding sysroot to -isystem, that is redundant anyway because it
8will look for headers insider --sysroot path with same quality as it
9would do with -isystem otherwise
10
11Upstream-Status: Submitted [https://github.com/opencv/opencv/pull/12504]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 cmake/OpenCVUtils.cmake | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake
18index fae91c165f..60c20192dc 100644
19--- a/cmake/OpenCVUtils.cmake
20+++ b/cmake/OpenCVUtils.cmake
21@@ -259,7 +259,7 @@ function(ocv_include_directories)
22 ocv_is_opencv_directory(__is_opencv_dir "${dir}")
23 if(__is_opencv_dir)
24 list(APPEND __add_before "${dir}")
25- elseif(CV_GCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0" AND
26+ elseif(((CV_GCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0") OR CV_CLANG) AND
27 dir MATCHES "/usr/include$")
28 # workaround for GCC 6.x bug
29 else()
30--
312.18.0
32
diff --git a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-Dont-use-isystem.patch b/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-Dont-use-isystem.patch
deleted file mode 100644
index 40d3f53e..00000000
--- a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-Dont-use-isystem.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From 9659f5a1e75fc29c9879c301767bba72ecf9042a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 11 Sep 2018 00:21:18 -0700
4Subject: [PATCH] Dont use isystem
5
6clang really does not like it
7
8Upstream-Status: Pending
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11
12---
13 cmake/OpenCVPCHSupport.cmake | 2 ++
14 1 file changed, 2 insertions(+)
15
16diff --git a/cmake/OpenCVPCHSupport.cmake b/cmake/OpenCVPCHSupport.cmake
17index 59bc826..055dfce 100644
18--- a/cmake/OpenCVPCHSupport.cmake
19+++ b/cmake/OpenCVPCHSupport.cmake
20@@ -18,6 +18,8 @@ IF(CV_GCC)
21 SET(PCHSupport_FOUND TRUE)
22 ENDIF()
23
24+ SET(CMAKE_INCLUDE_SYSTEM_FLAG_C "-I")
25+ SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-I")
26 SET(_PCH_include_prefix "-I")
27 SET(_PCH_isystem_prefix "-isystem")
28 SET(_PCH_define_prefix "-D")
diff --git a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch b/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch
deleted file mode 100644
index f8ccd1d5..00000000
--- a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From fe27d0e2341683606704115949d16250e4cacbfa Mon Sep 17 00:00:00 2001
2From: Jason Wessel <jason.wessel@windriver.com>
3Date: Wed, 9 May 2018 13:33:59 -0700
4Subject: [PATCH] Temporarliy work around deprecated ffmpeg RAW function
5 compile failure until next uprev
6
7Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
8
9---
10 modules/videoio/src/cap_ffmpeg_impl.hpp | 8 ++++++++
11 1 file changed, 8 insertions(+)
12
13diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp
14index 0d360ad..566df66 100644
15--- a/modules/videoio/src/cap_ffmpeg_impl.hpp
16+++ b/modules/videoio/src/cap_ffmpeg_impl.hpp
17@@ -736,6 +736,14 @@ struct ImplMutex::Impl
18
19 #endif
20
21+/* NOTE This is deprecated in ffmpeg and the code should be removed */
22+#ifndef AVFMT_RAWPICTURE
23+#define AVFMT_RAWPICTURE 0x0020
24+#endif /* AVFMT_RAWPICTURE */
25+#ifndef CODEC_FLAG_GLOBAL_HEADER
26+#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
27+#endif
28+
29 void ImplMutex::init()
30 {
31 impl = new Impl();
diff --git a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0002-Make-opencv-ts-create-share-library-intead-of-static.patch b/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0002-Make-opencv-ts-create-share-library-intead-of-static.patch
deleted file mode 100644
index 46198fb7..00000000
--- a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0002-Make-opencv-ts-create-share-library-intead-of-static.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1From 46ffa1f8f443b71673774fcb864eb741bbc26200 Mon Sep 17 00:00:00 2001
2From: Bian Naimeng <biannm@cn.fujitsu.com>
3Date: Wed, 19 Apr 2017 03:11:37 +0900
4Subject: [PATCH] Make opencv-ts create share library intead of static.
5
6Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
7
8---
9 modules/ts/CMakeLists.txt | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/modules/ts/CMakeLists.txt b/modules/ts/CMakeLists.txt
13index f95bed0..ee67858 100644
14--- a/modules/ts/CMakeLists.txt
15+++ b/modules/ts/CMakeLists.txt
16@@ -4,7 +4,7 @@ if(NOT BUILD_opencv_ts AND NOT BUILD_TESTS AND NOT BUILD_PERF_TESTS)
17 ocv_module_disable(ts)
18 endif()
19
20-set(OPENCV_MODULE_TYPE STATIC)
21+#set(OPENCV_MODULE_TYPE STATIC)
22 set(OPENCV_MODULE_IS_PART_OF_WORLD FALSE)
23
24 if(WINRT)
diff --git a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0003-To-fix-errors-as-following.patch b/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0003-To-fix-errors-as-following.patch
deleted file mode 100644
index 336c2e08..00000000
--- a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/0003-To-fix-errors-as-following.patch
+++ /dev/null
@@ -1,70 +0,0 @@
1From 867caccc358266f7021f076fc8c8e41bf048782c Mon Sep 17 00:00:00 2001
2From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
3Date: Fri, 19 May 2017 04:27:50 +0900
4Subject: [PATCH] To fix errors as following:
5
6"test_main.cpp:45: undefined reference to `parseCustomOptions(int, char**)'"
7"perf_abs.cpp:13: undefined reference to `cvtest::param_seed'"
8"test_superres.cpp:270: undefined reference to `checkIppStatus()'"
9
10Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
11
12Also add the visibility changes for certain OpenCL-related functions in
13ts module.
14
15Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
16
17---
18 modules/ts/include/opencv2/ts.hpp | 4 ++--
19 modules/ts/include/opencv2/ts/ocl_test.hpp | 2 +-
20 modules/ts/include/opencv2/ts/ts_ext.hpp | 2 +-
21 3 files changed, 4 insertions(+), 4 deletions(-)
22
23diff --git a/modules/ts/include/opencv2/ts.hpp b/modules/ts/include/opencv2/ts.hpp
24index b9d6b74..f1ee7ee 100644
25--- a/modules/ts/include/opencv2/ts.hpp
26+++ b/modules/ts/include/opencv2/ts.hpp
27@@ -622,7 +622,7 @@ protected:
28 }
29 };
30
31-extern uint64 param_seed;
32+CV_EXPORTS extern uint64 param_seed;
33
34 struct DefaultRngAuto
35 {
36@@ -685,7 +685,7 @@ private:
37 #endif
38 #endif
39
40-void parseCustomOptions(int argc, char **argv);
41+CV_EXPORTS void parseCustomOptions(int argc, char **argv);
42
43 #define CV_TEST_INIT0_NOOP (void)0
44
45diff --git a/modules/ts/include/opencv2/ts/ocl_test.hpp b/modules/ts/include/opencv2/ts/ocl_test.hpp
46index 11572e9..438112e 100644
47--- a/modules/ts/include/opencv2/ts/ocl_test.hpp
48+++ b/modules/ts/include/opencv2/ts/ocl_test.hpp
49@@ -82,7 +82,7 @@ inline UMat ToUMat(InputArray src)
50 return dst;
51 }
52
53-extern int test_loop_times;
54+CV_EXPORTS extern int test_loop_times;
55
56 #define MAX_VALUE 357
57
58diff --git a/modules/ts/include/opencv2/ts/ts_ext.hpp b/modules/ts/include/opencv2/ts/ts_ext.hpp
59index b5cea3e..e5b0b4b 100644
60--- a/modules/ts/include/opencv2/ts/ts_ext.hpp
61+++ b/modules/ts/include/opencv2/ts/ts_ext.hpp
62@@ -9,7 +9,7 @@
63 #define OPENCV_TS_EXT_HPP
64
65 namespace cvtest {
66-void checkIppStatus();
67+CV_EXPORTS void checkIppStatus();
68 extern bool skipUnstableTests;
69 extern bool runBigDataTests;
70 extern int testThreads;
diff --git a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/fixpkgconfig.patch b/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/fixpkgconfig.patch
deleted file mode 100644
index df20aabc..00000000
--- a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/fixpkgconfig.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1Index: git/cmake/OpenCVGenPkgconfig.cmake
2===================================================================
3--- git.orig/cmake/OpenCVGenPkgconfig.cmake
4+++ git/cmake/OpenCVGenPkgconfig.cmake
5@@ -31,7 +31,7 @@ macro(fix_prefix lst isown)
6 get_filename_component(libdir "${item}" PATH)
7 get_filename_component(_libname "${item}" NAME)
8 ocv_get_libname(libname "${_libname}")
9- list(APPEND _lst "-L${libdir}" "-l${libname}")
10+ list(APPEND _lst "-l${libname}")
11 else()
12 list(APPEND _lst "-l${item}")
13 endif()
14@@ -124,11 +124,14 @@ ocv_list_unique(_extra)
15 ocv_list_unique(_3rdparty)
16
17 set(OPENCV_PC_LIBS
18- "-L\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}"
19+ "-L\${exec_prefix}/${OPENCV_3P_LIB_INSTALL_PATH}"
20 "${_modules}"
21 )
22 if(BUILD_SHARED_LIBS)
23- set(OPENCV_PC_LIBS_PRIVATE "${_extra}")
24+ set(OPENCV_PC_LIBS_PRIVATE
25+ "-L\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}"
26+ "${_extra}"
27+ )
28 else()
29 set(OPENCV_PC_LIBS_PRIVATE
30 "-L\${exec_prefix}/${OPENCV_3P_LIB_INSTALL_PATH}"
diff --git a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/uselocalxfeatures.patch b/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/uselocalxfeatures.patch
deleted file mode 100644
index 2605562e..00000000
--- a/meta-xilinx-bsp/recipes-support/opencv/opencv_3.4.3/uselocalxfeatures.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1diff --git a/modules/xfeatures2d/CMakeLists.txt b/modules/xfeatures2d/CMakeLists.txt
2index e1755595..c7009c47 100644
3--- a/modules/xfeatures2d/CMakeLists.txt
4+++ b/modules/xfeatures2d/CMakeLists.txt
5@@ -5,10 +5,10 @@ ocv_define_module(xfeatures2d opencv_core opencv_imgproc opencv_features2d openc
6 include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/download_vgg.cmake)
7 include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/download_boostdesc.cmake)
8 set(DOWNLOAD_DIR "${OpenCV_BINARY_DIR}/downloads/xfeatures2d")
9-download_boost_descriptors("${DOWNLOAD_DIR}" boost_status)
10-download_vgg_descriptors("${DOWNLOAD_DIR}" vgg_status)
11-if(NOT boost_status OR NOT vgg_status)
12- ocv_module_disable(xfeatures2d)
13-endif()
14+#download_boost_descriptors("${DOWNLOAD_DIR}" boost_status)
15+#download_vgg_descriptors("${DOWNLOAD_DIR}" vgg_status)
16+#if(NOT boost_status OR NOT vgg_status)
17+# ocv_module_disable(xfeatures2d)
18+#endif()
19
20 ocv_module_include_directories("${DOWNLOAD_DIR}")