summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2013-02-15 19:17:34 +0000
committerAlexis Ballier <aballier@gentoo.org>2013-02-15 19:17:34 +0000
commit5c5bbe146d942abed2634a8c8475a96463779bcd (patch)
tree8266d4d3065a342d6e5f8752968bcd48b2c869f0 /media-video/motion
parentStable for x86, wrt bug #457438 (diff)
downloadhistorical-5c5bbe146d942abed2634a8c8475a96463779bcd.tar.gz
historical-5c5bbe146d942abed2634a8c8475a96463779bcd.tar.bz2
historical-5c5bbe146d942abed2634a8c8475a96463779bcd.zip
Fix build with ffmpeg-1. Disable mpeg1 append code based on the ffurl API as mpeg1 is blacklisted with
new ffmpeg versions in this code anyway. Package-Manager: portage-2.2.0_alpha163/cvs/Linux x86_64 Manifest-Sign-Key: 0x160F534A
Diffstat (limited to 'media-video/motion')
-rw-r--r--media-video/motion/ChangeLog10
-rw-r--r--media-video/motion/Manifest25
-rw-r--r--media-video/motion/files/ffmpeg1.patch122
-rw-r--r--media-video/motion/motion-3.2.12-r2.ebuild5
4 files changed, 146 insertions, 16 deletions
diff --git a/media-video/motion/ChangeLog b/media-video/motion/ChangeLog
index 98e8379d9f6a..aa215deacfe8 100644
--- a/media-video/motion/ChangeLog
+++ b/media-video/motion/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-video/motion
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/motion/ChangeLog,v 1.41 2012/06/09 23:36:03 zmedico Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/motion/ChangeLog,v 1.42 2013/02/15 19:17:27 aballier Exp $
+
+ 15 Feb 2013; Alexis Ballier <aballier@gentoo.org> +files/ffmpeg1.patch,
+ motion-3.2.12-r2.ebuild:
+ Fix build with ffmpeg-1. Disable mpeg1 append code based on the ffurl API as
+ mpeg1 is blacklisted with
+ new ffmpeg versions in this code anyway.
09 Jun 2012; Zac Medico <zmedico@gentoo.org> motion-3.2.12-r2.ebuild:
inherit user for enewuser
diff --git a/media-video/motion/Manifest b/media-video/motion/Manifest
index 5beb6e04b440..b5659f1ed48b 100644
--- a/media-video/motion/Manifest
+++ b/media-video/motion/Manifest
@@ -1,18 +1,19 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA256
-AUX ffmpeg08.patch 2118 RMD160 516cf47c27cc489652d30e8daf91d4f5da30b2c2 SHA1 941396d3bf0c6c9e2ff22705751886a28f9226b3 SHA256 98522037700b1b437c217f31fdade69fa3d407eba8593903e9e0057ac040b299
-AUX motion-3.2.12-workaround-v4l1_deprecation.patch 786 RMD160 fbe9710f564b8a85a2a080444df1c0c5ccae0c1a SHA1 920989d8cb4eccd8fadae37ac69ea76954e38d88 SHA256 70791141dfd39b3c52a4707720c934d12f455ac8328bfef18429e973a89695fe
-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-r2.ebuild 1728 RMD160 7c8edd93d46205cd78fc16737acb5eeaecfed822 SHA1 fadfbcfe978af91cfbae11049cce3aa7cd47e733 SHA256 a91c51459c440489541f6d5fefabef0acfce06cff85cc842f803181fd6541254
-MISC ChangeLog 6427 RMD160 2c55bc5eb484fafdcc011d7ecd2ad038f40a94ea SHA1 8a0e5909ef905052fa4fe2d8cb0bac28adc60c24 SHA256 6080ea38effb7eaa73679f421a635a336d537f18da464d605147e4f959600ca9
-MISC metadata.xml 223 RMD160 86b42c49b694db39ddb3fdc60b98a3ad1a0c3392 SHA1 ea8c387229caaf4b0d3c9fbef9143b70dcae0b0d SHA256 dd48e823ec9a151bc3611121402ed26ee24eb3304aa62870b1e875a8fa0ac812
+AUX ffmpeg08.patch 2118 SHA256 98522037700b1b437c217f31fdade69fa3d407eba8593903e9e0057ac040b299 SHA512 0968d6b698834bfcc409085ef79da64b14623c0a14062e363355a25f5e4c7b447cc974970dafda40717d78e689e560ac8e094ef1dcec5b714f8f0fc4819ebed6 WHIRLPOOL 6890a42529a73e395640c91067f1e4742ac24df589a3ddfce718bc4232078a3f31915098743d77afcba154332490c7f2f39606c9ae30a779ecaad684eb28c422
+AUX ffmpeg1.patch 4370 SHA256 5a11fe115253e6681087e8b09feaeac06a048eedb62c5d97f0b322d333f2ff5b SHA512 36bcc4f7a74a560020e88e660fa109c081ad25887351a4cc3afb8287ec4a6a1c527e5e9b75534c4879aef93aaa210b27cc0d84434f619d09ebaf0cb8b412fd94 WHIRLPOOL ee4edbf013425ad6ad6bbd2e198c71e5128a8d3779d2800a370fa0d286015ed18438dfb0d73c673e519c9f7d188a60f778d1e25b4ca4acc8ba1166022c8bdb46
+AUX motion-3.2.12-workaround-v4l1_deprecation.patch 786 SHA256 70791141dfd39b3c52a4707720c934d12f455ac8328bfef18429e973a89695fe SHA512 f1ec270bf7ccf1328310ea055300cea76fe5c3f53b4567c2058eddf1083687047bf3820c93d9ca03223b3db426e95a0d2df236fad15ab8121456ec5db122f0c7 WHIRLPOOL ca77a0e8aa04119a99ee1a983a2cb964e32f8b61b2369eff192e7eb83af9d7448e032357a7329206bbd0c6054a129ab68566e8912c91b5d8cbe3c990c4339934
+AUX motion.confd 99 SHA256 c43ac28bcf76d96b105a03d0d3685688c5f731894bf68a501706681bba76b060 SHA512 b0135b220ac2f1857012455726fb5c5aaa73a79f864619cb7fbfbb1e8aaf95b0c4dd51bbc30f29714cc29a271f9196f3d92e160fa75a90ccbcf0024640620d5d WHIRLPOOL fc69fca880a1f6b53d216b2ca7ffba73041f696e64a9df6986ec98bc49306d0770d8b7164c17c1961bb5300cc5bb4c7665d0aad5418f2645cf1cb561743774ee
+AUX motion.initd-r2 904 SHA256 a862507d2b0096efca041768a21ebeaac1733211aa008ebacc73fd4c214be6e0 SHA512 5fc1c01fa4dad1db6ee205cc22aad5aedfc4ba0ba9947ab87705b77a10be1325d15cf815b1758c656f259427e01456bbf8a7299d17182ea4e91fdaff746f9757 WHIRLPOOL 65dd450d49cb4a50486d02e6c9b4881bcb282dfdda79566ae56f27b48ba90e200853672e6d356d0975b075c1aa7eec0a9954ed8af7cc2c5eb5b2a216dece1f10
+DIST motion-3.2.12.tar.gz 425729 SHA256 a597f8d7ec0bf3c5fb62722c4eead59717fe01c2ae0d256c642027cea74b2f0a SHA512 d44620f8865420da71ff1dc1e1d8ba8e5465b395f2cf3b2cc9a91d3d415694b26376a9f8e3a1b78ffd0efde22d9e0338daa77237aed38c060dc3577af4c0864c WHIRLPOOL 0b7618d48161e8ffefacc5331d1078004d87839b532100c37bfaf06e99772921228feea6eea063301dfdc9e5f5a1dc07fd0847858440c6f876c1e03deaa078c8
+EBUILD motion-3.2.12-r2.ebuild 1761 SHA256 bf999f8806b503e55f12253a36cb740d9c27a24bbe4567c8de6765b1ecfa37f3 SHA512 1b65675529ae9cb98418f0ca154bb3562a1af0d9759e49e60caee8756f7b3fa5ebd7914a922264530213f70766c20b7dfb1021829bff04c87211e47d95357957 WHIRLPOOL a1d7c001841e76543d5e4c916bc99901350cfd0a789d661ffb18e8abb1a3e3090edeb8158d2006fc3547106eb20f5584699ba8482262612eb506f09779c5a62b
+MISC ChangeLog 6680 SHA256 06f1c314f7ae8f6b0af02f1ac9f206a9c977114a7f8dd28a5c01b47e9841ac03 SHA512 2aafdac943ec860bb5980c24a15174f4187e5b17a9c19bb797ff4fec7ba18cbd5ed1d74eedea9b7de94ca8f927a4ed22380b919bd6beebe73500361060f94338 WHIRLPOOL ee01889705241bdf98bb889d6d91cb48ef7cc0cc8c00f5dcd26e7c76d7e8e5481ae104500693495fbf1dc366d6b30c1f6c85de391a2f3f933f27103353829fb8
+MISC metadata.xml 223 SHA256 dd48e823ec9a151bc3611121402ed26ee24eb3304aa62870b1e875a8fa0ac812 SHA512 cacba929b8688a7270637f34d348216fdeb89e725cdee4b40e5577ca3f626c5f72e73c1c125605a284506aff47265f41e3fedaa76ed4074c540fc1f200e6d494 WHIRLPOOL dcd04d57abcfe2704036097ed68500917f74b7024b46580e9054e1c933d55678992c350fe07ff0efd590b9345fbcdd81665b8ce546f786dd31f5a0f4eb654da3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iEYEARECAAYFAk/T3ekACgkQ/ejvha5XGaMtbACfZ0yGEKD+dG4kmo0VbeHtfICL
-TPYAoL6E4pBP6Z8bxaqZsZ8b30aUEdAQ
-=yqE6
+iEYEAREIAAYFAlEeicgACgkQvFcC4BYPU0ozLACfft0Y9G7/IuOj3y4dPuvYOwIa
++ZUAn1QJ0jOSQyXpu8LqqS26Zp49pteY
+=Knhp
-----END PGP SIGNATURE-----
diff --git a/media-video/motion/files/ffmpeg1.patch b/media-video/motion/files/ffmpeg1.patch
new file mode 100644
index 000000000000..c7d114b1470a
--- /dev/null
+++ b/media-video/motion/files/ffmpeg1.patch
@@ -0,0 +1,122 @@
+Convert to avio API.
+Disable mpeg1 append code based or the ffurl API as mpeg1 is blacklisted with
+new ffmpeg versions in this code anyway.
+Fix build with ffmpeg-1
+
+Index: motion-3.2.12/ffmpeg.c
+===================================================================
+--- motion-3.2.12.orig/ffmpeg.c
++++ motion-3.2.12/ffmpeg.c
+@@ -73,6 +73,7 @@ AVFrame *ffmpeg_prepare_frame(struct ffm
+ /* This is the trailer used to end mpeg1 videos. */
+ static unsigned char mpeg1_trailer[] = {0x00, 0x00, 0x01, 0xb7};
+
++#ifndef FFMPEG_NO_NONSTD_MPEG1
+ /* Append version of the file open function used in libavformat when opening
+ * an ordinary file. The original file open function truncates an existing
+ * file, but this version appends to it instead.
+@@ -118,6 +119,7 @@ URLProtocol mpeg1_file_protocol = {
+ .url_open = file_open_append
+ };
+
++#endif
+
+ #ifdef HAVE_FFMPEG_NEW
+
+@@ -132,6 +134,7 @@ URLProtocol mpeg1_file_protocol = {
+ #include "avstring.h"
+ #endif
+
++#ifndef FFMPEG_NO_NONSTD_MPEG1
+ static int file_open(URLContext *h, const char *filename, int flags)
+ {
+ int access_flags, fd;
+@@ -195,6 +198,7 @@ URLProtocol file_protocol = {
+ };
+
+ #endif
++#endif
+
+
+ /* We set AVOutputFormat->write_trailer to this function for mpeg1. That way,
+@@ -203,8 +207,8 @@ URLProtocol file_protocol = {
+ static int mpeg1_write_trailer(AVFormatContext *s)
+ {
+ #if LIBAVFORMAT_BUILD >= (52<<16)
+- put_buffer(s->pb, mpeg1_trailer, 4);
+- put_flush_packet(s->pb);
++ avio_write(s->pb, mpeg1_trailer, 4);
++ avio_flush(s->pb);
+ #else
+ put_buffer(&s->pb, mpeg1_trailer, 4);
+ put_flush_packet(&s->pb);
+@@ -226,6 +230,7 @@ void ffmpeg_init()
+ /* Copy the functions to use for the append file protocol from the standard
+ * file protocol.
+ */
++#ifndef FFMPEG_NO_NONSTD_MPEG1
+ mpeg1_file_protocol.url_read = file_protocol.url_read;
+ mpeg1_file_protocol.url_write = file_protocol.url_write;
+ mpeg1_file_protocol.url_seek = file_protocol.url_seek;
+@@ -239,6 +244,7 @@ void ffmpeg_init()
+ #else
+ register_protocol(&mpeg1_file_protocol);
+ #endif
++#endif
+ }
+
+ /* Obtains the output format used for the specified codec. For mpeg4 codecs,
+@@ -422,13 +428,6 @@ struct ffmpeg *ffmpeg_open(char *ffmpeg_
+ c->flags |= CODEC_FLAG_GLOBAL_HEADER;
+ }
+
+- /* set the output parameters (must be done even if no parameters). */
+- if (av_set_parameters(ffmpeg->oc, NULL) < 0) {
+- motion_log(LOG_ERR, 0, "ffmpeg av_set_parameters error: Invalid output format parameters");
+- ffmpeg_cleanups(ffmpeg);
+- return NULL;
+- }
+-
+ /* Dump the format settings. This shows how the various streams relate to each other */
+ //dump_format(ffmpeg->oc, 0, filename, 1);
+
+@@ -504,7 +503,7 @@ struct ffmpeg *ffmpeg_open(char *ffmpeg_
+ snprintf(file_proto, sizeof(file_proto), "%s", filename);
+
+
+- if (url_fopen(&ffmpeg->oc->pb, file_proto, URL_WRONLY) < 0) {
++ if (avio_open(&ffmpeg->oc->pb, file_proto, AVIO_FLAG_WRITE) < 0) {
+ /* path did not exist? */
+ if (errno == ENOENT) {
+ /* create path for file (don't use file_proto)... */
+@@ -514,7 +513,7 @@ struct ffmpeg *ffmpeg_open(char *ffmpeg_
+ }
+
+ /* and retry opening the file (use file_proto) */
+- if (url_fopen(&ffmpeg->oc->pb, file_proto, URL_WRONLY) < 0) {
++ if (avio_open(&ffmpeg->oc->pb, file_proto, AVIO_FLAG_WRITE) < 0) {
+ motion_log(LOG_ERR, 1, "url_fopen - error opening file %s",filename);
+ ffmpeg_cleanups(ffmpeg);
+ return NULL;
+@@ -535,7 +534,11 @@ struct ffmpeg *ffmpeg_open(char *ffmpeg_
+ }
+
+ /* write the stream header, if any */
+- av_write_header(ffmpeg->oc);
++ if(avformat_write_header(ffmpeg->oc, NULL) < 0) {
++ motion_log(LOG_ERR, 1, "Error while writing header for %s", filename);
++ ffmpeg_cleanups(ffmpeg);
++ return NULL;
++ }
+
+ return ffmpeg;
+ }
+@@ -602,7 +605,7 @@ void ffmpeg_close(struct ffmpeg *ffmpeg)
+ if (!(ffmpeg->oc->oformat->flags & AVFMT_NOFILE)) {
+ /* close the output file */
+ #if LIBAVFORMAT_BUILD >= (52<<16)
+- url_fclose(ffmpeg->oc->pb);
++ avio_close(ffmpeg->oc->pb);
+ #else
+ url_fclose(&ffmpeg->oc->pb);
+ #endif /* LIBAVFORMAT_BUILD >= (52<<16) */
diff --git a/media-video/motion/motion-3.2.12-r2.ebuild b/media-video/motion/motion-3.2.12-r2.ebuild
index 4486a02c45dc..3ae75b05b750 100644
--- a/media-video/motion/motion-3.2.12-r2.ebuild
+++ b/media-video/motion/motion-3.2.12-r2.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/media-video/motion/motion-3.2.12-r2.ebuild,v 1.3 2012/06/09 23:36:03 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/motion/motion-3.2.12-r2.ebuild,v 1.4 2013/02/15 19:17:27 aballier Exp $
EAPI=4
inherit eutils user
@@ -31,6 +31,7 @@ pkg_setup() {
src_prepare() {
epatch \
"${FILESDIR}"/ffmpeg08.patch \
+ "${FILESDIR}"/ffmpeg1.patch \
"${FILESDIR}"/${P}-workaround-v4l1_deprecation.patch
}