diff -Nru motion-3.2.12/debian/changelog motion-3.2.12/debian/changelog --- motion-3.2.12/debian/changelog 2011-11-24 07:55:33.000000000 +0000 +++ motion-3.2.12/debian/changelog 2012-02-12 22:02:21.000000000 +0000 @@ -1,15 +1,17 @@ -motion (3.2.12-3ubuntu2) precise; urgency=low +motion (3.2.12-3.1) unstable; urgency=low - * Rebuild for libmysqlclient transition + * * Non-maintainer upload. + * Autogenerate autotools files. Build-depend on dh-autoreconf (not + autoconf-dev). + * Add patches cherry-picked from upstream VCS and unfuzzed, to fix + linking against recent libav*. + Closes: bug#640562. Thanks to Moritz Muehlenhoff and Stephen Kitt. + * Add patch 02, to autodetect multiarch libavcodec path in autoconf. + Closes: bug#644006. Thanks to Moritz Muehlenhoff and Stephen Kitt. + * Create piddir when started (not when installed). + Closes: bug#631198. Thanks to Ibragimov Rinat. - -- Clint Byrum Wed, 23 Nov 2011 23:55:33 -0800 - -motion (3.2.12-3ubuntu1) precise; urgency=low - - * Resynchronise with Debian. Remaining changes: - - Update to current libav API. - - -- Colin Watson Mon, 17 Oct 2011 23:49:12 +0100 + -- Jonas Smedegaard Sun, 12 Feb 2012 23:02:18 +0100 motion (3.2.12-3) unstable; urgency=low @@ -23,15 +25,6 @@ -- Juan Angulo Moreno Tue, 23 Aug 2011 11:01:54 -0430 -motion (3.2.12-2ubuntu1) oneiric; urgency=low - - [ Daniel Polehn ] - * Use linux/videodev2.h and libv4l1-videodev.h rather than - linux/videodev.h (LP: #756211). - * Update to current libav API. - - -- Colin Watson Thu, 18 Aug 2011 18:03:26 +0100 - motion (3.2.12-2) unstable; urgency=low * Bumped Standards-Version to 3.9.1 diff -Nru motion-3.2.12/debian/control motion-3.2.12/debian/control --- motion-3.2.12/debian/control 2011-10-17 22:48:13.000000000 +0000 +++ motion-3.2.12/debian/control 2012-02-12 14:28:57.000000000 +0000 @@ -1,10 +1,9 @@ Source: motion Section: graphics Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Juan Angulo Moreno +Maintainer: Juan Angulo Moreno HomePage: http://motion.sf.net -Build-Depends: debhelper (>= 6), autotools-dev, libjpeg62-dev, zlib1g-dev, libavcodec-dev, libavformat-dev, libpq-dev, libmysqlclient-dev, libv4l-dev +Build-Depends: debhelper (>= 6), dh-autoreconf, libjpeg62-dev, zlib1g-dev, libavcodec-dev, libavformat-dev, libpq-dev, libmysqlclient-dev, libv4l-dev Standards-Version: 3.9.2 Package: motion diff -Nru motion-3.2.12/debian/init.d motion-3.2.12/debian/init.d --- motion-3.2.12/debian/init.d 2010-08-09 20:58:28.000000000 +0000 +++ motion-3.2.12/debian/init.d 2012-02-12 21:32:34.000000000 +0000 @@ -50,6 +50,11 @@ case "$1" in start) if check_daemon_enabled ; then + if ! [ -d /var/run/motion ]; then + mkdir /var/run/motion + fi + chown motion:motion /var/run/motion + log_daemon_msg "Starting $DESC" "$NAME" if start-stop-daemon --start --oknodo --exec $DAEMON -b --chuid motion ; then log_end_msg 0 diff -Nru motion-3.2.12/debian/motion.postinst motion-3.2.12/debian/motion.postinst --- motion-3.2.12/debian/motion.postinst 2011-08-25 18:12:55.000000000 +0000 +++ motion-3.2.12/debian/motion.postinst 2012-02-12 21:30:19.000000000 +0000 @@ -27,16 +27,8 @@ fi } -create_pid_dir(){ - if ! [ -d /var/run/motion ]; then - mkdir /var/run/motion - fi - chown motion:motion /var/run/motion -} - add_group_if_missing add_user_if_missing -create_pid_dir # Fix motion.conf permission chmod 0640 /etc/motion/motion.conf diff -Nru motion-3.2.12/debian/patches/020101107~5273773.patch motion-3.2.12/debian/patches/020101107~5273773.patch --- motion-3.2.12/debian/patches/020101107~5273773.patch 1970-01-01 00:00:00.000000000 +0000 +++ motion-3.2.12/debian/patches/020101107~5273773.patch 2012-02-12 20:07:53.000000000 +0000 @@ -0,0 +1,95 @@ +Description: Fix FFmpeg guess_format() deprecation warning +Author: Angel Carpintero +Origin: Upstream, https://github.com/sackmotion/motion/commit/527377#svn517 +Last-Update: 2012-02-12 + +--- a/ffmpeg.c ++++ b/ffmpeg.c +@@ -36,6 +36,11 @@ + # endif /* __GNUC__ */ + #endif /* LIBAVCODEC_BUILD > 4680 */ + ++#if defined LIBAVFORMAT_VERSION_MAJOR && defined LIBAVFORMAT_VERSION_MINOR ++#if LIBAVFORMAT_VERSION_MAJOR < 53 && LIBAVFORMAT_VERSION_MINOR < 45 ++ #define GUESS_NO_DEPRECATED ++#endif ++#endif + + #if LIBAVFORMAT_BUILD >= 4616 + /* The API for av_write_frame changed with FFmpeg version 0.4.9pre1. +@@ -258,7 +263,11 @@ + /* We use "mpeg1video" for raw mpeg1 format. Using "mpeg" would + * result in a muxed output file, which isn't appropriate here. + */ +- of = guess_format("mpeg1video", NULL, NULL); ++#ifdef GUESS_NO_DEPRECATED ++ of = guess_format("mpeg1video", NULL, NULL); ++#else ++ of = av_guess_format("mpeg1video", NULL, NULL); ++#endif + if (of) { + /* But we want the trailer to be correctly written. */ + of->write_trailer = mpeg1_write_trailer; +@@ -270,24 +279,44 @@ + #endif + } else if (strcmp(codec, "mpeg4") == 0) { + ext = ".avi"; +- of = guess_format("avi", NULL, NULL); ++#ifdef GUESS_NO_DEPRECATED ++ of = guess_format("mpeg1video", NULL, NULL); ++#else ++ of = av_guess_format("avi", NULL, NULL); ++#endif + } else if (strcmp(codec, "msmpeg4") == 0) { + ext = ".avi"; +- of = guess_format("avi", NULL, NULL); ++#ifdef GUESS_NO_DEPRECATED ++ of = guess_format("mpeg1video", NULL, NULL); ++#else ++ of = av_guess_format("avi", NULL, NULL); ++#endif + if (of) { + /* Manually override the codec id. */ + of->video_codec = CODEC_ID_MSMPEG4V2; + } + } else if (strcmp(codec, "swf") == 0) { + ext = ".swf"; +- of = guess_format("swf", NULL, NULL); ++#ifdef GUESS_NO_DEPRECATED ++ of = guess_format("mpeg1video", NULL, NULL); ++#else ++ of = av_guess_format("swf", NULL, NULL); ++#endif + } else if (strcmp(codec, "flv") == 0) { + ext = ".flv"; +- of = guess_format("flv", NULL, NULL); ++#ifdef GUESS_NO_DEPRECATED ++ of = guess_format("mpeg1video", NULL, NULL); ++#else ++ of = av_guess_format("flv", NULL, NULL); ++#endif + of->video_codec = CODEC_ID_FLV1; + } else if (strcmp(codec, "ffv1") == 0) { + ext = ".avi"; +- of = guess_format("avi", NULL, NULL); ++#ifdef GUESS_NO_DEPRECATED ++ of = guess_format("mpeg1video", NULL, NULL); ++#else ++ of = av_guess_format("avi", NULL, NULL); ++#endif + if (of) { + /* Use the FFMPEG Lossless Video codec (experimental!). + Requires strict_std_compliance to be <= -2 */ +@@ -295,7 +324,11 @@ + } + } else if (strcmp(codec, "mov") == 0) { + ext = ".mov"; +- of = guess_format("mov", NULL, NULL); ++#ifdef GUESS_NO_DEPRECATED ++ of = guess_format("mpeg1video", NULL, NULL); ++#else ++ of = av_guess_format("mov", NULL, NULL); ++#endif + } else { + motion_log(LOG_ERR, 0, "ffmpeg_video_codec option value %s is not supported", codec); + return NULL; diff -Nru motion-3.2.12/debian/patches/020111022~58627b0.patch motion-3.2.12/debian/patches/020111022~58627b0.patch --- motion-3.2.12/debian/patches/020111022~58627b0.patch 1970-01-01 00:00:00.000000000 +0000 +++ motion-3.2.12/debian/patches/020111022~58627b0.patch 2012-02-12 20:14:42.000000000 +0000 @@ -0,0 +1,141 @@ +Description: Improve detection of av_register_protocol() for ffmpeg. +Author: Angel Carpintero +Origin: Upstream, https://github.com/sackmotion/motion/commit/7aec4b#svn538 +Last-Update: 2012-02-12 + +--- a/configure.in ++++ b/configure.in +@@ -316,7 +316,7 @@ + # + else if test "${FFMPEG_DIR}" = "yes"; then + # AUTODETECT STATIC/SHARED LIB +- AC_MSG_CHECKING(for ffmpeg autodetecting) ++ AC_MSG_CHECKING(for ffmpeg autodetecting libraries) + + if test -f /usr/lib64/libavcodec.a -o -f /usr/lib64/libavcodec.so && test -f /usr/lib64/libavformat.a -o -f /usr/lib64/libavformat.so ; then + AC_MSG_RESULT(found in /usr/lib64) +@@ -347,7 +347,7 @@ + echo "" + fi + else +- AC_MSG_CHECKING(for ffmpeg in -> [${FFMPEG_DIR}] <-) ++ AC_MSG_CHECKING(for ffmpeg libraries in -> [${FFMPEG_DIR}] <-) + if test -f ${FFMPEG_DIR}/lib/libavcodec.a -o -f ${FFMPEG_DIR}/lib/libavcodec.so && test -f ${FFMPEG_DIR}/lib/libavformat.a -o -f ${FFMPEG_DIR}/lib/libavformat.so ; then + AC_MSG_RESULT(found) + FFMPEG_OK="found" +@@ -392,9 +392,11 @@ + elif test -f ${FFMPEG_DIR}/include/libavformat/avformat.h; then + AC_MSG_RESULT(found ${FFMPEG_DIR}/include/libavformat/avformat.h) + FFMPEG_CFLAGS="-I${FFMPEG_DIR}/include -DFFMPEG_NEW_INCLUDES" ++ AVFORMAT="-I${FFMPEG_DIR}/include/libavformat" + elif test -f ${FFMPEG_DIR}/include/ffmpeg/libavformat/avformat.h; then + AC_MSG_RESULT(found ${FFMPEG_DIR}/include/ffmpeg/libavformat/avformat.h) + FFMPEG_CFLAGS="-I${FFMPEG_DIR}/include/ffmpeg -DFFMPEG_NEW_INCLUDES" ++ AVFORMAT="-I${FFMPEG_DIR}/include/ffmpeg/libavformat" + else + AC_MSG_RESULT(not found) + FFMPEG_OK="no_found" +@@ -423,9 +425,11 @@ + AC_MSG_CHECKING([file_protocol is defined in ffmpeg ?]) + saved_CFLAGS=$CFLAGS + saved_LIBS=$LIBS +- CFLAGS="${FFMPEG_CFLAGS}" ++ ++ ++ CFLAGS="${FFMPEG_CFLAGS} ${AVFORMAT}" + LIBS="$TEMP_LIBS" +- ++ + AC_COMPILE_IFELSE( + [ + #include +@@ -442,7 +446,35 @@ + ] + ) + CFLAGS=$saved_CFLAGS +- LIBS=$saved_LIBS ++ LIBS=$saved_LIBS ++ ++ AC_MSG_CHECKING([av_register_protocol is defined in ffmpeg ?]) ++ saved_CFLAGS=$CFLAGS ++ saved_LIBS=$LIBS ++ CFLAGS="${FFMPEG_CFLAGS} ${AVFORMAT}" ++ LIBS="$TEMP_LIBS" ++ ++ AC_COMPILE_IFELSE( ++ [ ++ #include ++ URLProtocol test_file_protocol; ++ int main(void){ ++ av_register_protocol(&test_file_protocol); ++ return 0; ++ } ++ ], ++ [ ++ AC_MSG_RESULT(yes) ++ TEMP_CFLAGS="${TEMP_CFLAGS} -DHAVE_FFMPEG_AV_REGISTER_PROTOCOL" ++ ], ++ [ ++ AC_MSG_RESULT(no) ++ ] ++ ) ++ ++ CFLAGS=$saved_CFLAGS ++ LIBS=$saved_LIBS ++ + fi + fi + fi +--- a/ffmpeg.c ++++ b/ffmpeg.c +@@ -232,11 +232,11 @@ + mpeg1_file_protocol.url_seek = file_protocol.url_seek; + mpeg1_file_protocol.url_close = file_protocol.url_close; + +- /* Register the append file protocol. */ +-#if LIBAVFORMAT_BUILD >= (52<<16 | 31<<8) ++/* Register the append file protocol. */ ++#ifdef HAVE_FFMPEG_AV_REGISTER_PROTOCOL + av_register_protocol(&mpeg1_file_protocol); + #else +- register_protocol(&mpeg1_file_protocol); ++ av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol)); + #endif + } + +@@ -410,7 +410,11 @@ + + ffmpeg->c = c = AVSTREAM_CODEC_PTR(ffmpeg->video_st); + c->codec_id = ffmpeg->oc->oformat->video_codec; ++#if LIBAVCODEC_VERSION_MAJOR < 53 + c->codec_type = CODEC_TYPE_VIDEO; ++#else ++ c->codec_type = AVMEDIA_TYPE_VIDEO; ++#endif + is_mpeg1 = c->codec_id == CODEC_ID_MPEG1VIDEO; + + if (strcmp(ffmpeg_video_codec, "ffv1") == 0) +@@ -679,7 +683,11 @@ + 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 ++#if LIBAVCODEC_VERSION_MAJOR < 53 + pkt.flags |= PKT_FLAG_KEY; ++#else ++ pkt.flags |= AV_PKT_FLAG_KEY; ++#endif + pkt.data = (uint8_t *)pic; + pkt.size = sizeof(AVPicture); + ret = av_write_frame(ffmpeg->oc, &pkt); +@@ -700,7 +708,11 @@ + #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) { ++#if LIBAVCODEC_VERSION_MAJOR < 53 + pkt.flags |= PKT_FLAG_KEY; ++#else ++ pkt.flags |= AV_PKT_FLAG_KEY; ++#endif + } + pkt.data = ffmpeg->video_outbuf; + pkt.size = out_size; diff -Nru motion-3.2.12/debian/patches/020111022~734155f.patch motion-3.2.12/debian/patches/020111022~734155f.patch --- motion-3.2.12/debian/patches/020111022~734155f.patch 1970-01-01 00:00:00.000000000 +0000 +++ motion-3.2.12/debian/patches/020111022~734155f.patch 2012-02-12 20:25:15.000000000 +0000 @@ -0,0 +1,35 @@ +Description: Fix avoid crash producing MPEG4 with newer FFmpeg. +Author: Angel Carpintero +Origin: Upstream, https://github.com/sackmotion/motion/commit/734155#svn539 +Bug: http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2011x10x05x071936 +Last-Update: 2012-02-12 + +--- a/configure.in ++++ b/configure.in +@@ -1099,6 +1099,10 @@ + LIBS="${TEMP_LIBS}" + LDFLAGS="${TEMP_LDFLAGS}" + ++ ++AC_CHECK_FUNC(avformat_alloc_context, AC_DEFINE([have_avformat_alloc_context],1,[Define to 1 if you have avformat_alloc_context support])) ++AC_CHECK_FUNC(av_avformat_alloc_context, AC_DEFINE([have_av_avformat_alloc_context],1,[Define to 1 if you have av_avformat_alloc_context support])) ++ + # + # Add the right exec path for rc scripts + # +--- a/ffmpeg.c ++++ b/ffmpeg.c +@@ -373,7 +373,13 @@ + snprintf(ffmpeg->codec, sizeof(ffmpeg->codec), "%s", ffmpeg_video_codec); + + /* allocation the output media context */ ++#ifdef have_avformat_alloc_context ++ ffmpeg->oc = avformat_alloc_context(); ++#elif defined have_av_avformat_alloc_context ++ ffmpeg->oc = av_alloc_format_context(); ++#else + ffmpeg->oc = av_mallocz(sizeof(AVFormatContext)); ++#endif + + if (!ffmpeg->oc) { + motion_log(LOG_ERR, 1, "Memory error while allocating output media context"); diff -Nru motion-3.2.12/debian/patches/020111027~5dd9ed4.patch motion-3.2.12/debian/patches/020111027~5dd9ed4.patch --- motion-3.2.12/debian/patches/020111027~5dd9ed4.patch 1970-01-01 00:00:00.000000000 +0000 +++ motion-3.2.12/debian/patches/020111027~5dd9ed4.patch 2012-02-12 20:25:26.000000000 +0000 @@ -0,0 +1,68 @@ +Description: Improve av_register_protocol2()/av_register_protocol() detection +Author: Angel Carpintero +Origin: Upstream, https://github.com/sackmotion/motion/commit/5dd9ed#svn540#svn540 +Last-Update: 2012-02-12 + +--- a/configure.in ++++ b/configure.in +@@ -448,33 +448,6 @@ + CFLAGS=$saved_CFLAGS + LIBS=$saved_LIBS + +- AC_MSG_CHECKING([av_register_protocol is defined in ffmpeg ?]) +- saved_CFLAGS=$CFLAGS +- saved_LIBS=$LIBS +- CFLAGS="${FFMPEG_CFLAGS} ${AVFORMAT}" +- LIBS="$TEMP_LIBS" +- +- AC_COMPILE_IFELSE( +- [ +- #include +- URLProtocol test_file_protocol; +- int main(void){ +- av_register_protocol(&test_file_protocol); +- return 0; +- } +- ], +- [ +- AC_MSG_RESULT(yes) +- TEMP_CFLAGS="${TEMP_CFLAGS} -DHAVE_FFMPEG_AV_REGISTER_PROTOCOL" +- ], +- [ +- AC_MSG_RESULT(no) +- ] +- ) +- +- CFLAGS=$saved_CFLAGS +- LIBS=$saved_LIBS +- + fi + fi + fi +@@ -1102,6 +1075,9 @@ + + AC_CHECK_FUNC(avformat_alloc_context, AC_DEFINE([have_avformat_alloc_context],1,[Define to 1 if you have avformat_alloc_context support])) + AC_CHECK_FUNC(av_avformat_alloc_context, AC_DEFINE([have_av_avformat_alloc_context],1,[Define to 1 if you have av_avformat_alloc_context support])) ++AC_CHECK_FUNC(av_register_protocol2, AC_DEFINE([have_av_register_protocol2],1,[Define to 1 if you have av_register_protocol2 support])) ++AC_CHECK_FUNC(av_register_protocol, AC_DEFINE([have_av_register_protocol],1,[Define to 1 if you have av_register_protocol support])) ++ + + # + # Add the right exec path for rc scripts +--- a/ffmpeg.c ++++ b/ffmpeg.c +@@ -233,10 +233,12 @@ + mpeg1_file_protocol.url_close = file_protocol.url_close; + + /* Register the append file protocol. */ +-#ifdef HAVE_FFMPEG_AV_REGISTER_PROTOCOL ++#ifdef have_av_register_protocol2 ++ av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol)); ++#elif defined have_av_register_protocol + av_register_protocol(&mpeg1_file_protocol); + #else +- av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol)); ++# warning av_register_protocolXXX missing + #endif + } + diff -Nru motion-3.2.12/debian/patches/02_libav-api.diff motion-3.2.12/debian/patches/02_libav-api.diff --- motion-3.2.12/debian/patches/02_libav-api.diff 2011-10-17 22:48:13.000000000 +0000 +++ motion-3.2.12/debian/patches/02_libav-api.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,93 +0,0 @@ -Description: Update to current libav API -Author: Daniel Polehn -Origin: other, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=621962#10 -Last-Update: 2011-08-18 - -Index: b/ffmpeg.c -=================================================================== ---- a/ffmpeg.c -+++ b/ffmpeg.c -@@ -229,7 +229,7 @@ - - /* Register the append file protocol. */ - #if LIBAVFORMAT_BUILD >= (52<<16 | 31<<8) -- av_register_protocol(&mpeg1_file_protocol); -+ av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol)); - #else - register_protocol(&mpeg1_file_protocol); - #endif -@@ -258,7 +258,7 @@ - /* We use "mpeg1video" for raw mpeg1 format. Using "mpeg" would - * result in a muxed output file, which isn't appropriate here. - */ -- of = guess_format("mpeg1video", NULL, NULL); -+ of = av_guess_format("mpeg1video", NULL, NULL); - if (of) { - /* But we want the trailer to be correctly written. */ - of->write_trailer = mpeg1_write_trailer; -@@ -270,24 +270,24 @@ - #endif - } else if (strcmp(codec, "mpeg4") == 0) { - ext = ".avi"; -- of = guess_format("avi", NULL, NULL); -+ of = av_guess_format("avi", NULL, NULL); - } else if (strcmp(codec, "msmpeg4") == 0) { - ext = ".avi"; -- of = guess_format("avi", NULL, NULL); -+ of = av_guess_format("avi", NULL, NULL); - if (of) { - /* Manually override the codec id. */ - of->video_codec = CODEC_ID_MSMPEG4V2; - } - } else if (strcmp(codec, "swf") == 0) { - ext = ".swf"; -- of = guess_format("swf", NULL, NULL); -+ of = av_guess_format("swf", NULL, NULL); - } else if (strcmp(codec, "flv") == 0) { - ext = ".flv"; -- of = guess_format("flv", NULL, NULL); -+ of = av_guess_format("flv", NULL, NULL); - of->video_codec = CODEC_ID_FLV1; - } else if (strcmp(codec, "ffv1") == 0) { - ext = ".avi"; -- of = guess_format("avi", NULL, NULL); -+ of = av_guess_format("avi", NULL, NULL); - if (of) { - /* Use the FFMPEG Lossless Video codec (experimental!). - Requires strict_std_compliance to be <= -2 */ -@@ -295,7 +295,7 @@ - } - } else if (strcmp(codec, "mov") == 0) { - ext = ".mov"; -- of = guess_format("mov", NULL, NULL); -+ of = av_guess_format("mov", NULL, NULL); - } else { - motion_log(LOG_ERR, 0, "ffmpeg_video_codec option value %s is not supported", codec); - return NULL; -@@ -377,7 +377,7 @@ - - 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 +646,7 @@ - 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 +667,7 @@ - #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; diff -Nru motion-3.2.12/debian/patches/02_libav_multiarch.patch motion-3.2.12/debian/patches/02_libav_multiarch.patch --- motion-3.2.12/debian/patches/02_libav_multiarch.patch 1970-01-01 00:00:00.000000000 +0000 +++ motion-3.2.12/debian/patches/02_libav_multiarch.patch 2012-02-12 22:00:38.000000000 +0000 @@ -0,0 +1,20 @@ +Description: Autodetect multiarch libavcodec path in autoconf. +Author: Stephen Kitt +Last-Update: 2012-02-12 + +--- a/configure.in ++++ b/configure.in +@@ -318,7 +318,12 @@ + # AUTODETECT STATIC/SHARED LIB + AC_MSG_CHECKING(for ffmpeg autodetecting libraries) + +- if test -f /usr/lib64/libavcodec.a -o -f /usr/lib64/libavcodec.so && test -f /usr/lib64/libavformat.a -o -f /usr/lib64/libavformat.so ; then ++ if test -f /usr/lib/$(dpkg-architecture -qDEB_BUILD_MULTIARCH)/libavcodec.so ; then ++ AC_MSG_RESULT(found in /usr/lib/$(dpkg-architecture -qDEB_BUILD_MULTIARCH)) ++ FFMPEG_OK="found" ++ FFMPEG_LIB="/usr/lib/$(dpkg-architecture -qDEB_BUILD_MULTIARCH)" ++ FFMPEG_DIR="/usr" ++ elif test -f /usr/lib64/libavcodec.a -o -f /usr/lib64/libavcodec.so && test -f /usr/lib64/libavformat.a -o -f /usr/lib64/libavformat.so ; then + AC_MSG_RESULT(found in /usr/lib64) + FFMPEG_OK="found" + FFMPEG_LIB="/usr/lib64" diff -Nru motion-3.2.12/debian/patches/series motion-3.2.12/debian/patches/series --- motion-3.2.12/debian/patches/series 2011-10-17 22:49:05.000000000 +0000 +++ motion-3.2.12/debian/patches/series 2012-02-12 21:16:11.000000000 +0000 @@ -1,2 +1,6 @@ +020101107~5273773.patch +020111022~58627b0.patch +020111022~734155f.patch +020111027~5dd9ed4.patch 01_videodev.h.diff -02_libav-api.diff +02_libav_multiarch.patch diff -Nru motion-3.2.12/debian/rules motion-3.2.12/debian/rules --- motion-3.2.12/debian/rules 2011-08-23 20:21:08.000000000 +0000 +++ motion-3.2.12/debian/rules 2012-02-12 21:38:01.000000000 +0000 @@ -19,8 +19,7 @@ config.status: configure dh_testdir - cp -f /usr/share/misc/config.guess config.guess - cp -f /usr/share/misc/config.sub config.sub + dh_autoreconf # Add here commands to configure the package. CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure \ --prefix=/usr \ @@ -52,7 +51,7 @@ dh_testroot rm -f build-stamp configure-stamp -[ ! -f Makefile ] || $(MAKE) distclean - rm -f config.sub config.guess config.log config.status + dh_autoreconf_clean dh_clean install: build-stamp