summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2020-02-22 14:33:25 +0000
committerOtavio Salvador <otavio@ossystems.com.br>2020-03-03 18:26:17 -0300
commit6802b457723b8aaa0fda20f608a34d7bc220942d (patch)
tree74e3bd6bfbef3060a0dc5a43d0dd542505f0f099 /recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch
parent723deb35baae17006fc029e15ddf6ff55357b580 (diff)
downloadmeta-freescale-6802b457723b8aaa0fda20f608a34d7bc220942d.tar.gz
gstreamer1.0-plugins-bad: Transition to meson based builds
This update follows [427eb30f9b59972b38ae3f25094470bb7034547d] in upstream, which trasnitions the gstreamer1.0 plugins build from autotools to meson build. Additional patches included in meta-freescale are: - Backport of 2 patches to allow using OpenCV version 4.1.0 - Adaptions required in NXP fork to use meson - One patch which solves the data dir search on OpenCV. Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Diffstat (limited to 'recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch')
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch
new file mode 100644
index 00000000..3fe3f649
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch
@@ -0,0 +1,49 @@
1From 5830de9b1c8965683025082aeed7ccaf1dd85969 Mon Sep 17 00:00:00 2001
2From: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
3Date: Sun, 26 Jan 2020 19:55:06 +0000
4Subject: [PATCH 2/2] opencv: resolve missing opencv data dir in yocto build
5
6When Yocto build is performed, opencv searches for data dir using simple
7test command, and this fails because pkg-config provides an absolute
8path on the target which needs to be prepended by PKG_CONFIG_SYSROOT_DIR
9in order for the 'test' utility to pick up the absolute path.
10
11Upstream-Status: Inappropriate [OE-specific]
12
13Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
14---
15 ext/opencv/meson.build | 7 ++++---
16 1 file changed, 4 insertions(+), 3 deletions(-)
17
18diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build
19index f38b55dfe..a26403482 100644
20--- a/ext/opencv/meson.build
21+++ b/ext/opencv/meson.build
22@@ -78,20 +78,21 @@ else
23 endif
24
25 if opencv_found
26+ pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip()
27 opencv_prefix = opencv_dep.get_pkgconfig_variable('prefix')
28 gstopencv_cargs += ['-DOPENCV_PREFIX="' + opencv_prefix + '"']
29
30 # Check the data dir used by opencv for its xml data files
31 # Use prefix from pkg-config to be compatible with cross-compilation
32- r = run_command('test', '-d', opencv_prefix + '/share/opencv')
33+ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/opencv')
34 if r.returncode() == 0
35 gstopencv_cargs += '-DOPENCV_PATH_NAME="opencv"'
36 else
37- r = run_command('test', '-d', opencv_prefix + '/share/OpenCV')
38+ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/OpenCV')
39 if r.returncode() == 0
40 gstopencv_cargs += '-DOPENCV_PATH_NAME="OpenCV"'
41 else
42- r = run_command('test', '-d', opencv_prefix + '/share/opencv4')
43+ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/opencv4')
44 if r.returncode() == 0
45 gstopencv_cargs += '-DOPENCV_PATH_NAME="opencv4"'
46 else
47--
482.17.1
49