summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2012-10-24 22:36:12 +0000
committerAlexis Ballier <aballier@gentoo.org>2012-10-24 22:36:12 +0000
commitebe3c78112aa5ef2966a47f8ee20a1ea4fd88d76 (patch)
tree89a8b9ecedcabb3a099d99bc4916905b50d7f95c /media-tv
parentAdd patch to replace install usage. Add ~x86-fbsd. #303909 (diff)
downloadgentoo-2-ebe3c78112aa5ef2966a47f8ee20a1ea4fd88d76.tar.gz
gentoo-2-ebe3c78112aa5ef2966a47f8ee20a1ea4fd88d76.tar.bz2
gentoo-2-ebe3c78112aa5ef2966a47f8ee20a1ea4fd88d76.zip
Backport a huge patchset from upstream master to be compatible with ffmpeg 0.10 up to current git master. Bug #438842. Rebase the libav patches on top of these changes, it seems they were sent upstream but not applied. Drop a now useless patch with this refactoring. Please CC me on bugs if these patches cause problems.
(Portage version: 2.2.0_alpha141/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
Diffstat (limited to 'media-tv')
-rw-r--r--media-tv/xbmc/ChangeLog10
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-ffmpeg.patch46
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-libav.patch103
-rw-r--r--media-tv/xbmc/xbmc-11.0.ebuild11
4 files changed, 67 insertions, 103 deletions
diff --git a/media-tv/xbmc/ChangeLog b/media-tv/xbmc/ChangeLog
index 7ff8d3b20c63..1e52fe2e0166 100644
--- a/media-tv/xbmc/ChangeLog
+++ b/media-tv/xbmc/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for media-tv/xbmc
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/ChangeLog,v 1.150 2012/10/09 21:44:28 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/ChangeLog,v 1.151 2012/10/24 22:36:12 aballier Exp $
+
+ 24 Oct 2012; Alexis Ballier <aballier@gentoo.org> xbmc-11.0.ebuild,
+ -files/xbmc-11.0-ffmpeg.patch, files/xbmc-11.0-libav.patch:
+ Backport a huge patchset from upstream master to be compatible with ffmpeg
+ 0.10 up to current git master. Bug #438842. Rebase the libav patches on top
+ of these changes, it seems they were sent upstream but not applied. Drop a
+ now useless patch with this refactoring. Please CC me on bugs if these
+ patches cause problems.
09 Oct 2012; Mike Frysinger <vapier@gentoo.org> xbmc-9999.ebuild:
Skip running eautoreconf in libapetag & libid3tag #437368 by BT.
diff --git a/media-tv/xbmc/files/xbmc-11.0-ffmpeg.patch b/media-tv/xbmc/files/xbmc-11.0-ffmpeg.patch
deleted file mode 100644
index 51372fdc1db9..000000000000
--- a/media-tv/xbmc/files/xbmc-11.0-ffmpeg.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-https://bugs.gentoo.org/406215
-
-From 97212837ec81c3869ba60e0690f26c09b9428747 Mon Sep 17 00:00:00 2001
-From: Tomas Chvatal <tchvatal@suse.cz>
-Date: Fri, 30 Mar 2012 10:00:46 +0200
-Subject: [PATCH] Ensure we include proper header on ffmpeg.
-
----
- configure.in | 3 +++
- lib/DllAvFilter.h | 6 +++++-
- 2 files changed, 8 insertions(+), 1 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index bca9239..d209f80 100755
---- a/configure.in
-+++ b/configure.in
-@@ -1229,6 +1229,9 @@ if test "$use_external_ffmpeg" = "yes"; then
- AC_CHECK_HEADERS([libswscale/rgb2rgb.h],,)
- AC_CHECK_HEADERS([ffmpeg/rgb2rgb.h],,)
-
-+ # check for avcodec header as it is not present on libav
-+ AC_CHECK_HEADERS([libavfilter/avcodec.h],,)
-+
- # Check if AVFilterBufferRefVideoProps AVRational member is named
- # 'pixel_aspect' or 'sample_aspect_ratio'.
- AC_CHECK_MEMBER([AVFilterBufferRefVideoProps.sample_aspect_ratio],
-diff --git a/lib/DllAvFilter.h b/lib/DllAvFilter.h
-index 827746e..d47623b 100644
---- a/lib/DllAvFilter.h
-+++ b/lib/DllAvFilter.h
-@@ -48,7 +48,11 @@ extern "C" {
- #endif
- /* for av_vsrc_buffer_add_frame */
- #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,8,0)
-- #include <libavfilter/vsrc_buffer.h>
-+ #if defined(HAVE_LIBAVFILTER_AVCODEC_H)
-+ #include <libavfilter/avcodec.h>
-+ #else
-+ #include <libavfilter/vsrc_buffer.h>
-+ #endif
- #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
- int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter,
- AVFrame *frame);
---
-1.7.3.4
-
diff --git a/media-tv/xbmc/files/xbmc-11.0-libav.patch b/media-tv/xbmc/files/xbmc-11.0-libav.patch
index 0aaa1ce41849..84a215a72684 100644
--- a/media-tv/xbmc/files/xbmc-11.0-libav.patch
+++ b/media-tv/xbmc/files/xbmc-11.0-libav.patch
@@ -1,3 +1,6 @@
+Patch rebased to current patches backported from upstream by Alexis Ballier.
+Based on the previous patch, submitted upstream but not merged it seems:
+
https://bugs.gentoo.org/406215
From c74abc298e2075f431d9fa700fcfc5e1bbbddf22 Mon Sep 17 00:00:00 2001
@@ -9,64 +12,60 @@ The libav use micro version as 0
The ffmpeg use the micro version as 100+
Simply check if the variable is defined then it is not libav.
----
- lib/DllAvFilter.h | 10 +++++++++-
- .../DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 4 ++++
- 2 files changed, 13 insertions(+), 1 deletions(-)
-
-diff --git a/lib/DllAvFilter.h b/lib/DllAvFilter.h
-index 302e35c..827746e 100644
---- a/lib/DllAvFilter.h
-+++ b/lib/DllAvFilter.h
-@@ -48,7 +48,7 @@ extern "C" {
- #endif
- /* for av_vsrc_buffer_add_frame */
- #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,8,0)
+Index: xbmc-11.0/lib/DllAvFilter.h
+===================================================================
+--- xbmc-11.0.orig/lib/DllAvFilter.h
++++ xbmc-11.0/lib/DllAvFilter.h
+@@ -45,7 +45,11 @@ extern "C" {
+ #if (defined HAVE_LIBAVFILTER_AVFILTER_H)
+ #include <libavfilter/avfiltergraph.h>
+ #include <libavfilter/buffersink.h>
- #include <libavfilter/avcodec.h>
-+ #include <libavfilter/vsrc_buffer.h>
- #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
- int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter,
- AVFrame *frame);
-@@ -83,7 +83,11 @@ public:
- virtual int avfilter_poll_frame(AVFilterLink *link)=0;
- virtual int avfilter_request_frame(AVFilterLink *link)=0;
- #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,13,0)
-+#if LIBAVFILTER_VERSION_MICRO
- virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0;
-+#else
++ #if LIBAVFILTER_VERSION_MICRO < 50 // Libav
++ #include <libavfilter/vsrc_buffer.h>
++ #else
++ #include <libavfilter/avcodec.h>
++ #endif
+ #elif (defined HAVE_FFMPEG_AVFILTER_H)
+ #include <ffmpeg/avfiltergraph.h>
+ #include <ffmpeg/buffersink.h>
+@@ -75,7 +79,11 @@ public:
+ virtual int avfilter_graph_parse(AVFilterGraph *graph, const char *filters, AVFilterInOut **inputs, AVFilterInOut **outputs, void *log_ctx)=0;
+ virtual int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx)=0;
+ #if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0)
++#if LIBAVFILTER_VERSION_MICRO < 50 // Libav
+ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int64_t pts, AVRational pixel_aspect)=0;
-+#endif
- #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
- virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame)=0;
- #elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,3,0)
-@@ -172,7 +176,11 @@ public:
- virtual int avfilter_poll_frame(AVFilterLink *link) { return ::avfilter_poll_frame(link); }
- virtual int avfilter_request_frame(AVFilterLink *link) { return ::avfilter_request_frame(link); }
- #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,13,0)
-+#if LIBAVFILTER_VERSION_MICRO
- virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, flags); }
+#else
+ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0;
++#endif
+ #else
+ virtual int av_buffersrc_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0;
+ #endif
+@@ -135,7 +143,11 @@ public:
+ return ::avfilter_graph_config(graphctx, log_ctx);
+ }
+ #if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0)
++#if LIBAVFILTER_VERSION_MICRO < 50 // Libav
+ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int64_t pts, AVRational pixel_aspect) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, pts, pixel_aspect); }
++#else
+ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, flags); }
+#endif
- #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
- virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame); }
- #elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,3,0)
-diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
-index b4e1451..4e5eedf 100644
---- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
-+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
-@@ -814,7 +814,11 @@ int CDVDVideoCodecFFmpeg::FilterProcess(AVFrame* frame)
+ #else
+ virtual int av_buffersrc_add_frame(AVFilterContext *buffer_filter, AVFrame* frame, int flags) { return ::av_buffersrc_add_frame(buffer_filter, frame, flags); }
+ #endif
+Index: xbmc-11.0/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+===================================================================
+--- xbmc-11.0.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
++++ xbmc-11.0/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+@@ -833,7 +833,11 @@ int CDVDVideoCodecFFmpeg::FilterProcess(
if (frame)
{
- #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,13,0)
-+#if LIBAVFILTER_VERSION_MICRO
- result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, 0);
-+#else
+ #if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0)
++#if LIBAVFILTER_VERSION_MICRO < 50 // Libav
+ result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, frame->pts, m_pCodecContext->sample_aspect_ratio);
++#else
+ result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, 0);
+#endif
- #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
- result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame);
- #elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,3,0)
---
-1.7.3.4
-
+ #else
+ result = m_dllAvFilter.av_buffersrc_add_frame(m_pFilterIn, frame, 0);
+ #endif
diff --git a/media-tv/xbmc/xbmc-11.0.ebuild b/media-tv/xbmc/xbmc-11.0.ebuild
index 0440eca93c53..5763c29d12b0 100644
--- a/media-tv/xbmc/xbmc-11.0.ebuild
+++ b/media-tv/xbmc/xbmc-11.0.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-tv/xbmc/xbmc-11.0.ebuild,v 1.14 2012/09/05 07:52:07 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/xbmc-11.0.ebuild,v 1.15 2012/10/24 22:36:12 aballier Exp $
EAPI="4"
@@ -16,7 +16,8 @@ if [[ ${PV} == "9999" ]] ; then
else
inherit autotools
MY_P=${P/_/-*_}
- SRC_URI="http://mirrors.xbmc.org/releases/source/${MY_P}.tar.gz"
+ SRC_URI="http://mirrors.xbmc.org/releases/source/${MY_P}.tar.gz
+ http://dev.gentoo.org/~aballier/distfiles/${P}-ffmpeg-1.0-compat-1.tar.bz2"
KEYWORDS="amd64 x86"
S=${WORKDIR}/${MY_P}
fi
@@ -74,7 +75,7 @@ COMMON_DEPEND="virtual/opengl
pulseaudio? ( media-sound/pulseaudio )
media-sound/wavpack
|| ( media-libs/libpostproc <media-video/libav-0.8.2-r1 media-video/ffmpeg )
- >=virtual/ffmpeg-0.6[encode]
+ >=virtual/ffmpeg-0.10.2[encode]
rtmp? ( media-video/rtmpdump )
avahi? ( net-dns/avahi )
webserver? ( net-libs/libmicrohttpd )
@@ -126,9 +127,11 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-11.0-nomythtv.patch
epatch "${FILESDIR}"/${PN}-11.0-no-arm-flags.patch #400617
epatch "${FILESDIR}"/${PN}-11.0-no-exec-stack.patch
+ EPATCH_MULTI_MSG="Applying patches from upstream to fix building with recent FFmpeg versions..." \
+ EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}/${P}-ffmpeg-1.0-compat" #438842
epatch "${FILESDIR}"/${PN}-11.0-ffmpeg-0.10.2.patch #406215
epatch "${FILESDIR}"/${PN}-11.0-libav.patch #406215
- epatch "${FILESDIR}"/${PN}-11.0-ffmpeg.patch #406215
# The mythtv patch touches configure.ac, so force a regen
rm -f configure