summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <hwoarang@gentoo.org>2013-01-17 19:47:01 +0000
committerMarkos Chandras <hwoarang@gentoo.org>2013-01-17 19:47:01 +0000
commit2f351a0dd8323a7c26e2ea51d09d604a0e66ae28 (patch)
treeb1a5fe7c9cb39da635f1792279a4fbcd7e495e00 /net-voip
parentVersion bump (diff)
downloadgentoo-2-2f351a0dd8323a7c26e2ea51d09d604a0e66ae28.tar.gz
gentoo-2-2f351a0dd8323a7c26e2ea51d09d604a0e66ae28.tar.bz2
gentoo-2-2f351a0dd8323a7c26e2ea51d09d604a0e66ae28.zip
Add upstream patch to fix building against libav-9. Bug #448718. Thanks to Marcel Pennewiß <gentoo@pennewiss.de>
(Portage version: 2.1.11.43/cvs/Linux x86_64, signed Manifest commit with key B4AFF2C2)
Diffstat (limited to 'net-voip')
-rw-r--r--net-voip/homer/ChangeLog9
-rw-r--r--net-voip/homer/files/homer-0.24.1-libav-9.patch101
-rw-r--r--net-voip/homer/homer-0.24.1.ebuild8
3 files changed, 114 insertions, 4 deletions
diff --git a/net-voip/homer/ChangeLog b/net-voip/homer/ChangeLog
index 9d038a4ce1fa..6ba60e750c27 100644
--- a/net-voip/homer/ChangeLog
+++ b/net-voip/homer/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-voip/homer
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-voip/homer/ChangeLog,v 1.1 2012/12/23 17:50:07 hwoarang Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-voip/homer/ChangeLog,v 1.2 2013/01/17 19:47:01 hwoarang Exp $
+
+ 17 Jan 2013; Markos Chandras <hwoarang@gentoo.org>
+ +files/homer-0.24.1-libav-9.patch, homer-0.24.1.ebuild:
+ Add upstream patch to fix building against libav-9. Bug #448718. Thanks to
+ Marcel Pennewiß <gentoo@pennewiss.de>
*homer-9999 (23 Dec 2012)
*homer-0.24.1 (23 Dec 2012)
diff --git a/net-voip/homer/files/homer-0.24.1-libav-9.patch b/net-voip/homer/files/homer-0.24.1-libav-9.patch
new file mode 100644
index 000000000000..985145e06540
--- /dev/null
+++ b/net-voip/homer/files/homer-0.24.1-libav-9.patch
@@ -0,0 +1,101 @@
+--- HomerMultimedia/include/Header_Ffmpeg.h
++++ HomerMultimedia/include/Header_Ffmpeg.h
+@@ -173,4 +173,16 @@
+ #endif
+ }
+
++inline AVStream *HM_avformat_new_stream(AVFormatContext *s, int id)
++{
++ #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(53, 10, 0)
++ return av_new_stream(s, c);
++ #else
++ AVStream *st = avformat_new_stream(s, NULL);
++ if (st)
++ st->id = id;
++ return st;
++ #endif
++}
++
+ #endif
+--- HomerMultimedia/src/MediaSource.cpp
++++ HomerMultimedia/src/MediaSource.cpp
+@@ -236,11 +236,19 @@
+ {
+ if (tCodec->type == AVMEDIA_TYPE_VIDEO)
+ {
++ #ifndef FF_API_OLD_ENCODE_AUDIO
+ bool tEncode = (tCodec->encode != NULL);
++ #else
++ bool tEncode = (tCodec->encode2 != NULL);
++ #endif
+ bool tDecode = (tCodec->decode != NULL);
+ if ((tNextCodec != NULL) && (strcmp(tCodec->name, tNextCodec->name) == 0))
+ {
++ #ifndef FF_API_OLD_ENCODE_AUDIO
+ tEncode |= (tNextCodec->encode != NULL);
++ #else
++ tEncode |= (tNextCodec->encode2 != NULL);
++ #endif
+ tDecode |= (tNextCodec->decode != NULL);
+ tCodec = tNextCodec;
+ }
+@@ -296,11 +304,19 @@
+ // tNextCodec->encode ? "E" : " ",
+ // tNextCodec->name,
+ // tNextCodec->long_name ? tCodec->long_name : "");
++ #ifndef FF_API_OLD_ENCODE_AUDIO
+ bool tEncode = (tCodec->encode != NULL);
++ #else
++ bool tEncode = (tCodec->encode2 != NULL);
++ #endif
+ bool tDecode = (tCodec->decode != NULL);
+ if ((tNextCodec != NULL) && (strcmp(tCodec->name, tNextCodec->name) == 0))
+ {
++ #ifndef FF_API_OLD_ENCODE_AUDIO
+ tEncode |= (tNextCodec->encode != NULL);
++ #else
++ tEncode |= (tNextCodec->encode2 != NULL);
++ #endif
+ tDecode |= (tNextCodec->decode != NULL);
+ tCodec = tNextCodec;
+ }
+@@ -1622,7 +1638,7 @@
+ sprintf(mRecorderFormatContext->filename, "%s", pSaveFileName.c_str());
+
+ // allocate new stream structure
+- tStream = av_new_stream(mRecorderFormatContext, 0);
++ tStream = HM_avformat_new_stream(mRecorderFormatContext, 0);
+ mRecorderCodecContext = tStream->codec;
+
+ // put sample parameters
+--- HomerMultimedia/src/MediaSourceMuxer.cpp
++++ HomerMultimedia/src/MediaSourceMuxer.cpp
+@@ -377,7 +377,7 @@
+
+ // allocate new stream structure
+ LOG(LOG_VERBOSE, "..allocating new stream");
+- tStream = av_new_stream(mFormatContext, 0);
++ tStream = HM_avformat_new_stream(mFormatContext, 0);
+ mCodecContext = tStream->codec;
+ mCodecContext->codec_id = tFormat->video_codec;
+ mCodecContext->codec_type = AVMEDIA_TYPE_VIDEO;
+@@ -710,7 +710,7 @@
+ }
+
+ // allocate new stream structure
+- tStream = av_new_stream(mFormatContext, 0);
++ tStream = HM_avformat_new_stream(mFormatContext, 0);
+ mCodecContext = tStream->codec;
+ mCodecContext->codec_id = tFormat->audio_codec;
+ mCodecContext->codec_type = AVMEDIA_TYPE_AUDIO;
+--- HomerMultimedia/src/RTP.cpp
++++ HomerMultimedia/src/RTP.cpp
+@@ -512,7 +512,7 @@
+ // verbose timestamp debugging mRtpFormatContext->debug = FF_FDEBUG_TS;
+
+ // allocate new stream structure
+- tOuterStream = av_new_stream(mRtpFormatContext, 0);//(AVStream*)av_mallocz(sizeof(AVStream));
++ tOuterStream = HM_avformat_new_stream(mRtpFormatContext, 0);//(AVStream*)av_mallocz(sizeof(AVStream));
+ if (tOuterStream == NULL)
+ {
+ LOG(LOG_ERROR, "Memory allocation failed");
diff --git a/net-voip/homer/homer-0.24.1.ebuild b/net-voip/homer/homer-0.24.1.ebuild
index 28c5a1e9940c..c36e3b1ed678 100644
--- a/net-voip/homer/homer-0.24.1.ebuild
+++ b/net-voip/homer/homer-0.24.1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-voip/homer/homer-0.24.1.ebuild,v 1.1 2012/12/23 17:50:07 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-voip/homer/homer-0.24.1.ebuild,v 1.2 2013/01/17 19:47:01 hwoarang Exp $
EAPI=4
@@ -42,6 +42,10 @@ RDEPEND="${DEPEND}"
S="${WORKDIR}/${MY_PN}-${PV}"
+src_prepare() {
+ epatch "${FILESDIR}/${P}-libav-9.patch"
+}
+
src_compile() {
emake -C HomerBuild default \
INSTALL_PREFIX=/usr/bin \