[ffmpeg] Fixed build failure on rawhide due to newer opencv using a patch from upstream

Julian Sikorski belegdol at rpmfusion.org
Thu Jul 7 08:16:45 CEST 2016


commit ad0b99a7a24880090733aabf36d19b3b8c2d90b9
Author: Julian Sikorski <belegdol at fedoraproject.org>
Date:   Thu Jul 7 08:16:11 2016 +0200

    Fixed build failure on rawhide due to newer opencv using a patch from upstream
    
      git

 ...nfigure-add-direct-detection-of-libopencv.patch | 39 ++++++++++++++++++++++
 ffmpeg.spec                                        |  8 ++++-
 2 files changed, 46 insertions(+), 1 deletion(-)
---
diff --git a/0001-configure-add-direct-detection-of-libopencv.patch b/0001-configure-add-direct-detection-of-libopencv.patch
new file mode 100644
index 0000000..237b0a3
--- /dev/null
+++ b/0001-configure-add-direct-detection-of-libopencv.patch
@@ -0,0 +1,39 @@
+From 15708f13477aaf2effdc0d7fc727507bc468335a Mon Sep 17 00:00:00 2001
+From: Andreas Cadhalpun <andreas.cadhalpun at googlemail.com>
+Date: Sun, 7 Feb 2016 23:25:53 +0100
+Subject: [PATCH] configure: add direct detection of libopencv
+
+The pkg-config file contains all opencv libraries, not only the
+neccessary ones.
+
+This change makes it possible to use the libopencv-imgproc-dev Debian
+package instead of libopencv-dev, saving about 200 MB of useless
+build-dependencies.
+
+In particular one doesn't need to install the parts of opencv that
+depend on ffmpeg libraries.
+
+Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
+Reviewed-by: James Almer <jamrial at gmail.com>
+Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
+---
+ configure | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index f4b821a..f28aa8f 100755
+--- a/configure
++++ b/configure
+@@ -5566,7 +5566,8 @@ enabled libnut            && require libnut libnut.h nut_demuxer_init -lnut
+ enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb
+ enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb
+ enabled libopencv         && { check_header opencv2/core/core_c.h &&
+-                               require_pkg_config opencv opencv2/core/core_c.h cvCreateImageHeader ||
++                               { use_pkg_config opencv opencv2/core/core_c.h cvCreateImageHeader ||
++                                 require opencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
+                                require_pkg_config opencv opencv/cxcore.h cvCreateImageHeader; }
+ enabled libopenh264       && require_pkg_config openh264 wels/codec_api.h WelsGetCodecVersion
+ enabled libopenjpeg       && { check_lib openjpeg-2.1/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC ||
+-- 
+2.7.4
+
diff --git a/ffmpeg.spec b/ffmpeg.spec
index 390c448..10e878f 100644
--- a/ffmpeg.spec
+++ b/ffmpeg.spec
@@ -13,7 +13,7 @@
 Summary:        Digital VCR and streaming server
 Name:           ffmpeg
 Version:        3.0.2
-Release:        2%{?date}%{?date:git}%{?rel}%{?dist}
+Release:        3%{?date}%{?date:git}%{?rel}%{?dist}
 %if 0%{?_with_amr:1}
 License:        GPLv3+
 %else
@@ -25,6 +25,7 @@ Source0:        ffmpeg-%{?branch}%{date}.tar.bz2
 %else
 Source0:        http://ffmpeg.org/releases/ffmpeg-%{version}.tar.xz
 %endif
+Patch0:         0001-configure-add-direct-detection-of-libopencv.patch
 Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
 BuildRequires:  bzip2-devel
 %{?_with_celt:BuildRequires: celt-devel}
@@ -178,6 +179,7 @@ echo "git-snapshot-%{?branch}%{date}-RPMFusion" > VERSION
 %else
 %setup -q -n ffmpeg-%{version}
 %endif
+%patch0 -p1
 # fix -O3 -g in host_cflags
 sed -i "s|-O3 -g|$RPM_OPT_FLAGS|" configure
 
@@ -262,6 +264,10 @@ install -pm755 tools/qt-faststart $RPM_BUILD_ROOT%{_bindir}
 
 
 %changelog
+* Thu Jul 07 2016 Julian Sikorski <belegdol at fedoraproject.org> - 3.0.2-3
+- Fixed build failure on rawhide due to newer opencv using a patch from upstream
+  git
+
 * Sun Jun 12 2016 Leigh Scott <leigh123linux at googlemail.com> - 3.0.2-2
 - rebuilt
 


More information about the rpmfusion-commits mailing list