summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/gstreamer
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.z@gmail.com>2020-01-27 10:44:44 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-02-02 16:57:21 +0000
commit86511f94c992eca945607b864e935c34fcc146ab (patch)
tree69f07b7b71d1998a948e9895d0d4d8042544d6db /meta/recipes-multimedia/gstreamer
parent6c09c9259f9ff8d6a0f9a5cfb1aef9b635f67aac (diff)
downloadpoky-86511f94c992eca945607b864e935c34fcc146ab.tar.gz
gstreamer1.0-plugins-bad: resolve opencv pkg-config in meson build
When opencv is picked in PACKAGECONFIG, plugin fails to locate data dirs. This is due to meson.build file uses 'test' utility to verify that the data dirs path is present and not taking sysroot into prefix. Introduce additional patch, which picks up PKG_CONFIG_SYSROOT_DIR as prefix for 'test' utility to verify the data dir is actually present. (From OE-Core rev: 575fca95307dafb3f7d80f9bf0e63605a9328b59) Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/gstreamer')
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch49
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.1.bb1
2 files changed, 50 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch
new file mode 100644
index 0000000000..4b6591c0d8
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch
@@ -0,0 +1,49 @@
1From f41caae14b618ab815ede3c408e7482b00316e3e Mon Sep 17 00:00:00 2001
2From: Andrey Zhizhikin <andrey.z@gmail.com>
3Date: Mon, 27 Jan 2020 10:22:35 +0000
4Subject: [PATCH] opencv: resolve missing opencv data dir in yocto build
5
6When Yocto build is performed, opencv searches for data dir using simple
7'test' command, 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.z@gmail.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
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.1.bb
index 56ae7a179e..024277eeb1 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.1.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.1.bb
@@ -6,6 +6,7 @@ SRC_URI = " \
6 file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \ 6 file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \
7 file://avoid-including-sys-poll.h-directly.patch \ 7 file://avoid-including-sys-poll.h-directly.patch \
8 file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \ 8 file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \
9 file://opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \
9" 10"
10SRC_URI[md5sum] = "24d4d30ecc67d5cbc77c0475bcea1210" 11SRC_URI[md5sum] = "24d4d30ecc67d5cbc77c0475bcea1210"
11SRC_URI[sha256sum] = "56481c95339b8985af13bac19b18bc8da7118c2a7d9440ed70e7dcd799c2adb5" 12SRC_URI[sha256sum] = "56481c95339b8985af13bac19b18bc8da7118c2a7d9440ed70e7dcd799c2adb5"