Source: amide
Version: 1.0.5-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/Use-FFMPEG_LIBS-everywhere.patch b/debian/patches/Use-FFMPEG_LIBS-everywhere.patch
new file mode 100644
index 0000000..bcfaa3d
--- /dev/null
+++ b/debian/patches/Use-FFMPEG_LIBS-everywhere.patch
@@ -0,0 +1,41 @@
+Description: Use pkg-config to determine FFmpeg linker flags
+
+Author: Andreas Cadhalpun <[email protected]>
+Last-Update: <2014-05-08>
+
+--- amide-1.0.5.orig/configure.ac
++++ amide-1.0.5/configure.ac
+@@ -102,11 +102,17 @@ AC_CHECK_LIB(volpack, vpGetErrorString,
+ AM_PATH_XMEDCON(0.10.0, FOUND_XMEDCON=yes, FOUND_XMEDCON=no)
+ 
+ 
++dnl trying to phase out libfame use in favor of ffmpeg
++PKG_CHECK_MODULES(FFMPEG, [
++    libavcodec >= 51.45.0,
++    libavutil
++], FOUND_FFMPEG=yes, FOUND_FFMPEG=no);
++
+ 
+ dnl switch to C++ for DCMTK library stuff - also, if pthread is on the platform, probably need that
+ dnl autoconf doesn't have a nice macro for checking for c++ libraries, therefore the below:
+ AC_CHECK_LIB(pthread, pthread_mutex_init, THREAD_LIBS="-lpthread", THREAD_LIBS="")
+-AMIDE_LIBDCMDATA_LIBS="-ldcmdata -lofstd -loflog -lavcodec -lavutil -lz $THREAD_LIBS"
++AMIDE_LIBDCMDATA_LIBS="-ldcmdata -lofstd -loflog $FFMPEG_LIBS -lz $THREAD_LIBS"
+ AMIDE_LIBDCMDATA_CFLAGS="-I/usr/include/dcmtk/dcmdata"
+ saved_libs="${LIBS}"
+ LIBS="${LIBS} ${AMIDE_LIBDCMDATA_LIBS}"
+@@ -123,14 +129,6 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([#includ
+ LIBS="${saved_libs}"
+ CXXFLAGS="${saved_cxxflags}"                                                                                        
+ 
+-
+-dnl trying to phase out libfame use in favor of ffmpeg
+-PKG_CHECK_MODULES(FFMPEG, [
+-    libavcodec >= 51.45.0,
+-    libavutil
+-], FOUND_FFMPEG=yes, FOUND_FFMPEG=no);
+-
+-
+ dnl Let people compile without debugging information
+ AC_ARG_ENABLE(
+ 	amide_debug, 
diff --git a/debian/patches/series b/debian/patches/series
index dddac59..3ce9336 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 10_Makefile.am.patch
 10_desktop.in.patch
 libav10.patch
+Use-FFMPEG_LIBS-everywhere.patch

Reply via email to