Source: ovito Version: 2.3.3-3 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 0a60663..ff837a4 100644 --- a/debian/control +++ b/debian/control @@ -27,6 +27,7 @@ Build-Depends: libqt5opengl5-dev, libqcustomplot-dev (>=1.2.0), libtachyon-dev [!hurd-i386], + pkg-config, python-dev, qt5-default, qtbase5-dev-tools, diff --git a/debian/patches/pkg-config.patch b/debian/patches/pkg-config.patch new file mode 100644 index 0000000..b5fa143 --- /dev/null +++ b/debian/patches/pkg-config.patch @@ -0,0 +1,32 @@ +Description: Use pkg-config to determine FFmpeg linker flags + +Author: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> +Last-Update: <2014-05-20> + +--- ovito-2.3.3~beta1~git7e66e42.orig/cmake/FindFFmpeg.cmake ++++ ovito-2.3.3~beta1~git7e66e42/cmake/FindFFmpeg.cmake +@@ -18,10 +18,15 @@ ELSE() + INCLUDE(FindPkgConfig) + IF(PKG_CONFIG_FOUND) + PKG_CHECK_MODULES(AVFORMAT libavformat) ++ string(REPLACE "-l" "" avformat_name "${AVFORMAT_LIBRARIES}") + PKG_CHECK_MODULES(AVCODEC libavcodec) ++ string(REPLACE "-l" "" avcodec_name "${AVCODEC_LIBRARIES}") + PKG_CHECK_MODULES(AVUTIL libavutil) ++ string(REPLACE "-l" "" avutil_name "${AVUTIL_LIBRARIES}") + PKG_CHECK_MODULES(AVDEVICE libavdevice) ++ string(REPLACE "-l" "" avdevice_name "${AVDEVICE_LIBRARIES}") + PKG_CHECK_MODULES(SWSCALE libswscale) ++ string(REPLACE "-l" "" swscale_name "${SWSCALE_LIBRARIES}") + ENDIF() + + SET(FFMPEG_LIBRARY_DIR ${AVFORMAT_LIBRARY_DIRS} +@@ -71,7 +76,7 @@ ENDIF() + # Find the full paths of the libraries + FOREACH(LIB ${FFMPEG_LIBRARIES}) + SET(LIB_PATH NOTFOUND) +- FIND_LIBRARY(LIB_PATH NAMES ${LIB} PATHS ${FFMPEG_LIBRARY_DIR} $ENV{HOME}/progs/libavstatic/lib) ++ FIND_LIBRARY(LIB_PATH NAMES ${${LIB}_name} ${LIB} PATHS ${FFMPEG_LIBRARY_DIR} $ENV{HOME}/progs/libavstatic/lib) + IF(LIB_PATH) + SET(FFMPEG_LIBRARIES_FULL ${FFMPEG_LIBRARIES_FULL} ${LIB_PATH}) + ELSE() diff --git a/debian/patches/series b/debian/patches/series index f3e96f1..dc574f4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 10_add_c+11.patch +pkg-config.patch
-- debian-science-maintainers mailing list debian-science-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers