summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2008-09-21 11:43:21 +0000
committerAlexis Ballier <aballier@gentoo.org>2008-09-21 11:43:21 +0000
commit47d9e1fee9935b7ff5ca96206b7a9fe368dc17fb (patch)
tree77fe4bee17ba7bdc0fea862558fb3f96ed27167d /media-libs/mlt
parentMask new versions of mlt/++ (diff)
downloadgentoo-2-47d9e1fee9935b7ff5ca96206b7a9fe368dc17fb.tar.gz
gentoo-2-47d9e1fee9935b7ff5ca96206b7a9fe368dc17fb.tar.bz2
gentoo-2-47d9e1fee9935b7ff5ca96206b7a9fe368dc17fb.zip
New release, sync patches with upstream for latest libavcodec api changes and sox 14.1.0
(Portage version: 2.2_rc8/cvs/Linux 2.6.26.3 x86_64)
Diffstat (limited to 'media-libs/mlt')
-rw-r--r--media-libs/mlt/ChangeLog10
-rw-r--r--media-libs/mlt/files/mlt-0.3.0-avcodec.patch34
-rw-r--r--media-libs/mlt/files/mlt-0.3.0-sox1410.patch77
-rw-r--r--media-libs/mlt/mlt-0.3.0.ebuild99
4 files changed, 219 insertions, 1 deletions
diff --git a/media-libs/mlt/ChangeLog b/media-libs/mlt/ChangeLog
index 435639cc20b3..bb0c48cd6eaa 100644
--- a/media-libs/mlt/ChangeLog
+++ b/media-libs/mlt/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for media-libs/mlt
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/mlt/ChangeLog,v 1.26 2008/08/06 21:09:55 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/mlt/ChangeLog,v 1.27 2008/09/21 11:43:21 aballier Exp $
+
+*mlt-0.3.0 (21 Sep 2008)
+
+ 21 Sep 2008; Alexis Ballier <aballier@gentoo.org>
+ +files/mlt-0.3.0-avcodec.patch, +files/mlt-0.3.0-sox1410.patch,
+ +mlt-0.3.0.ebuild:
+ New release, sync patches with upstream for latest libavcodec api changes
+ and sox 14.1.0
06 Aug 2008; Alexis Ballier <aballier@gentoo.org>
+files/mlt-0.2.4-sox1410.patch, mlt-0.2.4-r2.ebuild:
diff --git a/media-libs/mlt/files/mlt-0.3.0-avcodec.patch b/media-libs/mlt/files/mlt-0.3.0-avcodec.patch
new file mode 100644
index 000000000000..959b3020340e
--- /dev/null
+++ b/media-libs/mlt/files/mlt-0.3.0-avcodec.patch
@@ -0,0 +1,34 @@
+Index: src/modules/avformat/consumer_avformat.c
+===================================================================
+--- src/modules/avformat/consumer_avformat.c (revision 1180)
++++ src/modules/avformat/consumer_avformat.c (revision 1181)
+@@ -799,13 +799,7 @@
+ // Check for audio codec overides
+ if ( acodec != NULL )
+ {
+- AVCodec *p = first_avcodec;
+- while( p != NULL )
+- {
+- if ( !strcmp( p->name, acodec ) && p->type == CODEC_TYPE_AUDIO )
+- break;
+- p = p->next;
+- }
++ AVCodec *p = avcodec_find_encoder_by_name( acodec );
+ if ( p != NULL )
+ audio_codec_id = p->id;
+ else
+@@ -815,13 +809,7 @@
+ // Check for video codec overides
+ if ( vcodec != NULL )
+ {
+- AVCodec *p = first_avcodec;
+- while( p != NULL )
+- {
+- if ( !strcmp( p->name, vcodec ) && p->type == CODEC_TYPE_VIDEO )
+- break;
+- p = p->next;
+- }
++ AVCodec *p = avcodec_find_encoder_by_name( vcodec );
+ if ( p != NULL )
+ video_codec_id = p->id;
+ else
diff --git a/media-libs/mlt/files/mlt-0.3.0-sox1410.patch b/media-libs/mlt/files/mlt-0.3.0-sox1410.patch
new file mode 100644
index 000000000000..8b1859eab565
--- /dev/null
+++ b/media-libs/mlt/files/mlt-0.3.0-sox1410.patch
@@ -0,0 +1,77 @@
+Index: src/modules/sox/filter_sox.c
+===================================================================
+--- src/modules/sox/filter_sox.c (revision 1178)
++++ src/modules/sox/filter_sox.c (revision 1179)
+@@ -37,7 +37,11 @@
+ # define ST_LIB_VERSION_CODE SOX_LIB_VERSION_CODE
+ # define ST_LIB_VERSION SOX_LIB_VERSION
+ # define ST_SIGNED_WORD_TO_SAMPLE(d,clips) SOX_SIGNED_16BIT_TO_SAMPLE(d,clips)
++#if (ST_LIB_VERSION_CODE >= ST_LIB_VERSION(14,1,0))
++# define ST_SSIZE_MIN SOX_SAMPLE_MIN
++#else
+ # define ST_SSIZE_MIN SOX_SSIZE_MIN
++#endif
+ # define ST_SAMPLE_TO_SIGNED_WORD(d,clips) SOX_SAMPLE_TO_SIGNED_16BIT(d,clips)
+ #else
+ # include <st.h>
+@@ -90,7 +94,11 @@
+ // Locate the effect
+ #ifdef SOX14
+ //fprintf(stderr, "%s: effect %s count %d\n", __FUNCTION__, tokeniser->tokens[0], tokeniser->count );
++#if (ST_LIB_VERSION_CODE >= ST_LIB_VERSION(14,1,0))
++ eff = sox_create_effect( sox_find_effect( tokeniser->tokens[0] ) );
++#else
+ sox_create_effect( eff, sox_find_effect( tokeniser->tokens[0] ) );
++#endif
+ int opt_count = tokeniser->count - 1;
+ #else
+ int opt_count = st_geteffect_opt( eff, tokeniser->count, tokeniser->tokens );
+@@ -107,10 +115,17 @@
+ #endif
+ {
+ // Set the sox signal parameters
++#if (ST_LIB_VERSION_CODE >= ST_LIB_VERSION(14,1,0))
++ eff->in_signal.rate = frequency;
++ eff->out_signal.rate = frequency;
++ eff->in_signal.channels = 1;
++ eff->out_signal.channels = 1;
++#else
+ eff->ininfo.rate = frequency;
+ eff->outinfo.rate = frequency;
+ eff->ininfo.channels = 1;
+ eff->outinfo.channels = 1;
++#endif
+
+ // Start the effect
+ #ifdef SOX14
+@@ -213,8 +228,13 @@
+ eff_t e = mlt_properties_get_data( filter_properties, id, NULL );
+
+ // Validate the existing effect state
++#if (ST_LIB_VERSION_CODE >= ST_LIB_VERSION(14,1,0))
++ if ( e != NULL && ( e->in_signal.rate != *frequency ||
++ e->out_signal.rate != *frequency ) )
++#else
+ if ( e != NULL && ( e->ininfo.rate != *frequency ||
+ e->outinfo.rate != *frequency ) )
++#endif
+ e = NULL;
+
+ // (Re)Create the effect state
+Index: src/modules/sox/configure
+===================================================================
+--- src/modules/sox/configure (revision 1178)
++++ src/modules/sox/configure (revision 1179)
+@@ -34,8 +34,10 @@
+ pkg-config sox
+ if [ $? -eq 0 ]
+ then
+- echo "CFLAGS += $(pkg-config --cflags sox)" > config.mak
+- echo "LDFLAGS += $(pkg-config --libs sox)" > config.mak
++ disable_sox=0
++ echo "CFLAGS += $(pkg-config --cflags sox) -I$(pkg-config --variable=prefix sox)" > config.mak
++ echo "LDFLAGS += $(pkg-config --libs sox)" >> config.mak
++ [ "$(pkg-config --modversion sox)" > "13" ] && echo "CFLAGS += -DSOX14" >> config.mak
+ else
+ sox --version 2> /dev/null | grep 'v14.' > /dev/null
+ disable_sox=$?
diff --git a/media-libs/mlt/mlt-0.3.0.ebuild b/media-libs/mlt/mlt-0.3.0.ebuild
new file mode 100644
index 000000000000..e98b6d2ff0d5
--- /dev/null
+++ b/media-libs/mlt/mlt-0.3.0.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/mlt/mlt-0.3.0.ebuild,v 1.1 2008/09/21 11:43:21 aballier Exp $
+
+EAPI=1
+
+inherit eutils toolchain-funcs qt3
+
+DESCRIPTION="MLT is an open source multimedia framework, designed and developed
+for television broadcasting"
+HOMEPAGE="http://mlt.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mlt/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="dv xml jack gtk sdl vorbis sox quicktime mmx lame xine lame ogg theora
+xine ffmpeg libsamplerate qt3"
+
+DEPEND="ffmpeg? ( >=media-video/ffmpeg-0.4.9_p20070616-r3 )
+ dv? ( >=media-libs/libdv-0.104 )
+ xml? ( >=dev-libs/libxml2-2.5 )
+ ogg? ( >=media-libs/libogg-1.1.3 )
+ vorbis? ( >=media-libs/libvorbis-1.1.2 )
+ sdl? ( >=media-libs/libsdl-1.2.10
+ >=media-libs/sdl-image-1.2.4 )
+ libsamplerate? ( >=media-libs/libsamplerate-0.1.2 )
+ jack? ( media-sound/jack-audio-connection-kit
+ media-libs/ladspa-sdk
+ >=dev-libs/libxml2-2.5 )
+ gtk? ( >=x11-libs/gtk+-2
+ x11-libs/pango )
+ sox? ( media-sound/sox )
+ quicktime? ( media-libs/libquicktime )
+ xine? ( >=media-libs/xine-lib-1.1.2_pre20060328-r7 )
+ lame? ( >=media-sound/lame-3.97_beta2 )
+ qt3? ( x11-libs/qt:3 )
+ theora? ( >=media-libs/libtheora-1.0_alpha5 )"
+RDEPEND=${DEPEND}
+
+pkg_setup() {
+ local fail="USE sox needs also USE libsamplerate enabled."
+
+ if use sox && ! use libsamplerate; then
+ eerror "${fail}"
+ die "${fail}"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/mlt-0.2.2-motion-est-nonx86.patch
+ epatch "${FILESDIR}"/mlt-0.2.3-nostrip.patch
+ epatch "${FILESDIR}"/${P}-sox1410.patch
+ epatch "${FILESDIR}"/${P}-avcodec.patch
+}
+
+src_compile() {
+ tc-export CC
+
+ local myconf=" --enable-gpl --enable-shared
+ --enable-pp --enable-shared-pp
+ --enable-motion-est
+ $(use_enable dv)
+ $(use_enable mmx)
+ $(use_enable gtk gtk2)
+ $(use_enable vorbis)
+ $(use_enable ogg)
+ $(use_enable sdl)
+ $(use_enable jack jackrack)
+ $(use_enable sox)
+ $(use_enable theora)
+ $(use_enable lame mp3lame)
+ $(use_enable ffmpeg avformat)
+ $(use_enable libsamplerate resample)
+ $(use_enable qt3 qimage)
+ $(use_enable xml westley)
+ $(use_enable xine)"
+
+ use ffmpeg && has_version ">=media-video/ffmpeg-0.4.9_p20070616-r20" &&
+ myconf="${myconf} --avformat-swscale"
+
+ (use quicktime && use dv) || myconf="${myconf} --disable-kino"
+
+ econf ${myconf} || die "econf failed"
+ sed -i -e s/^OPT/#OPT/ "${S}/config.mak"
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ dodoc docs/*.txt ChangeLog README docs/TODO
+
+ dodir /usr/share/${PN}
+ insinto /usr/share/${PN}
+ doins -r demo
+}