fix build with ffmpeg 0.8, bug #392695
authorAlexis Ballier <aballier@gentoo.org>
Sat, 3 Dec 2011 15:58:14 +0000 (15:58 +0000)
committerAlexis Ballier <aballier@gentoo.org>
Sat, 3 Dec 2011 15:58:14 +0000 (15:58 +0000)
Package-Manager: portage-2.2.0_alpha79/cvs/Linux x86_64

media-video/motion/ChangeLog
media-video/motion/Manifest
media-video/motion/files/ffmpeg08.patch [new file with mode: 0644]
media-video/motion/motion-3.2.12-r1.ebuild

index 05533192d5391cbd63013cae75d68e212920c384..1e8e7ace6518cd35ba92cfa2ca38baa531361036 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for media-video/motion
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/motion/ChangeLog,v 1.36 2011/11/14 03:46:46 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/motion/ChangeLog,v 1.37 2011/12/03 15:58:14 aballier Exp $
+
+  03 Dec 2011; Alexis Ballier <aballier@gentoo.org> +files/ffmpeg08.patch,
+  motion-3.2.12-r1.ebuild:
+  fix build with ffmpeg 0.8, bug #392695
 
   14 Nov 2011; Samuli Suominen <ssuominen@gentoo.org> -motion-3.2.11.1.ebuild,
   -motion-3.2.12.ebuild, -files/motion.init-r1, -files/motion.initd:
index 2ef3543292727d9d973b39cb3c21bf89d2607054..8abbb16b931b038988569d11531af1f600a6626e 100644 (file)
@@ -1,20 +1,17 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
+AUX ffmpeg08.patch 2118 RMD160 516cf47c27cc489652d30e8daf91d4f5da30b2c2 SHA1 941396d3bf0c6c9e2ff22705751886a28f9226b3 SHA256 98522037700b1b437c217f31fdade69fa3d407eba8593903e9e0057ac040b299
 AUX motion.confd 99 RMD160 e402a6d6873f2267dd1041779b1ef5737305b8f0 SHA1 f66f2f685044e26d5fa61bed8fa47340003c3c24 SHA256 c43ac28bcf76d96b105a03d0d3685688c5f731894bf68a501706681bba76b060
 AUX motion.initd-r2 904 RMD160 b7bf54ceab0848ddb3b04176e0c9f29501004c6e SHA1 b8a27c19e92b2bbc3ec627a70cecac4db877d84f SHA256 a862507d2b0096efca041768a21ebeaac1733211aa008ebacc73fd4c214be6e0
 DIST motion-3.2.12.tar.gz 425729 RMD160 7d53e19524c535075be57776c0a15414e0beeca4 SHA1 dc59b36e45e7626baa65ce62c961af918fea76bd SHA256 a597f8d7ec0bf3c5fb62722c4eead59717fe01c2ae0d256c642027cea74b2f0a
-EBUILD motion-3.2.12-r1.ebuild 1695 RMD160 a67c210e5fad836d28ab17c4db3be7c68980f017 SHA1 6e648338e3339b0a74310db973c1043048e2d21c SHA256 c8eb75028db1ca628cd88bb9b7a45533de392a9eba454ee495160568186e3bd8
-MISC ChangeLog 5550 RMD160 dd7c837e83c2711f9a7832df659219880583000c SHA1 700046e103a60e3ef0c4d382e287876026051319 SHA256 c0295c2b1e41583773deabc5796d990fee6af290cf1df4a23cf24a0c37dcda5d
+EBUILD motion-3.2.12-r1.ebuild 1750 RMD160 d3386dadf65270d1fa96fb269f2393e7f4988d6f SHA1 3ceeadb9326894c62bab76a63f90a1afcc28d714 SHA256 ceae62cbb841fc25902582a850d5bbd03439608f866a8d82df92a6f2c2157535
+MISC ChangeLog 5693 RMD160 9b9538abcababc7186db3bc471e1209c988401bb SHA1 fb9ee3a08b5e11119d95133d4bc57e054bc673b1 SHA256 52199530fa7afa37e1b518f09aa3aca1d02cb3dc9bb914d29aff34e0df7e6318
 MISC metadata.xml 223 RMD160 86b42c49b694db39ddb3fdc60b98a3ad1a0c3392 SHA1 ea8c387229caaf4b0d3c9fbef9143b70dcae0b0d SHA256 dd48e823ec9a151bc3611121402ed26ee24eb3304aa62870b1e875a8fa0ac812
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
-iQEcBAEBAgAGBQJOwI7eAAoJEEdUh39IaPFNCIUH/0k+sVfwtAShJw/V83qoM+Nd
-0ModqzKlfc2+Y1OJ1BcfHrbMofuAhHPm9ZGE/IF35tZPn45JxR60iYoqaOczagaW
-RSH/K0H1XBvYgzlztZjUdO7WPzBe3ve1IunC9nXu8Ze+vTlYmQsVJ9iKV3J+XCG8
-kzYLH1hryft6jcTPdZvGBi+Ju12eRaizgdQX3TP5M6f78jgMUfoUgYqfEM7jFFwu
-0kQJZ1QOCjMXxy7cMZGYUyL43vEZzs2ZFQe5GXUYdxF+xb8or9IuBWPu40b6OStg
-nhAJ8yW+llAeO8pjYkEf4hIbnHEh/NO3MnKzo/Xw6jNBGWT34t/AWZ3TGLvdfyg=
-=IcLT
+iEYEARECAAYFAk7aRxsACgkQvFcC4BYPU0o6gQCgu5bAQ2Fkm/jcp8Pmqr4K1veQ
+TwQAoJjX6krT6+lSsCdSHAjp3yE0kAeX
+=RC5m
 -----END PGP SIGNATURE-----
