diff --git a/0001-examples-only-check-opencv_dep-if-option-is-not-disa.patch b/0001-examples-only-check-opencv_dep-if-option-is-not-disa.patch new file mode 100644 index 0000000..a5f1fc2 --- /dev/null +++ b/0001-examples-only-check-opencv_dep-if-option-is-not-disa.patch @@ -0,0 +1,32 @@ +From 9815fd1e2ab13f765b75b39e3764fe1e860cb251 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Thu, 10 Sep 2020 10:35:11 -0700 +Subject: [PATCH] examples: only check opencv_dep if option is not disabled + (#1406) + +We can't check opencv_dep if the option is disabled because it's +never initialized in that case, since 833a65cc . + +Signed-off-by: Adam Williamson +--- + tests/examples/meson.build | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/tests/examples/meson.build b/tests/examples/meson.build +index 2eba1d47e..a41fc1679 100644 +--- a/tests/examples/meson.build ++++ b/tests/examples/meson.build +@@ -9,7 +9,9 @@ subdir('mpegts') + subdir('msdk') + subdir('mxf') + subdir('nvcodec') +-subdir('opencv', if_found: opencv_dep) ++if not get_option('opencv').disabled() ++ subdir('opencv', if_found: opencv_dep) ++endif + subdir('uvch264') + subdir('va') + subdir('waylandsink') +-- +2.28.0 + diff --git a/gstreamer1-plugins-bad-free.spec b/gstreamer1-plugins-bad-free.spec index 53c47bd..dab3b9b 100644 --- a/gstreamer1-plugins-bad-free.spec +++ b/gstreamer1-plugins-bad-free.spec @@ -30,6 +30,10 @@ URL: http://gstreamer.freedesktop.org/ %endif Source0: gst-plugins-bad-free-%{version}.tar.xz Source1: gst-p-bad-cleanup.sh +# Fix build failure with opencv disabled: +# https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1406 +# https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1570 +Patch0: 0001-examples-only-check-opencv_dep-if-option-is-not-disa.patch BuildRequires: meson >= 0.48.0 BuildRequires: gcc-c++ @@ -220,6 +224,7 @@ aren't tested well enough, or the code is not of good enough quality. %prep %setup -q -n gst-plugins-bad-%{version} +%patch0 -p1 %build %meson \