diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad')
9 files changed, 367 insertions, 63 deletions
diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-ext-wayland-fix-meson-build-in-nxp-fork.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-ext-wayland-fix-meson-build-in-nxp-fork.patch new file mode 100644 index 00000000..088976d8 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-ext-wayland-fix-meson-build-in-nxp-fork.patch @@ -0,0 +1,60 @@ +From e637d9f6bb961afcecb74faa6dff38562f6ce796 Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> +Date: Sun, 26 Jan 2020 10:45:28 +0000 +Subject: [PATCH] ext/wayland: fix meson build in nxp fork + +- Add Wayland protocols, which are not enabled in upstream +- Add missing compilation unit, which in NXP-specific + +Upstream-Status: Pending + +Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> +--- + ext/wayland/meson.build | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/ext/wayland/meson.build b/ext/wayland/meson.build +index fa6fbf42f..eb425b14f 100644 +--- a/ext/wayland/meson.build ++++ b/ext/wayland/meson.build +@@ -8,6 +8,11 @@ wl_sources = [ + 'wllinuxdmabuf.c' + ] + ++imx_wl_sources = [ ++ 'wlutils.c', ++] ++wl_sources += imx_wl_sources ++ + if use_wayland + protocols_datadir = wl_protocol_dep.get_pkgconfig_variable('pkgdatadir') + +@@ -19,6 +24,25 @@ if use_wayland + 'fullscreen-shell-unstable-v1-protocol.c', 'fullscreen-shell-unstable-v1-client-protocol.h'], + ['/stable/xdg-shell/xdg-shell.xml', 'xdg-shell-protocol.c', 'xdg-shell-client-protocol.h'], + ] ++ ++ imx_protocol_defs = [ ++ [ ++ '/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml', ++ 'alpha-compositing-unstable-v1-protocol.c', ++ 'alpha-compositing-unstable-v1-client-protocol.h' ++ ], ++ ['/unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml', ++ 'hdr10-metadata-unstable-v1-protocol.c', ++ 'hdr10-metadata-unstable-v1-client-protocol.h' ++ ], ++ [ ++ '/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml', ++ 'linux-explicit-synchronization-unstable-v1-protocol.c', ++ 'linux-explicit-synchronization-unstable-v1-client-protocol.h' ++ ], ++ ] ++ protocol_defs += imx_protocol_defs ++ + protocols_files = [] + + foreach protodef: protocol_defs +-- +2.17.1 + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch new file mode 100644 index 00000000..13218520 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch @@ -0,0 +1,36 @@ +From 97a4d0cd7de8cfbf983acc7e37ba2f8fb73c3e19 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> +Date: Fri, 18 Oct 2019 00:39:12 +0100 +Subject: [PATCH 1/2] meson: build gir even when cross-compiling if + introspection was enabled explicitly + +This can be made to work in certain circumstances when +cross-compiling, so default to not building g-i stuff +when cross-compiling, but allow it if introspection was +enabled explicitly via -Dintrospection=enabled. + +See gstreamer/gstreamer#454 and gstreamer/gstreamer#381. + +Upstream-Status: Backport [97a4d0cd7de8cfbf983acc7e37ba2f8fb73c3e19] + +Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 67aeeb4d0..7b3314bd9 100644 +--- a/meson.build ++++ b/meson.build +@@ -411,7 +411,7 @@ python3 = import('python').find_installation() + + gir = find_program('g-ir-scanner', required : get_option('introspection')) + gnome = import('gnome') +-build_gir = gir.found() and not meson.is_cross_build() ++build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) + gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \ + 'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \ + 'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \ +-- +2.17.1 + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-fix-build-with-opencv-enabled-and-opencv4.-Fix.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-fix-build-with-opencv-enabled-and-opencv4.-Fix.patch new file mode 100644 index 00000000..874b8abc --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-fix-build-with-opencv-enabled-and-opencv4.-Fix.patch @@ -0,0 +1,45 @@ +From f41f356aebee916910453031c06c111000f2f261 Mon Sep 17 00:00:00 2001 +From: Christoph Reiter <reiter.christoph@gmail.com> +Date: Sun, 5 May 2019 22:11:16 +0200 +Subject: [PATCH] meson: fix build with opencv=enabled and opencv4. Fixes #964 + +Having the opencv feature enabled would lead to the opencv3 dependency +being required which failed with only opencv4 being available. + +Instead don't require anything and error out at the end if the feature was enabled +but no dependency was found. + +Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/commit/22c6a4085f8792d8af0cdabfe1664d55ca2dee11] + +(cherry picked from commit 22c6a4085f8792d8af0cdabfe1664d55ca2dee11) +Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> +--- + gst-libs/gst/opencv/meson.build | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/gst-libs/gst/opencv/meson.build b/gst-libs/gst/opencv/meson.build +index 3fd472fda..8dc2ad99b 100644 +--- a/gst-libs/gst/opencv/meson.build ++++ b/gst-libs/gst/opencv/meson.build +@@ -9,9 +9,9 @@ opencv_headers = [ + 'gstopencvvideofilter.h', + ] + +-opencv_dep = dependency('opencv', version : '>= 3.0.0', required : get_option('opencv')) ++opencv_dep = dependency('opencv', version : '>= 3.0.0', required : false) + if not opencv_dep.found() +- opencv_dep = dependency('opencv4', version : '>= 4.0.0', required : get_option('opencv')) ++ opencv_dep = dependency('opencv4', version : '>= 4.0.0', required : false) + endif + if opencv_dep.found() + gstopencv = library('gstopencv-' + api_version, +@@ -30,4 +30,6 @@ if opencv_dep.found() + dependencies : [gstvideo_dep, opencv_dep]) + + install_headers(opencv_headers, subdir : 'gstreamer-1.0/gst/opencv') ++elif get_option('opencv').enabled() ++ error('OpenCV support enabled but required dependencies were not found.') + endif +-- +2.17.1 + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-allow-compilation-against-4.3.x.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-allow-compilation-against-4.3.x.patch new file mode 100644 index 00000000..a9e1bd00 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-allow-compilation-against-4.3.x.patch @@ -0,0 +1,34 @@ +From cfb196925312b3c3d7a19dbb9a3ce64d20d66409 Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin <andrey.z@gmail.com> +Date: Sat, 9 May 2020 19:56:51 +0000 +Subject: [PATCH] opencv: allow compilation against 4.3.x + +Backport upstream commit 4cf362e2df0fb809ea0f21dd4a6fbb8b46ca54ef to NXP +fork of gstreamer1.0-plugins-bad. + +Original commit link: +https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/commit/4cf362e2df0fb809ea0f21dd4a6fbb8b46ca54ef + +Upstream-Status: Backport [4cf362e2df0fb809ea0f21dd4a6fbb8b46ca54ef] + +Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> +--- + ext/opencv/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build +index d0ce1d3ee..05b142edc 100644 +--- a/ext/opencv/meson.build ++++ b/ext/opencv/meson.build +@@ -65,7 +65,7 @@ if opencv_found + endif + endforeach + else +- opencv_dep = dependency('opencv4', version : ['>= 4.0.0', '< 4.1.0'], required : false) ++ opencv_dep = dependency('opencv4', version : ['>= 4.0.0', '< 4.4.0'], required : false) + opencv_found = opencv_dep.found() + if opencv_found + foreach h : libopencv4_headers +-- +2.17.1 + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-fix-build-for-opencv-3-4-2.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-fix-build-for-opencv-3-4-2.patch deleted file mode 100644 index 5c53e8e5..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-fix-build-for-opencv-3-4-2.patch +++ /dev/null @@ -1,63 +0,0 @@ -From c247745faaf885fd3fa094198fc0ea288e295dbf Mon Sep 17 00:00:00 2001 -From: Thibault Saunier <tsaunier@igalia.com> -Date: Fri, 13 Jul 2018 14:42:28 -0400 -Subject: [PATCH] opencv: Fix build for opencv >= 3.4.2 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The `CV_RGB` macro is now in `imgproc.hpp`. - -Fixes: - - ../subprojects/gst-plugins-bad/ext/opencv/gsthanddetect.cpp:497:40: error: ‘CV_RGB’ was not declared in this scope - cvCircle (img, center, radius, CV_RGB (0, 0, 200), 1, 8, 0); - ^~~~~~ ---- - ext/opencv/MotionCells.cpp | 3 +++ - ext/opencv/gsthanddetect.cpp | 3 +++ - ext/opencv/gsttemplatematch.cpp | 3 +++ - 3 files changed, 9 insertions(+) - -diff --git a/ext/opencv/MotionCells.cpp b/ext/opencv/MotionCells.cpp -index f85989e117..175ec901b2 100644 ---- a/ext/opencv/MotionCells.cpp -+++ b/ext/opencv/MotionCells.cpp -@@ -51,6 +51,9 @@ - - #include <errno.h> - #include "MotionCells.h" -+#if (CV_MAJOR_VERSION >= 3) -+#include <opencv2/imgproc.hpp> -+#endif - #include <opencv2/imgproc/imgproc_c.h> - - MotionCells::MotionCells () -diff --git a/ext/opencv/gsthanddetect.cpp b/ext/opencv/gsthanddetect.cpp -index 60fd5be72b..47203fd0ea 100644 ---- a/ext/opencv/gsthanddetect.cpp -+++ b/ext/opencv/gsthanddetect.cpp -@@ -62,6 +62,9 @@ - - /* element header */ - #include "gsthanddetect.h" -+#if (CV_MAJOR_VERSION >= 3) -+#include <opencv2/imgproc.hpp> -+#endif - #include <opencv2/imgproc/imgproc_c.h> - - GST_DEBUG_CATEGORY_STATIC (gst_handdetect_debug); -diff --git a/ext/opencv/gsttemplatematch.cpp b/ext/opencv/gsttemplatematch.cpp -index f39208dc28..ec0b56af88 100644 ---- a/ext/opencv/gsttemplatematch.cpp -+++ b/ext/opencv/gsttemplatematch.cpp -@@ -63,6 +63,9 @@ - - #include "../../gst-libs/gst/gst-i18n-plugin.h" - #include "gsttemplatematch.h" -+#if (CV_MAJOR_VERSION >= 3) -+#include <opencv2/imgproc.hpp> -+#endif - #include <opencv2/imgproc/imgproc_c.h> - - GST_DEBUG_CATEGORY_STATIC (gst_template_match_debug); diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch new file mode 100644 index 00000000..32261279 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch @@ -0,0 +1,30 @@ +From 72561a0fca562d03567ace7b4cfc94992cd6525c Mon Sep 17 00:00:00 2001 +From: Andre McCurdy <armccurdy@gmail.com> +Date: Wed, 3 Feb 2016 18:05:41 -0800 +Subject: [PATCH] avoid including <sys/poll.h> directly + +musl libc generates warnings if <sys/poll.h> is included directly. + +Upstream-Status: Pending + +Signed-off-by: Andre McCurdy <armccurdy@gmail.com> +--- + sys/dvb/gstdvbsrc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c +index b93255f..49f145a 100644 +--- a/sys/dvb/gstdvbsrc.c ++++ b/sys/dvb/gstdvbsrc.c +@@ -97,7 +97,7 @@ + #include <gst/gst.h> + #include <gst/glib-compat-private.h> + #include <sys/ioctl.h> +-#include <sys/poll.h> ++#include <poll.h> + #include <fcntl.h> + #include <errno.h> + #include <stdio.h> +-- +1.9.1 + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch new file mode 100644 index 00000000..2d5389d9 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch @@ -0,0 +1,85 @@ +From 2262ba4b686d5cc0d3e894707fe1d31619a3a8f1 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy <armccurdy@gmail.com> +Date: Tue, 9 Feb 2016 14:00:00 -0800 +Subject: [PATCH] ensure valid sentinals for gst_structure_get() etc + +For GStreamer functions declared with G_GNUC_NULL_TERMINATED, +ie __attribute__((__sentinel__)), gcc will generate a warning if the +last parameter passed to the function is not NULL (where a valid NULL +in this context is defined as zero with any pointer type). + +The C callers to such functions within gst-plugins-bad use the C NULL +definition (ie ((void*)0)), which is a valid sentinel. + +However the C++ NULL definition (ie 0L), is not a valid sentinel +without an explicit cast to a pointer type. + +Upstream-Status: Pending + +Signed-off-by: Andre McCurdy <armccurdy@gmail.com> +--- + sys/decklink/gstdecklink.cpp | 10 +++++----- + sys/decklink/gstdecklinkaudiosrc.cpp | 2 +- + sys/decklink/gstdecklinkvideosink.cpp | 2 +- + 3 files changed, 7 insertions(+), 7 deletions(-) + +Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklink.cpp +=================================================================== +--- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklink.cpp ++++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklink.cpp +@@ -617,7 +617,7 @@ gst_decklink_mode_get_structure (GstDeck + "pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d, + "interlace-mode", G_TYPE_STRING, + mode->interlaced ? "interleaved" : "progressive", +- "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, NULL); ++ "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void*)NULL); + + if (input && mode->interlaced) { + if (mode->tff) +@@ -632,16 +632,16 @@ gst_decklink_mode_get_structure (GstDeck + case bmdFormat8BitYUV: /* '2vuy' */ + gst_structure_set (s, "format", G_TYPE_STRING, "UYVY", + "colorimetry", G_TYPE_STRING, mode->colorimetry, +- "chroma-site", G_TYPE_STRING, "mpeg2", NULL); ++ "chroma-site", G_TYPE_STRING, "mpeg2", (void*)NULL); + break; + case bmdFormat10BitYUV: /* 'v210' */ +- gst_structure_set (s, "format", G_TYPE_STRING, "v210", NULL); ++ gst_structure_set (s, "format", G_TYPE_STRING, "v210", (void*)NULL); + break; + case bmdFormat8BitARGB: /* 'ARGB' */ +- gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", NULL); ++ gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", (void*)NULL); + break; + case bmdFormat8BitBGRA: /* 'BGRA' */ +- gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", NULL); ++ gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", (void*)NULL); + break; + case bmdFormat10BitRGB: /* 'r210' Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 */ + case bmdFormat12BitRGB: /* 'R12B' Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */ +Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkaudiosrc.cpp +=================================================================== +--- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklinkaudiosrc.cpp ++++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkaudiosrc.cpp +@@ -387,7 +387,7 @@ gst_decklink_audio_src_set_caps (GstBase + g_mutex_unlock (&self->input->lock); + + if (videosrc) { +- g_object_get (videosrc, "connection", &vconn, NULL); ++ g_object_get (videosrc, "connection", &vconn, (void *) NULL); + gst_object_unref (videosrc); + + switch (vconn) { +Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkvideosink.cpp +=================================================================== +--- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklinkvideosink.cpp ++++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkvideosink.cpp +@@ -285,7 +285,7 @@ reset_framerate (GstCapsFeatures * featu + gpointer user_data) + { + gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, +- G_MAXINT, 1, NULL); ++ G_MAXINT, 1, (void *) NULL); + + return TRUE; + } diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch new file mode 100644 index 00000000..73681f10 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch @@ -0,0 +1,28 @@ +From a67781000e82bd9ae3813da29401e8c0c852328a Mon Sep 17 00:00:00 2001 +From: Andre McCurdy <armccurdy@gmail.com> +Date: Tue, 26 Jan 2016 15:16:01 -0800 +Subject: [PATCH] fix maybe-uninitialized warnings when compiling with -Os + +Upstream-Status: Pending + +Signed-off-by: Andre McCurdy <armccurdy@gmail.com> +--- + gst-libs/gst/codecparsers/gstvc1parser.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparsers/gstvc1parser.c +index fd16ee0..ddb890c 100644 +--- a/gst-libs/gst/codecparsers/gstvc1parser.c ++++ b/gst-libs/gst/codecparsers/gstvc1parser.c +@@ -1730,7 +1730,7 @@ gst_vc1_parse_sequence_layer (const guint8 * data, gsize size, + GstVC1SeqLayer * seqlayer) + { + guint32 tmp; +- guint8 tmp8; ++ guint8 tmp8 = 0; + guint8 structA[8] = { 0, }; + guint8 structB[12] = { 0, }; + GstBitReader br; +-- +1.9.1 + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch b/bsp/meta-freescale/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/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch @@ -0,0 +1,49 @@ +From 5830de9b1c8965683025082aeed7ccaf1dd85969 Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> +Date: Sun, 26 Jan 2020 19:55:06 +0000 +Subject: [PATCH 2/2] opencv: resolve missing opencv data dir in yocto build + +When Yocto build is performed, opencv searches for data dir using simple +test command, and this fails because pkg-config provides an absolute +path on the target which needs to be prepended by PKG_CONFIG_SYSROOT_DIR +in order for the 'test' utility to pick up the absolute path. + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> +--- + ext/opencv/meson.build | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build +index f38b55dfe..a26403482 100644 +--- a/ext/opencv/meson.build ++++ b/ext/opencv/meson.build +@@ -78,20 +78,21 @@ else + endif + + if opencv_found ++ pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip() + opencv_prefix = opencv_dep.get_pkgconfig_variable('prefix') + gstopencv_cargs += ['-DOPENCV_PREFIX="' + opencv_prefix + '"'] + + # Check the data dir used by opencv for its xml data files + # Use prefix from pkg-config to be compatible with cross-compilation +- r = run_command('test', '-d', opencv_prefix + '/share/opencv') ++ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/opencv') + if r.returncode() == 0 + gstopencv_cargs += '-DOPENCV_PATH_NAME="opencv"' + else +- r = run_command('test', '-d', opencv_prefix + '/share/OpenCV') ++ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/OpenCV') + if r.returncode() == 0 + gstopencv_cargs += '-DOPENCV_PATH_NAME="OpenCV"' + else +- r = run_command('test', '-d', opencv_prefix + '/share/opencv4') ++ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/opencv4') + if r.returncode() == 0 + gstopencv_cargs += '-DOPENCV_PATH_NAME="opencv4"' + else +-- +2.17.1 + |