diff --git a/media-video/motion/files/ffmpeg08.patch b/media-video/motion/files/ffmpeg08.patch
new file mode 100644 (file)
index 0000000..f6743e3
--- /dev/null
@@ -0,0 +1,53 @@
+Index: motion-3.2.12/ffmpeg.c
+===================================================================
+--- motion-3.2.12.orig/ffmpeg.c
++++ motion-3.2.12/ffmpeg.c
+@@ -60,6 +60,10 @@
+  */
+ #define APPEND_PROTO "appfile"
+ 
++#ifndef guess_format
++#define guess_format av_guess_format
++#endif
++
+ /* Some forward-declarations. */
+ void ffmpeg_put_frame(struct ffmpeg *, AVFrame *);
+ void ffmpeg_cleanups(struct ffmpeg *);
+@@ -228,7 +232,9 @@ void ffmpeg_init()
+     mpeg1_file_protocol.url_close = file_protocol.url_close;
+ 
+     /* Register the append file protocol. */
+-#if LIBAVFORMAT_BUILD >= (52<<16 | 31<<8)
++#if LIBAVFORMAT_BUILD >= (53<<16 )
++    av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol));
++#elif LIBAVFORMAT_BUILD >= (52<<16 | 31<<8)
+     av_register_protocol(&mpeg1_file_protocol);
+ #else
+     register_protocol(&mpeg1_file_protocol);
+@@ -377,7 +383,7 @@ struct ffmpeg *ffmpeg_open(char *ffmpeg_
+ 
+     ffmpeg->c     = c = AVSTREAM_CODEC_PTR(ffmpeg->video_st);
+     c->codec_id   = ffmpeg->oc->oformat->video_codec;
+-    c->codec_type = CODEC_TYPE_VIDEO;
++    c->codec_type = AVMEDIA_TYPE_VIDEO;
+     is_mpeg1      = c->codec_id == CODEC_ID_MPEG1VIDEO;
+ 
+     if (strcmp(ffmpeg_video_codec, "ffv1") == 0)
+@@ -646,7 +652,7 @@ void ffmpeg_put_frame(struct ffmpeg *ffm
+     if (ffmpeg->oc->oformat->flags & AVFMT_RAWPICTURE) {
+         /* raw video case. The API will change slightly in the near future for that */
+ #ifdef FFMPEG_AVWRITEFRAME_NEWAPI
+-        pkt.flags |= PKT_FLAG_KEY;
++        pkt.flags |= AV_PKT_FLAG_KEY;
+         pkt.data = (uint8_t *)pic;
+         pkt.size = sizeof(AVPicture);
+         ret = av_write_frame(ffmpeg->oc, &pkt);
+@@ -667,7 +673,7 @@ void ffmpeg_put_frame(struct ffmpeg *ffm
+ #ifdef FFMPEG_AVWRITEFRAME_NEWAPI
+             pkt.pts = AVSTREAM_CODEC_PTR(ffmpeg->video_st)->coded_frame->pts;
+             if (AVSTREAM_CODEC_PTR(ffmpeg->video_st)->coded_frame->key_frame) {
+-                pkt.flags |= PKT_FLAG_KEY;
++                pkt.flags |= AV_PKT_FLAG_KEY;
+             }
+             pkt.data = ffmpeg->video_outbuf;
+             pkt.size = out_size;
index bef0fce140e1b936302052b1317fdfd446e854df..feac6d4cc1b5d015837a729e8d6cc04dcea8709b 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/motion/motion-3.2.12-r1.ebuild,v 1.2 2011/10/06 08:06:36 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/motion/motion-3.2.12-r1.ebuild,v 1.3 2011/12/03 15:58:14 aballier Exp $
 
 EAPI=4
 inherit eutils
@@ -26,6 +26,10 @@ pkg_setup() {
        enewuser motion -1 -1 -1 video
 }
 
+src_prepare() {
+       epatch "${FILESDIR}/ffmpeg08.patch"
+}
+
 src_configure() {
        local hack
        if has_version '>=sys-kernel/linux-headers-2.6.38'; then