summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2012-11-08 11:31:35 +0000
committerAlexis Ballier <aballier@gentoo.org>2012-11-08 11:31:35 +0000
commit486c954cb2e58fd769126a11a2730f6e63822da6 (patch)
treefc26e6a3e8dbafcc7e8d206b30718c75df9994ce /media-libs/ffmpegsource
parentVersion bump fixes bug 434994. (diff)
downloadgentoo-2-486c954cb2e58fd769126a11a2730f6e63822da6.tar.gz
gentoo-2-486c954cb2e58fd769126a11a2730f6e63822da6.tar.bz2
gentoo-2-486c954cb2e58fd769126a11a2730f6e63822da6.zip
backport upstream patch to build with latest ffmpeg releases, bug #417983
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
Diffstat (limited to 'media-libs/ffmpegsource')
-rw-r--r--media-libs/ffmpegsource/ChangeLog6
-rw-r--r--media-libs/ffmpegsource/ffmpegsource-2.17.ebuild4
-rw-r--r--media-libs/ffmpegsource/files/ffmpegsource-2.17-ffmpeg.patch102
3 files changed, 110 insertions, 2 deletions
diff --git a/media-libs/ffmpegsource/ChangeLog b/media-libs/ffmpegsource/ChangeLog
index af1bb6c6d066..52be7cc57d3a 100644
--- a/media-libs/ffmpegsource/ChangeLog
+++ b/media-libs/ffmpegsource/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-libs/ffmpegsource
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/ffmpegsource/ChangeLog,v 1.12 2012/05/21 22:40:12 jdhore Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/ffmpegsource/ChangeLog,v 1.13 2012/11/08 11:31:35 aballier Exp $
+
+ 08 Nov 2012; Alexis Ballier <aballier@gentoo.org> ffmpegsource-2.17.ebuild,
+ +files/ffmpegsource-2.17-ffmpeg.patch:
+ backport upstream patch to build with latest ffmpeg releases, bug #417983
21 May 2012; Jeff Horelick <jdhore@gentoo.org> ffmpegsource-2.17.ebuild:
marked x86 per bug 416777
diff --git a/media-libs/ffmpegsource/ffmpegsource-2.17.ebuild b/media-libs/ffmpegsource/ffmpegsource-2.17.ebuild
index 80d88d6a4dae..80294ea3e169 100644
--- a/media-libs/ffmpegsource/ffmpegsource-2.17.ebuild
+++ b/media-libs/ffmpegsource/ffmpegsource-2.17.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/ffmpegsource/ffmpegsource-2.17.ebuild,v 1.4 2012/05/21 22:40:12 jdhore Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/ffmpegsource/ffmpegsource-2.17.ebuild,v 1.5 2012/11/08 11:31:35 aballier Exp $
EAPI=4
@@ -28,6 +28,8 @@ DEPEND="${RDEPEND}
S="${WORKDIR}/${MY_P}"
+PATCHES=( "${FILESDIR}/${P}-ffmpeg.patch" )
+
src_configure() {
local myeconfargs=(
--docdir="${EPREFIX}/usr/share/doc/${PF}/html"
diff --git a/media-libs/ffmpegsource/files/ffmpegsource-2.17-ffmpeg.patch b/media-libs/ffmpegsource/files/ffmpegsource-2.17-ffmpeg.patch
new file mode 100644
index 000000000000..41c4fb5106e4
--- /dev/null
+++ b/media-libs/ffmpegsource/files/ffmpegsource-2.17-ffmpeg.patch
@@ -0,0 +1,102 @@
+https://bugs.gentoo.org/show_bug.cgi?id=417983
+Backported from upstream.
+
+Index: ffms-2.17-src/configure.in
+===================================================================
+--- ffms-2.17-src.orig/configure.in
++++ ffms-2.17-src/configure.in
+@@ -135,7 +135,7 @@ AC_DEFUN([TEST_LIBAV],
+ #include <libavcodec/avcodec.h>
+ #include <libswscale/swscale.h>
+ ]],[[
+- avcodec_init();
++ av_register_all();
+ swscale_version();
+ #ifdef FFMS_USE_FFMPEG_COMPAT
+ int bogus = CODEC_ID_G2M;
+Index: ffms-2.17-src/include/ffmscompat.h
+===================================================================
+--- ffms-2.17-src.orig/include/ffmscompat.h
++++ ffms-2.17-src/include/ffmscompat.h
+@@ -84,6 +84,14 @@
+ # else
+ # define FFMS_CALCULATE_DELAY (CodecContext->has_b_frames + (CodecContext->thread_count - 1))
+ # endif
++# if VERSION_CHECK(LIBAVCODEC_VERSION_INT, <, 54, 25, 0, 54, 51, 100)
++# define FFMS_ID(x) (CODEC_ID_##x)
++# define FFMS_CodecID CodecID
++# else
++# define FFMS_ID(x) (AV_CODEC_ID_##x)
++# define FFMS_CodecID AVCodecID
++# undef CodecID
++# endif
+ #endif
+
+ #ifdef LIBAVUTIL_VERSION_INT
+Index: ffms-2.17-src/src/core/codectype.cpp
+===================================================================
+--- ffms-2.17-src.orig/src/core/codectype.cpp
++++ ffms-2.17-src/src/core/codectype.cpp
+@@ -25,7 +25,7 @@
+
+ typedef struct CodecTags {
+ char str[20];
+- CodecID id;
++ FFMS_CodecID id;
+ } CodecTags;
+
+ static const CodecTags mkv_codec_tags[] = {
+@@ -92,7 +92,7 @@ static const CodecTags mkv_codec_tags[]
+ };
+
+ typedef struct AVCodecTag {
+- enum CodecID id;
++ enum FFMS_CodecID id;
+ unsigned int tag;
+ } AVCodecTag;
+
+@@ -400,7 +400,7 @@ const char *GetLAVCSampleFormatName(AVSa
+ }
+ }
+
+-CodecID MatroskaToFFCodecID(char *Codec, void *CodecPrivate, unsigned int FourCC, unsigned int BitsPerSample) {
++FFMS_CodecID MatroskaToFFCodecID(char *Codec, void *CodecPrivate, unsigned int FourCC, unsigned int BitsPerSample) {
+ /* Look up native codecs */
+ for(int i = 0; mkv_codec_tags[i].id != CODEC_ID_NONE; i++){
+ if(!strncmp(mkv_codec_tags[i].str, Codec,
+@@ -408,7 +408,7 @@ CodecID MatroskaToFFCodecID(char *Codec,
+
+ // Uncompressed and exotic format fixup
+ // This list is incomplete
+- CodecID CID = mkv_codec_tags[i].id;
++ FFMS_CodecID CID = mkv_codec_tags[i].id;
+ switch (CID) {
+ case CODEC_ID_PCM_S16LE:
+ switch (BitsPerSample) {
+Index: ffms-2.17-src/src/core/codectype.h
+===================================================================
+--- ffms-2.17-src.orig/src/core/codectype.h
++++ ffms-2.17-src/src/core/codectype.h
+@@ -27,5 +27,5 @@ extern "C" {
+ #include "ffmscompat.h"
+
+ FFMS_TrackType HaaliTrackTypeToFFTrackType(int TT);
+-CodecID MatroskaToFFCodecID(char *Codec, void *CodecPrivate, unsigned int FourCC = 0, unsigned int BitsPerSample = 0);
++FFMS_CodecID MatroskaToFFCodecID(char *Codec, void *CodecPrivate, unsigned int FourCC = 0, unsigned int BitsPerSample = 0);
+ const char *GetLAVCSampleFormatName(AVSampleFormat s);
+Index: ffms-2.17-src/src/core/matroskaparser.h
+===================================================================
+--- ffms-2.17-src.orig/src/core/matroskaparser.h
++++ ffms-2.17-src/src/core/matroskaparser.h
+@@ -32,6 +32,11 @@
+ #ifndef MATROSKA_PARSER_H
+ #define MATROSKA_PARSER_H
+
++/* Make sure we undefine CodecID, since libavcodec defines it as AVCodec ID */
++#ifdef CodecID
++#undef CodecID
++#endif
++
+ /* Random notes:
+ *
+ * The parser does not process frame data in any way and does not read it into