summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen de Groot <yngwin@gentoo.org>2008-06-21 21:24:36 +0000
committerBen de Groot <yngwin@gentoo.org>2008-06-21 21:24:36 +0000
commitc4c0cccf7eca8a91ba36be28f444dce696a4ce35 (patch)
tree66688675a764702d0a8c57165a267f840e7bad1c /media-video
parentAdd check for pango and cairo to be built with X, bug #228801 (diff)
downloadgentoo-2-c4c0cccf7eca8a91ba36be28f444dce696a4ce35.tar.gz
gentoo-2-c4c0cccf7eca8a91ba36be28f444dce696a4ce35.tar.bz2
gentoo-2-c4c0cccf7eca8a91ba36be28f444dce696a4ce35.zip
Add patches to make mpeg4ip compile with new ffmpeg headers location, thanks to Andrew Church in bug 218105.
(Portage version: 2.2_rc1/cvs/Linux 2.6.25-hh5 i686)
Diffstat (limited to 'media-video')
-rw-r--r--media-video/mpeg4ip/ChangeLog10
-rw-r--r--media-video/mpeg4ip/files/mpeg4ip-1.5.0.1-avcodec_extern_c-2.patch80
-rw-r--r--media-video/mpeg4ip/files/mpeg4ip-1.5.0.1-ffmpeg-headers.patch74
-rw-r--r--media-video/mpeg4ip/mpeg4ip-1.5.0.1-r5.ebuild160
4 files changed, 323 insertions, 1 deletions
diff --git a/media-video/mpeg4ip/ChangeLog b/media-video/mpeg4ip/ChangeLog
index ead734df37a8..c04361b09070 100644
--- a/media-video/mpeg4ip/ChangeLog
+++ b/media-video/mpeg4ip/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for media-video/mpeg4ip
# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/mpeg4ip/ChangeLog,v 1.60 2008/05/07 21:12:13 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/mpeg4ip/ChangeLog,v 1.61 2008/06/21 21:24:35 yngwin Exp $
+
+*mpeg4ip-1.5.0.1-r5 (21 Jun 2008)
+
+ 21 Jun 2008; Ben de Groot <yngwin@gentoo.org>
+ +files/mpeg4ip-1.5.0.1-avcodec_extern_c-2.patch,
+ +files/mpeg4ip-1.5.0.1-ffmpeg-headers.patch, +mpeg4ip-1.5.0.1-r5.ebuild:
+ Add patches to make mpeg4ip compile with new ffmpeg headers location,
+ thanks to Andrew Church in bug 218105.
07 May 2008; Diego Pettenò <flameeyes@gentoo.org>
+files/mpeg4ip-1.5.0.1+gcc-4.3.patch, mpeg4ip-1.5.0.1-r4.ebuild:
diff --git a/media-video/mpeg4ip/files/mpeg4ip-1.5.0.1-avcodec_extern_c-2.patch b/media-video/mpeg4ip/files/mpeg4ip-1.5.0.1-avcodec_extern_c-2.patch
new file mode 100644
index 000000000000..6fdbd4e6d7f3
--- /dev/null
+++ b/media-video/mpeg4ip/files/mpeg4ip-1.5.0.1-avcodec_extern_c-2.patch
@@ -0,0 +1,80 @@
+--- mpeg4ip-1.5.0.1/player/plugin/audio/ffmpeg/ffmpeg.h.unpatched 2008-06-21 14:21:58.000000000 +0900
++++ mpeg4ip-1.5.0.1/player/plugin/audio/ffmpeg/ffmpeg.h 2008-06-21 14:23:16.000000000 +0900
+@@ -25,9 +25,13 @@
+ #define __MPEG4IP_FFMPEG_H__ 1
+ #include "codec_plugin.h"
+ #ifdef HAVE_FFMPEG_INSTALLED
++extern "C" {
+ #include <libavcodec/avcodec.h>
++}
+ #else
++extern "C" {
+ #include <avcodec.h>
++}
+ #endif
+
+ DECLARE_CONFIG(CONFIG_USE_FFMPEG_AUDIO);
+--- mpeg4ip-1.5.0.1/player/plugin/video/ffmpeg/ffmpeg.h.unpatched 2008-06-21 14:21:58.000000000 +0900
++++ mpeg4ip-1.5.0.1/player/plugin/video/ffmpeg/ffmpeg.h 2008-06-21 14:23:26.000000000 +0900
+@@ -25,9 +25,13 @@
+ #define __MPEG4IP_FFMPEG_H__ 1
+ #include "codec_plugin.h"
+ #ifdef HAVE_FFMPEG_INSTALLED
++extern "C" {
+ #include <libavcodec/avcodec.h>
++}
+ #else
++extern "C" {
+ #include <avcodec.h>
++}
+ #endif
+ #include <mp4av.h>
+
+--- mpeg4ip-1.5.0.1/server/mp4live/audio_ffmpeg.h.unpatched 2007-11-24 09:07:06.000000000 +0100
++++ mpeg4ip-1.5.0.1/server/mp4live/audio_ffmpeg.h 2007-11-24 09:11:03.000000000 +0100
+@@ -24,9 +24,13 @@
+
+ #include "audio_encoder.h"
+ #ifdef HAVE_FFMPEG_INSTALLED
++extern "C" {
+ #include <libavcodec/avcodec.h>
++}
+ #else
++extern "C" {
+ #include <avcodec.h>
++}
+ #endif
+ #include <sdp.h>
+
+--- mpeg4ip-1.5.0.1/server/mp4live/video_ffmpeg.h.unpatched 2007-11-24 09:09:04.000000000 +0100
++++ mpeg4ip-1.5.0.1/server/mp4live/video_ffmpeg.h 2007-11-24 09:10:18.000000000 +0100
+@@ -24,9 +24,13 @@
+
+ #include "video_encoder.h"
+ #ifdef HAVE_FFMPEG_INSTALLED
++extern "C" {
+ #include <libavcodec/avcodec.h>
++}
+ #else
++extern "C" {
+ #include <avcodec.h>
++}
+ #endif
+
+ class CFfmpegVideoEncoder : public CVideoEncoder {
+--- mpeg4ip-1.5.0.1/server/mp4live/video_encoder_class.cpp.unpatched 2007-11-24 09:11:51.000000000 +0100
++++ mpeg4ip-1.5.0.1/server/mp4live/video_encoder_class.cpp 2007-11-24 09:12:17.000000000 +0100
+@@ -26,9 +26,13 @@
+ #include "video_util_filter.h"
+ #ifdef HAVE_FFMPEG
+ #ifdef HAVE_FFMPEG_INSTALLED
++extern "C" {
+ #include <libavcodec/avcodec.h>
++}
+ #else
++extern "C" {
+ #include <avcodec.h>
++}
+ #endif
+ #endif
+
diff --git a/media-video/mpeg4ip/files/mpeg4ip-1.5.0.1-ffmpeg-headers.patch b/media-video/mpeg4ip/files/mpeg4ip-1.5.0.1-ffmpeg-headers.patch
new file mode 100644
index 000000000000..85790f118559
--- /dev/null
+++ b/media-video/mpeg4ip/files/mpeg4ip-1.5.0.1-ffmpeg-headers.patch
@@ -0,0 +1,74 @@
+diff -urN mpeg4ip-1.5.0.1-orig/configure.in mpeg4ip-1.5.0.1/configure.in
+--- mpeg4ip-1.5.0.1-orig/configure.in 2006-06-09 04:15:16.000000000 +0900
++++ mpeg4ip-1.5.0.1/configure.in 2008-06-21 13:44:38.000000000 +0900
+@@ -495,8 +495,8 @@
+ AC_DEFINE(HAVE_FFMPEG_INSTALLED, 1, [defined if ffmpeg is installed])
+ FFMPEG_INC=
+ FFMPEG_LIB="-lavcodec -lz $ffmpeg_add_libs"
+- AC_CHECK_TYPES([AVRational], , , [#include <ffmpeg/avcodec.h>])
+- AC_CHECK_MEMBERS(AVCodecContext.time_base, , , [#include <ffmpeg/avcodec.h>])
++ AC_CHECK_TYPES([AVRational], , , [#include <libavcodec/avcodec.h>])
++ AC_CHECK_MEMBERS(AVCodecContext.time_base, , , [#include <libavcodec/avcodec.h>])
+ AC_DEFINE(HAVE_FFMPEG, 1, [enable ffmpeg for mp4live])
+ fi
+ fi
+diff -urN mpeg4ip-1.5.0.1-orig/player/plugin/audio/ffmpeg/ffmpeg.h mpeg4ip-1.5.0.1/player/plugin/audio/ffmpeg/ffmpeg.h
+--- mpeg4ip-1.5.0.1-orig/player/plugin/audio/ffmpeg/ffmpeg.h 2004-10-12 06:26:46.000000000 +0900
++++ mpeg4ip-1.5.0.1/player/plugin/audio/ffmpeg/ffmpeg.h 2008-06-21 13:45:35.000000000 +0900
+@@ -25,7 +25,7 @@
+ #define __MPEG4IP_FFMPEG_H__ 1
+ #include "codec_plugin.h"
+ #ifdef HAVE_FFMPEG_INSTALLED
+-#include <ffmpeg/avcodec.h>
++#include <libavcodec/avcodec.h>
+ #else
+ #include <avcodec.h>
+ #endif
+diff -urN mpeg4ip-1.5.0.1-orig/player/plugin/video/ffmpeg/ffmpeg.h mpeg4ip-1.5.0.1/player/plugin/video/ffmpeg/ffmpeg.h
+--- mpeg4ip-1.5.0.1-orig/player/plugin/video/ffmpeg/ffmpeg.h 2005-04-06 03:04:46.000000000 +0900
++++ mpeg4ip-1.5.0.1/player/plugin/video/ffmpeg/ffmpeg.h 2008-06-21 13:47:48.000000000 +0900
+@@ -25,7 +25,7 @@
+ #define __MPEG4IP_FFMPEG_H__ 1
+ #include "codec_plugin.h"
+ #ifdef HAVE_FFMPEG_INSTALLED
+-#include <ffmpeg/avcodec.h>
++#include <libavcodec/avcodec.h>
+ #else
+ #include <avcodec.h>
+ #endif
+diff -urN mpeg4ip-1.5.0.1-orig/server/mp4live/audio_ffmpeg.h mpeg4ip-1.5.0.1/server/mp4live/audio_ffmpeg.h
+--- mpeg4ip-1.5.0.1-orig/server/mp4live/audio_ffmpeg.h 2005-09-15 08:15:42.000000000 +0900
++++ mpeg4ip-1.5.0.1/server/mp4live/audio_ffmpeg.h 2008-06-21 13:48:21.000000000 +0900
+@@ -24,7 +24,7 @@
+
+ #include "audio_encoder.h"
+ #ifdef HAVE_FFMPEG_INSTALLED
+-#include <ffmpeg/avcodec.h>
++#include <libavcodec/avcodec.h>
+ #else
+ #include <avcodec.h>
+ #endif
+diff -urN mpeg4ip-1.5.0.1-orig/server/mp4live/video_encoder_class.cpp mpeg4ip-1.5.0.1/server/mp4live/video_encoder_class.cpp
+--- mpeg4ip-1.5.0.1-orig/server/mp4live/video_encoder_class.cpp 2006-03-11 06:40:57.000000000 +0900
++++ mpeg4ip-1.5.0.1/server/mp4live/video_encoder_class.cpp 2008-06-21 13:48:31.000000000 +0900
+@@ -26,7 +26,7 @@
+ #include "video_util_filter.h"
+ #ifdef HAVE_FFMPEG
+ #ifdef HAVE_FFMPEG_INSTALLED
+-#include <ffmpeg/avcodec.h>
++#include <libavcodec/avcodec.h>
+ #else
+ #include <avcodec.h>
+ #endif
+diff -urN mpeg4ip-1.5.0.1-orig/server/mp4live/video_ffmpeg.h mpeg4ip-1.5.0.1/server/mp4live/video_ffmpeg.h
+--- mpeg4ip-1.5.0.1-orig/server/mp4live/video_ffmpeg.h 2005-09-09 02:40:36.000000000 +0900
++++ mpeg4ip-1.5.0.1/server/mp4live/video_ffmpeg.h 2008-06-21 13:48:13.000000000 +0900
+@@ -24,7 +24,7 @@
+
+ #include "video_encoder.h"
+ #ifdef HAVE_FFMPEG_INSTALLED
+-#include <ffmpeg/avcodec.h>
++#include <libavcodec/avcodec.h>
+ #else
+ #include <avcodec.h>
+ #endif
diff --git a/media-video/mpeg4ip/mpeg4ip-1.5.0.1-r5.ebuild b/media-video/mpeg4ip/mpeg4ip-1.5.0.1-r5.ebuild
new file mode 100644
index 000000000000..427ad9923e53
--- /dev/null
+++ b/media-video/mpeg4ip/mpeg4ip-1.5.0.1-r5.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/mpeg4ip/mpeg4ip-1.5.0.1-r5.ebuild,v 1.1 2008/06/21 21:24:35 yngwin Exp $
+
+WANT_AUTOMAKE="1.9"
+
+inherit eutils multilib autotools
+
+DESCRIPTION="MPEG 4 implementation library"
+HOMEPAGE="http://www.mpeg4ip.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+LICENSE="MPL-1.1 LGPL-2 GPL-2 LGPL-2.1 BSD UCL MPEG4"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="ipv6 mmx v4l2 xvid nas alsa esd arts ffmpeg a52 mpeg2 lame aac id3 player mp4live x264"
+
+RDEPEND=" media-libs/libsdl
+ player? (
+ >=x11-libs/gtk+-2
+ ffmpeg? ( >=media-video/ffmpeg-0.4.7 )
+ mpeg2? ( media-libs/libmpeg2 )
+ id3? ( media-libs/libid3tag )
+ a52? ( media-libs/a52dec )
+ )
+ xvid? ( >=media-libs/xvid-0.9.8 )
+ mp4live? (
+ >=x11-libs/gtk+-2
+ lame? ( >=media-sound/lame-3.92 )
+ aac? ( >=media-libs/faac-1.24-r1 )
+ ffmpeg? ( >=media-video/ffmpeg-0.4.7 )
+ x264? ( media-libs/x264 )
+ )
+ nas? ( media-libs/nas x11-libs/libXt )
+ alsa? ( media-libs/alsa-lib )
+ arts? ( kde-base/arts )
+ esd? ( media-sound/esound )
+ =media-libs/libmp4v2-1.5.0.1*
+ !<media-libs/faad2-2.0-r9 "
+
+DEPEND="${RDEPEND}
+ >=x11-libs/gtk+-2
+ media-libs/alsa-lib
+ >=dev-libs/glib-2
+ dev-util/pkgconfig
+ player? ( mmx? ( >=dev-lang/nasm-0.98.19 ) )"
+
+pkg_setup() {
+ if ! built_with_use media-libs/libsdl X;
+ then
+ eerror "media-libs/libsdl does not has X support"
+ eerror "You need to rebuild media-libs/libsdl with USE=X"
+ die
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ epatch "${FILESDIR}/mpeg4ip-1.4.1-disable-faac-test.patch"
+ epatch "${FILESDIR}/${P}-x264.patch"
+ epatch "${FILESDIR}/mpeg4ip-1.5.0.1-newffmpeg.patch"
+ epatch "${FILESDIR}/mpeg4ip-1.5.0.1-ffmpeg-headers.patch"
+ epatch "${FILESDIR}/mpeg4ip-1.5.0.1-lX11.patch"
+ epatch "${FILESDIR}/mpeg4ip-1.5.0.1-as-needed.patch"
+ epatch "${FILESDIR}/${P}-gcc42.patch"
+ epatch "${FILESDIR}/${P}-nasm-r.patch"
+ epatch "${FILESDIR}/mpeg4ip-1.5.0.1-avcodec_extern_c-2.patch"
+ epatch "${FILESDIR}/${P}+gcc-4.3.patch"
+
+ find "${S}" -name Makefile.am -print0 | xargs -0 \
+ sed -i -e 's:-Werror::'
+
+ find "${S}" -name configure.in -print0 | xargs -0 \
+ sed -i -e 's:-Werror::'
+
+ eautoreconf
+}
+
+src_compile() {
+ local myconf
+ myconf=" --datadir=/usr/share/mpeg4ip
+ $(use_enable ipv6)
+ $(use_enable ppc)
+ $(use_enable player)
+ $(use_enable mp4live)
+ $(use_enable xvid)
+ $(use_enable nas)
+ $(use_enable esd)
+ $(use_enable alsa)
+ $(use_enable arts)
+ --disable-srtp" # need ot add libsrtp to portage
+
+ # Those are possible for both player and mp4live
+ if use player || use mp4live ; then
+ myconf="${myconf} --enable-gtk-glib
+ $(use_enable ffmpeg)"
+ fi
+
+ # Those are only relevant for the player
+ use player && myconf="${myconf}
+ $(use_enable mmx)
+ $(use_enable a52 a52dec)
+ $(use_enable mpeg2 mpeg2dec)
+ $(use_enable id3 id3tags)"
+ use player || myconf="${myconf}
+ --disable-a52
+ --disable-mmx
+ --disable-mpeg2dec
+ --disable-id3tags"
+
+ # those can only be used for mp4live
+ use mp4live && myconf="${myconf}
+ $(use_enable v4l2)
+ $(use_enable lame mp3lame)
+ $(use_enable aac faac)
+ $(use_enable x264)"
+ # $(use_enable alsa mp4live-alsa)
+ use mp4live || myconf="${myconf}
+ --disable-v4l2
+ --disable-mp3lame
+ --disable-faac
+ --disable-mp4live-alsa
+ --disable-x264"
+
+ ./bootstrap --prefix=/usr \
+ --host=${CHOST} \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --datadir=/usr/share \
+ --sysconfdir=/etc \
+ --libdir=/usr/$(get_libdir) \
+ --localstatedir=/var/lib \
+ --disable-warns-as-err \
+ --enable-server \
+ ${EXTRA_ECONF} \
+ ${myconf} || die "configure failed"
+
+ sed -i -e 's:-Werror::' common/video/iso-mpeg4/src/Makefile || die "sed failed"
+
+ emake || die "make failed"
+}
+
+src_install () {
+ make install DESTDIR="${D}" || die "make install failed"
+
+ rm -f "${D}"/usr/include/mp4.h
+ rm -f "${D}"/usr/$(get_libdir)/libmp4v2*
+
+ dodoc doc/MPEG4IP_Guide.pdf doc/*txt AUTHORS TODO
+
+ dohtml doc/*.html FEATURES.html || die
+
+ docinto ietf
+ dodoc doc/ietf/*.txt || die
+
+ docinto mcast
+ dodoc doc/mcast/mcast.txt doc/mcast/mcast_example doc/mcast/playlist_example || die
+
+}