Source: tupi Version: 0.2+git04-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/control b/debian/control index bdc5750..47fdc62 100644 --- a/debian/control +++ b/debian/control @@ -14,6 +14,7 @@ Build-Depends: debhelper (>= 9), ruby (>= 4.9), perl, qt4-qmake, pkg-config ,libquazip-dev ,libtheora-dev ,zlib1g-dev + ,pkg-config Standards-Version: 3.9.5 Homepage: http://www.maefloresta.com/portal Vcs-Git: git://anonscm.debian.org/collab-maint/tupi.git diff --git a/debian/patches/pkg-config.patch b/debian/patches/pkg-config.patch new file mode 100644 index 0000000..81015f5 --- /dev/null +++ b/debian/patches/pkg-config.patch @@ -0,0 +1,58 @@ +Description: Use pkg-config to determine FFmpeg linker flags + +Author: Andreas Cadhalpun <[email protected]> +Last-Update: <2014-05-15> + +--- tupi-0.2+git04.orig/configure.tests/ffmpeg/ffmpeg.pro ++++ tupi-0.2+git04/configure.tests/ffmpeg/ffmpeg.pro +@@ -14,6 +14,6 @@ INCLUDEPATH += . + INCLUDEPATH += /usr/include/ffmpeg + DEFINES += __STDC_CONSTANT_MACROS + +-LIBS += -lavformat -lavcodec -lavutil ++LIBS += `pkg-config --libs libavformat libavcodec libavutil` + # Input + SOURCES += main.cpp +--- tupi-0.2+git04.orig/configure.tests/ffmpeg/ffmpeg.qonf ++++ tupi-0.2+git04/configure.tests/ffmpeg/ffmpeg.qonf +@@ -8,8 +8,7 @@ + <define value="HAVE_FFMPEG" /> + </defines> + <libs> +- <lib path="-lavformat" /> +- <lib path="-lavcodec" /> ++ <lib path="`pkg-config --libs libavformat libavcodec`" /> + </libs> + <includes> + <include path="/usr/include/ffmpeg/" /> +--- tupi-0.2+git04.orig/qonf/config.rb ++++ tupi-0.2+git04/qonf/config.rb +@@ -111,7 +111,7 @@ class Config + File.open("src/framework/tupconfig.pri", "w") { |f| + f << "# Generated automatically at #{Time.now}! PLEASE DO NOT EDIT!"<< $endl + f << "contains(DEFINES, HAVE_FFMPEG){" << $endl +- f << "LIBS += -lavcodec -lavformat -lavutil" << $endl ++ f << "LIBS += `pkg-config --libs libavcodec libavformat libavutil`" << $endl + f << "}" << $endl + if @defines.include? 'ADD_HEADERS' + f << "DEFINES += ADD_HEADERS" << $endl +--- tupi-0.2+git04.orig/qonf/configure.rb ++++ tupi-0.2+git04/qonf/configure.rb +@@ -142,7 +142,7 @@ module RQonf + Info.info << "Creating makefiles..." << $endl + + if RUBY_PLATFORM.downcase.include?("darwin") +- qmakeLine = "'CONFIG += console warn_on' 'INCLUDEPATH += /usr/local/include/quazip LIBS += -L/usr/local/lib -lavcodec -lavutil -lavformat -framework CoreFoundation'" ++ qmakeLine = "'CONFIG += console warn_on' 'INCLUDEPATH += /usr/local/include/quazip LIBS += -L/usr/local/lib `pkg-config --libs libavcodec libavutil libavformat` -framework CoreFoundation'" + @qmake.run(qmakeLine, true) + else + @qmake.run("", true) +--- tupi-0.2+git04.orig/src/framework/tgui/tgui.pro ++++ tupi-0.2+git04/src/framework/tgui/tgui.pro +@@ -156,5 +156,5 @@ linux-g{ + LIBS += -L../tcore -ltupifwcore + + macx { +- LIBS += -lavcodec -lavformat -lavutil ++ LIBS += `pkg-config libavcodec libavformat libavutil` + } diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..9937964 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +pkg-config.patch

