diff options
author | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-11-15 11:36:24 -0300 |
---|---|---|
committer | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-11-15 11:36:24 -0300 |
commit | 7caeeae33fd491dbea5044168bbc50197963118c (patch) | |
tree | 2ceec96ef9e1897d921d05f2fc5c5dda2ad893e9 /community/motion | |
parent | 2f39e56def6dadf0746b6e96e756518f1af9396b (diff) | |
parent | 3d151dfc8e08b65c2c1d4b5e8081562d56ee7d41 (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
community/ginac/PKGBUILD
community/gnash/PKGBUILD
community/haskell-tar/PKGBUILD
community/libdlna/PKGBUILD
community/mplayer2/PKGBUILD
community/musescore/PKGBUILD
community/open-vm-tools-modules/PKGBUILD
community/paraview/PKGBUILD
community/picard/PKGBUILD
core/idnkit/PKGBUILD
core/ifenslave/PKGBUILD
extra/audacious/PKGBUILD
extra/avidemux/PKGBUILD
extra/ffmpeg/PKGBUILD
extra/graphite/PKGBUILD
extra/gstreamer0.10-ugly/PKGBUILD
extra/k3b/PKGBUILD
extra/kdemultimedia/PKGBUILD
extra/koffice/PKGBUILD
extra/kradio/PKGBUILD
extra/libreoffice/PKGBUILD
extra/mediastreamer/PKGBUILD
extra/poppler/PKGBUILD
extra/vlc/PKGBUILD
libre/texlive-bin-libre/PKGBUILD
Diffstat (limited to 'community/motion')
-rw-r--r-- | community/motion/PKGBUILD | 36 | ||||
-rw-r--r-- | community/motion/ffmpeg-0.8.patch | 112 | ||||
-rw-r--r-- | community/motion/linux-headers.patch | 35 |
3 files changed, 179 insertions, 4 deletions
diff --git a/community/motion/PKGBUILD b/community/motion/PKGBUILD index c6f5fa422..e12f7ee0c 100644 --- a/community/motion/PKGBUILD +++ b/community/motion/PKGBUILD @@ -1,22 +1,24 @@ -# $Id: PKGBUILD 85176 2010-07-09 22:50:45Z eric $ +# $Id: PKGBUILD 58411 2011-11-12 17:18:08Z ibiru $ # Maintainer: pkgname=motion pkgver=3.2.12 -pkgrel=1 +pkgrel=2 pkgdesc="A software motion detector which grabs images from video4linux devices and/or from webcams" arch=('i686' 'x86_64' 'mips64el') license=('GPL') url="http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome" -depends=('ffmpeg' 'libjpeg') +depends=('ffmpeg' 'libjpeg' 'v4l-utils') backup=('etc/motion/motion.conf') options=('!makeflags') -source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz rc.motion) +source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz rc.motion ffmpeg-0.8.patch linux-headers.patch) md5sums=('1ba0065ed50509aaffb171594c689f46' '24b6fbfa586857b72f90cda81410c14f') sha1sums=('dc59b36e45e7626baa65ce62c961af918fea76bd' '06f74131a9d4abc8aa05f531bd19c51a5732023f') build() { cd "${srcdir}/${pkgname}-${pkgver}" + patch -Np1 -i $srcdir/ffmpeg-0.8.patch + patch -Np1 -i $srcdir/linux-headers.patch ./configure --prefix=/usr \ --without-pgsql \ --without-mysql \ @@ -31,3 +33,29 @@ package(){ install -Dm755 "${srcdir}/rc.motion" "${pkgdir}/etc/rc.d/motion" } +md5sums=('1ba0065ed50509aaffb171594c689f46' + '24b6fbfa586857b72f90cda81410c14f' + '2f422c268337dce583b9dac344005e93') +sha1sums=('dc59b36e45e7626baa65ce62c961af918fea76bd' + '06f74131a9d4abc8aa05f531bd19c51a5732023f' + '7b41c8c273980c147694d82af7c9cb9e51302dd9') +md5sums=('1ba0065ed50509aaffb171594c689f46' + '24b6fbfa586857b72f90cda81410c14f' + '5db295d7c2e4c38f36e861a3c4dfdd8d') +sha1sums=('dc59b36e45e7626baa65ce62c961af918fea76bd' + '06f74131a9d4abc8aa05f531bd19c51a5732023f' + '2b12df6d9053d17f6ac1969e3510dd50c6fe6667') +md5sums=('1ba0065ed50509aaffb171594c689f46' + '24b6fbfa586857b72f90cda81410c14f' + 'd36687710837d69fbce4608b1345fa34') +sha1sums=('dc59b36e45e7626baa65ce62c961af918fea76bd' + '06f74131a9d4abc8aa05f531bd19c51a5732023f' + '6912448db0711f85322505ee6f8052f8f98ae634') +md5sums=('1ba0065ed50509aaffb171594c689f46' + '24b6fbfa586857b72f90cda81410c14f' + 'd36687710837d69fbce4608b1345fa34' + 'd8c3c4fdded5cfbd729710475559a21d') +sha1sums=('dc59b36e45e7626baa65ce62c961af918fea76bd' + '06f74131a9d4abc8aa05f531bd19c51a5732023f' + '6912448db0711f85322505ee6f8052f8f98ae634' + '6f33dab895ae398cc5e7017cbf5dc5d728f3ca9e') diff --git a/community/motion/ffmpeg-0.8.patch b/community/motion/ffmpeg-0.8.patch new file mode 100644 index 000000000..5dcc6e686 --- /dev/null +++ b/community/motion/ffmpeg-0.8.patch @@ -0,0 +1,112 @@ +diff -aur motion-3.2.12/ffmpeg.c motion-3.2.12.new/ffmpeg.c +--- motion-3.2.12/ffmpeg.c 2010-06-01 08:48:23.000000000 +0200 ++++ motion-3.2.12.new/ffmpeg.c 2011-10-31 17:25:03.000000000 +0100 +@@ -14,7 +14,7 @@ + + #include "ffmpeg.h" + #include "motion.h" +- ++#include <libavformat/avformat.h> + #if LIBAVCODEC_BUILD > 4680 + /* FFmpeg after build 4680 doesn't have support for mpeg1 videos with + * non-standard framerates. Previous builds contained a broken hack +@@ -228,10 +228,12 @@ + mpeg1_file_protocol.url_close = file_protocol.url_close; + + /* Register the append file protocol. */ +-#if LIBAVFORMAT_BUILD >= (52<<16 | 31<<8) +- av_register_protocol(&mpeg1_file_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 +- register_protocol(&mpeg1_file_protocol); ++# warning av_register_protocolXXX missing + #endif + } + +@@ -244,7 +246,7 @@ + const char *ext; + AVOutputFormat *of = NULL; + +- /* Here, we use guess_format to automatically setup the codec information. ++ /* Here, we use av_guess_format to automatically setup the codec information. + * If we are using msmpeg4, manually set that codec here. + * We also dynamically add the file extension to the filename here. This was + * done to support both mpeg1 and mpeg4 codecs since they have different extensions. +@@ -258,7 +260,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 +272,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 +297,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 +379,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 +648,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 +669,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 --git a/community/motion/linux-headers.patch b/community/motion/linux-headers.patch new file mode 100644 index 000000000..795c8aec5 --- /dev/null +++ b/community/motion/linux-headers.patch @@ -0,0 +1,35 @@ +diff -urN motion-3.2.12-OLD/motion.h motion-3.2.12-NEW/motion.h +--- motion-3.2.12-OLD/motion.h 2010-05-31 23:48:23.000000000 -0700 ++++ motion-3.2.12-NEW/motion.h 2011-08-30 02:11:08.000000000 -0700 +@@ -40,7 +40,7 @@ + + #define _LINUX_TIME_H 1 + #if !defined(WITHOUT_V4L) && !defined(BSD) +-#include <linux/videodev.h> ++#include <libv4l1-videodev.h> + #endif + + #include <pthread.h> +diff -urN motion-3.2.12-OLD/track.c motion-3.2.12-NEW/track.c +--- motion-3.2.12-OLD/track.c 2010-05-31 23:48:23.000000000 -0700 ++++ motion-3.2.12-NEW/track.c 2011-08-30 23:05:09.000000000 -0700 +@@ -11,6 +11,7 @@ + #include "motion.h" + + #ifndef WITHOUT_V4L ++#include <linux/videodev2.h> + #include "pwc-ioctl.h" + #endif + +diff -urN motion-3.2.12-OLD/video.h motion-3.2.12-NEW/video.h +--- motion-3.2.12-OLD/video.h 2010-05-31 23:48:23.000000000 -0700 ++++ motion-3.2.12-NEW/video.h 2011-08-30 02:11:12.000000000 -0700 +@@ -12,7 +12,7 @@ + + #define _LINUX_TIME_H 1 + #ifndef WITHOUT_V4L +-#include <linux/videodev.h> ++#include <libv4l1-videodev.h> + #include <sys/mman.h> + #include "pwc-ioctl.h" + #endif |