Source: jugglemaster
Version: 0.4-7
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/control b/debian/control
index 897911c..66ae48d 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,8 @@ Uploaders: Helmut Grohne <[email protected]>
 Build-Depends: debhelper (>= 7.0.50~),
  libaa1-dev,
  libavcodec-dev,
- libwxgtk3.0-dev
+ libwxgtk3.0-dev,
+ pkg-config
 Standards-Version: 3.9.4
 Homepage: http://icculus.org/jugglemaster/
 Vcs-Svn: svn://anonscm.debian.org/pkg-games/packages/trunk/jugglemaster/
diff --git a/debian/patches/pkg-config.patch b/debian/patches/pkg-config.patch
new file mode 100644
index 0000000..27f9a03
--- /dev/null
+++ b/debian/patches/pkg-config.patch
@@ -0,0 +1,17 @@
+Description: Use pkg-config to determine FFmpeg linker flags
+
+Author: Andreas Cadhalpun <[email protected]>
+Last-Update: <2014-05-14>
+
+--- jugglemaster-0.4.orig/src/jmdlx/Makefile
++++ jugglemaster-0.4/src/jmdlx/Makefile
+@@ -10,7 +10,8 @@ INSTALL=install
+ 
+ ifeq ($(HAVE_FFMPEG), 1)
+ CXXFLAGS+=-DHAVE_AVCODEC_H
+-LIBS+=-lavcodec
++FFMPEG_LIBS=`pkg-config --libs libavcodec`
++LIBS+=$(FFMPEG_LIBS)
+ endif
+ 
+ ifeq ($(DEBUG), 1)
diff --git a/debian/patches/series b/debian/patches/series
index 65757d4..1ef1f1e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -14,3 +14,4 @@ ld-as-needed.patch
 libav10.patch
 include-header-for-memset.patch
 wx3.0-compat.patch
+pkg-config.patch

Reply via email to