Skip to contentSkip to conversation

package/gerbera: fix static build with ffmpeg

PATCH Superseded Fabrice Fontaine 2 participants 2 messages Mar 24, 2019 – Mar 28, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/gerbera: fix static build with ffmpeg

Fixes:
- http://autobuild.buildroot.org/results/2b99fabd798db84a0fce26ad696c58e54c6ff626
- http://autobuild.buildroot.org/results/95e410e5ab34c6d4626a58f97c0d2d5e6829a300

---
 ...cmake-FindFFMPEG-cmake-use-pkgconfig.patch | 175 ++++++++++++++++++
 1 file changed, 175 insertions(+)
 create mode 100644 package/gerbera/0002-cmake-FindFFMPEG-cmake-use-pkgconfig.patch
package/gerbera/0002-cmake-FindFFMPEG-cmake-use-pkgconfig.patch new file +175 -0
new file mode 100644
index 0000000000..c1ae49c7c0
@@ -0,0 +1,175 @@
+From fbbc07ce53e884b1603461ee5642d5f02788678d Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Thu, 21 Mar 2019 16:32:44 +0100
+Subject: [PATCH] cmake/FindFFMPEG.cmake: use pkgconfig
+
+ffmpeg has too many optional dependencies (opus, openssl, ...) instead
+of trying to find them all one by one, use pkg-config to get them and
+fallback on current mechanism
+
+Fixes:
+ - http://autobuild.buildroot.org/results/2b99fabd798db84a0fce26ad696c58e54c6ff626
+ - http://autobuild.buildroot.org/results/95e410e5ab34c6d4626a58f97c0d2d5e6829a300
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Retrieved (and backported) from:
+https://github.com/gerbera/gerbera/commit/fbbc07ce53e884b1603461ee5642d5f02788678d]
+---
+ cmake/FindFFMPEG.cmake | 147 +++++++++++++++++++++--------------------
+ 1 file changed, 75 insertions(+), 72 deletions(-)
+
+diff --git a/cmake/FindFFMPEG.cmake b/cmake/FindFFMPEG.cmake
+index 0a4a409f..9548b566 100644
+--- a/cmake/FindFFMPEG.cmake
++++ b/cmake/FindFFMPEG.cmake
+@@ -82,70 +82,76 @@ ENDIF (NOT FFMPEG_INCLUDE_DIR)
+ # ffmpeg uses relative includes such as <ffmpeg/avformat.h> or <libavcodec/avformat.h>
+ get_filename_component(FFMPEG_INCLUDE_DIR ${FFMPEG_INCLUDE_DIR} ABSOLUTE)
+ 
+-FIND_LIBRARY(FFMPEG_avformat_LIBRARY avformat
+-        /usr/local/lib
+-        /usr/lib
+-        )
+-
+-FIND_LIBRARY(FFMPEG_avcodec_LIBRARY avcodec
+-        /usr/local/lib
+-        /usr/lib
+-        )
+-
+-FIND_LIBRARY(FFMPEG_avutil_LIBRARY avutil
+-        /usr/local/lib
+-        /usr/lib
+-        )
+-
+-FIND_LIBRARY(FFMPEG_swresample_LIBRARY swresample
+-        /usr/local/lib
+-        /usr/lib
+-        )
+-
+-FIND_LIBRARY(FFMPEG_vorbis_LIBRARY vorbis
+-        /usr/local/lib
+-        /usr/lib
+-        )
+-
+-FIND_LIBRARY(FFMPEG_dc1394_LIBRARY dc1394_control
+-        /usr/local/lib
+-        /usr/lib
+-        )
+-
+-FIND_LIBRARY(FFMPEG_vorbisenc_LIBRARY vorbisenc
+-        /usr/local/lib
+-        /usr/lib
+-        )
+-
+-FIND_LIBRARY(FFMPEG_theora_LIBRARY theora
+-        /usr/local/lib
+-        /usr/lib
+-        )
+-
+-FIND_LIBRARY(FFMPEG_dts_LIBRARY dts
+-        /usr/local/lib
+-        /usr/lib
+-        )
+-
+-FIND_LIBRARY(FFMPEG_gsm_LIBRARY gsm
+-        /usr/local/lib
+-        /usr/lib
+-        )
+-
+-FIND_LIBRARY(FFMPEG_swscale_LIBRARY swscale
+-        /usr/local/lib
+-        /usr/lib
+-        )
+-
+-FIND_LIBRARY(FFMPEG_z_LIBRARY z
+-        /usr/local/lib
+-        /usr/lib
+-        )
+-
+-FIND_LIBRARY(FFMPEG_bz2_LIBRARY bz2
+-        /usr/local/lib
+-        /usr/lib
+-        )
++CHECK_STRUCT_HAS_MEMBER("struct AVStream" codecpar libavformat/avformat.h HAVE_AVSTREAM_CODECPAR LANGUAGE C)
++
++FIND_PACKAGE(PkgConfig QUIET)
++PKG_CHECK_MODULES(FFMPEG QUIET libavformat)
++IF (NOT FFMPEG_FOUND)
++	FIND_LIBRARY(FFMPEG_avformat_LIBRARY avformat
++		/usr/local/lib
++		/usr/lib
++		)
++
++	FIND_LIBRARY(FFMPEG_avcodec_LIBRARY avcodec
++		/usr/local/lib
++		/usr/lib
++		)
++
++	FIND_LIBRARY(FFMPEG_avutil_LIBRARY avutil
++		/usr/local/lib
++		/usr/lib
++		)
++
++	FIND_LIBRARY(FFMPEG_swresample_LIBRARY swresample
++		/usr/local/lib
++		/usr/lib
++		)
++
++	FIND_LIBRARY(FFMPEG_vorbis_LIBRARY vorbis
++		/usr/local/lib
++		/usr/lib
++		)
++
++	FIND_LIBRARY(FFMPEG_dc1394_LIBRARY dc1394_control
++		/usr/local/lib
++		/usr/lib
++		)
++
++	FIND_LIBRARY(FFMPEG_vorbisenc_LIBRARY vorbisenc
++		/usr/local/lib
++		/usr/lib
++		)
++
++	FIND_LIBRARY(FFMPEG_theora_LIBRARY theora
++		/usr/local/lib
++		/usr/lib
++		)
++
++	FIND_LIBRARY(FFMPEG_dts_LIBRARY dts
++		/usr/local/lib
++		/usr/lib
++		)
++
++	FIND_LIBRARY(FFMPEG_gsm_LIBRARY gsm
++		/usr/local/lib
++		/usr/lib
++		)
++
++	FIND_LIBRARY(FFMPEG_swscale_LIBRARY swscale
++		/usr/local/lib
++		/usr/lib
++		)
++
++	FIND_LIBRARY(FFMPEG_z_LIBRARY z
++		/usr/local/lib
++		/usr/lib
++		)
++
++	FIND_LIBRARY(FFMPEG_bz2_LIBRARY bz2
++		/usr/local/lib
++		/usr/lib
++		)
++ENDIF(NOT FFMPEG_FOUND)
+ 
+ SET(FFMPEG_LIBRARIES)
+ IF (FFMPEG_INCLUDE_DIR)
+@@ -205,9 +211,6 @@ IF (FFMPEG_INCLUDE_DIR)
+                 ENDIF (FFMPEG_bz2_LIBRARY)
+ 
+                 SET(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} CACHE INTERNAL "All presently found FFMPEG libraries.")
+-
+-                CHECK_STRUCT_HAS_MEMBER("struct AVStream" codecpar libavformat/avformat.h HAVE_AVSTREAM_CODECPAR LANGUAGE C)
+-
+             ENDIF (FFMPEG_avutil_LIBRARY)
+         ENDIF (FFMPEG_avcodec_LIBRARY)
+     ENDIF (FFMPEG_avformat_LIBRARY)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/gerbera: fix static build with ffmpeg

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

Fixes:
- http://autobuild.buildroot.org/results/2b99fabd798db84a0fce26ad696c58e54c6ff626
- http://autobuild.buildroot.org/results/95e410e5ab34c6d4626a58f97c0d2d5e6829a300

Committed to 2019.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard