Source: handbrake Version: 0.9.9+svn6032+dfsg1-2 Severity: wishlist Tags: patch Usertags: reintroducing-ffmpeg
Dear maintainer, I am working on reintroducing FFmpeg to Debian [1-2]. In order to make FFmpeg co-installable with Libav, the libraries were renamed to lib*-ffmpeg. Thus using linker flags like '-lavcodec' doesn't work with the FFmpeg packages. To get the correct linking flags for both FFmpeg and Libav, one can (and should) use pkg-config. Attached patch achieves that for this package. Please apply it to facilitate building your package with FFmpeg in Debian. If you want to facilitate this even further, you can also add lib*-ffmpeg-dev alternatives to the Libav build-dependencies. While the FFmpeg package is still waiting in the NEW queue [3], it can already be built from the git repository [4]. Best regards, Andreas 1: https://lists.debian.org/debian-devel/2014/07/msg01010.html 2: https://bugs.debian.org/729203 3: https://ftp-master.debian.org/new/ffmpeg_7:2.3.1-1.html 4: https://anonscm.debian.org/cgit/collab-maint/ffmpeg.git
diff --git a/debian/patches/pkg-config.patch b/debian/patches/pkg-config.patch new file mode 100644 index 0000000..4ec87ee --- /dev/null +++ b/debian/patches/pkg-config.patch @@ -0,0 +1,36 @@ +Description: Use pkg-config to determine FFmpeg linker flags + +Author: Andreas Cadhalpun <[email protected]> +Last-Update: <2014-05-21> + +--- handbrake-0.9.9+svn6032+dfsg1.orig/gtk/configure.ac ++++ handbrake-0.9.9+svn6032+dfsg1/gtk/configure.ac +@@ -183,7 +183,9 @@ case $host in + ;; + esac + +-HB_LIBS="-lhandbrake -la52 -lavresample -lavformat -lavcodec -lavutil -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lsamplerate -lx264 -lswscale -ltheoraenc -ltheoradec -lz -lbz2 -lpthread -lbluray -lass -lfontconfig -lfreetype -lxml2 -ldl" ++PKG_CHECK_MODULES([FFMPEG], [libavresample libavformat libavcodec libavutil libswscale]) ++ ++HB_LIBS="-lhandbrake -la52 $FFMPEG_LIBS -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lsamplerate -lx264 -ltheoraenc -ltheoradec -lz -lbz2 -lpthread -lbluray -lass -lfontconfig -lfreetype -lxml2 -ldl" + + if test "x$use_fdk_aac" = "xyes" ; then + HB_LIBS+=" -lfdk-aac" +--- handbrake-0.9.9+svn6032+dfsg1.orig/test/module.defs ++++ handbrake-0.9.9+svn6032+dfsg1/test/module.defs +@@ -11,10 +11,13 @@ TEST.exe = $(BUILD/)$(call TARGET.exe,$( + + TEST.libs = $(LIBHB.a) + ++FFMPEG_LIBS = $(shell $(PKGCONFIG.exe) --libs libavcodec libavformat libavutil libavresample libswscale) ++FFMPEG_NAMES = $(subst -l,,$(FFMPEG_LIBS)) ++ + TEST.GCC.l = \ +- a52 ass avcodec avformat avutil avresample dvdnav dvdread \ ++ a52 ass $(FFMPEG_NAMES) dvdnav dvdread \ + fontconfig mp3lame ogg \ +- samplerate swscale theoraenc theoradec vorbis vorbisenc x264 \ ++ samplerate theoraenc theoradec vorbis vorbisenc x264 \ + bluray freetype xml2 bz2 z + + ifeq (1,$(FEATURE.qsv)) diff --git a/debian/patches/series b/debian/patches/series index b887273..4e453ae 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 001-Do-not-require-wget-or-curl.patch 002-Remove-embedded-downloaded-copies-of-various-librari.patch 004-link-fix-add-ldl.patch +pkg-config.patch

