summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2011-12-10 12:07:19 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2011-12-10 12:07:19 +0000
commit5f3fb4c3217ff81136b97dd493b1d35079eba736 (patch)
tree7de5e94dcbd8f0b14b348220dd5e791882ff1b43 /media-video/motion
parentInitial commit. Bug #363207. Thanks to Michael Orlitzky <michael@orlitzky.com> (diff)
downloadhistorical-5f3fb4c3217ff81136b97dd493b1d35079eba736.tar.gz
historical-5f3fb4c3217ff81136b97dd493b1d35079eba736.tar.bz2
historical-5f3fb4c3217ff81136b97dd493b1d35079eba736.zip
Since motion doesn't separate v4l1 and v4l2 support, use the libv4l1-videodev.h include from libv4l to allow succesful compilation of both backends. This should be only temporary workaround since upstream has separated the backends in version control. See bug 376225.
Package-Manager: portage-2.2.0_alpha79/cvs/Linux x86_64
Diffstat (limited to 'media-video/motion')
-rw-r--r--media-video/motion/ChangeLog11
-rw-r--r--media-video/motion/Manifest14
-rw-r--r--media-video/motion/files/motion-3.2.12-workaround-v4l1_deprecation.patch35
-rw-r--r--media-video/motion/motion-3.2.12-r2.ebuild68
4 files changed, 123 insertions, 5 deletions
diff --git a/media-video/motion/ChangeLog b/media-video/motion/ChangeLog
index 1e8e7ace6518..0bea78a51795 100644
--- a/media-video/motion/ChangeLog
+++ b/media-video/motion/ChangeLog
@@ -1,6 +1,15 @@
# 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.37 2011/12/03 15:58:14 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/motion/ChangeLog,v 1.38 2011/12/10 12:07:19 ssuominen Exp $
+
+*motion-3.2.12-r2 (10 Dec 2011)
+
+ 10 Dec 2011; Samuli Suominen <ssuominen@gentoo.org> +motion-3.2.12-r2.ebuild,
+ +files/motion-3.2.12-workaround-v4l1_deprecation.patch:
+ Since motion doesn't separate v4l1 and v4l2 support, use the
+ libv4l1-videodev.h include from libv4l to allow succesful compilation of both
+ backends. This should be only temporary workaround since upstream has
+ separated the backends in version control. See bug 376225.
03 Dec 2011; Alexis Ballier <aballier@gentoo.org> +files/ffmpeg08.patch,
motion-3.2.12-r1.ebuild:
diff --git a/media-video/motion/Manifest b/media-video/motion/Manifest
index 8abbb16b931b..3d6fb10554e1 100644
--- a/media-video/motion/Manifest
+++ b/media-video/motion/Manifest
@@ -2,16 +2,22 @@
Hash: SHA1
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-r1.ebuild 1750 RMD160 d3386dadf65270d1fa96fb269f2393e7f4988d6f SHA1 3ceeadb9326894c62bab76a63f90a1afcc28d714 SHA256 ceae62cbb841fc25902582a850d5bbd03439608f866a8d82df92a6f2c2157535
-MISC ChangeLog 5693 RMD160 9b9538abcababc7186db3bc471e1209c988401bb SHA1 fb9ee3a08b5e11119d95133d4bc57e054bc673b1 SHA256 52199530fa7afa37e1b518f09aa3aca1d02cb3dc9bb914d29aff34e0df7e6318
+EBUILD motion-3.2.12-r2.ebuild 1727 RMD160 1ee66c40286c74aaaead59d4ce3adba9ba51d02d SHA1 5ed1f7df60c3c3900c4355d7672f262d2ee850fc SHA256 32523ecf85bff34ebdbb77482e35ce156edce5fd0946a1f5abc7b2a46c5d43ec
+MISC ChangeLog 6142 RMD160 791fc17102055010cf49f0b3e92ea618ee802bdf SHA1 6173d84d3e4d734fa6a87fc743182af53e885edc SHA256 4a4daddc6fb82da80fab2d977362976485e119326b718d1a5b84726f03d41249
MISC metadata.xml 223 RMD160 86b42c49b694db39ddb3fdc60b98a3ad1a0c3392 SHA1 ea8c387229caaf4b0d3c9fbef9143b70dcae0b0d SHA256 dd48e823ec9a151bc3611121402ed26ee24eb3304aa62870b1e875a8fa0ac812
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
-iEYEARECAAYFAk7aRxsACgkQvFcC4BYPU0o6gQCgu5bAQ2Fkm/jcp8Pmqr4K1veQ
-TwQAoJjX6krT6+lSsCdSHAjp3yE0kAeX
-=RC5m
+iQEcBAEBAgAGBQJO40tVAAoJEEdUh39IaPFNV8AH/Ri2Gyl81vDaS7EU8ZV1kaYl
+GydjLoA9P4g02HbJfln1kJoriSiV1hUwEKjdOGdnxpL60SZl0q9kvu/LENX4L0bt
+j6QFEehy99FSm+BLsyuNqLTq07r0GYWg1KgDU3WxWoZZ+Wip/jT+UnpVXttXROwd
+bk46qx9Pbu2KDz5Bebks76OK8Adn92XJ46UccQl4tLp58dj725XL7Ky6l+1iwy5g
+k1BS8fKKyv6jrBtlXgqlHfCploQ3LZBn9FRWfHpDuG6cA/365sVtKSDy+VwpdCbV
+AmSAWe+BrJK0ttLaHmfFyFr517fOB4pGI9VnM3QQlfmZx9HIw1dUCEzB9QU5MZs=
+=SJrp
-----END PGP SIGNATURE-----
diff --git a/media-video/motion/files/motion-3.2.12-workaround-v4l1_deprecation.patch b/media-video/motion/files/motion-3.2.12-workaround-v4l1_deprecation.patch
new file mode 100644
index 000000000000..04a18dc62c8e
--- /dev/null
+++ b/media-video/motion/files/motion-3.2.12-workaround-v4l1_deprecation.patch
@@ -0,0 +1,35 @@
+motion has both v4l1 and v4l2 support but they are not separate except in upstream version control.
+so, temporarily use the libv4l1-videodev.h from libv4l to allow succesful build of the v4l2 (pay attention here!) backend.
+
+--- motion.h
++++ motion.h
+@@ -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>
+--- track.c
++++ track.c
+@@ -11,6 +11,7 @@
+ #include "motion.h"
+
+ #ifndef WITHOUT_V4L
++#include <linux/videodev2.h>
+ #include "pwc-ioctl.h"
+ #endif
+
+--- video.h
++++ video.h
+@@ -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
diff --git a/media-video/motion/motion-3.2.12-r2.ebuild b/media-video/motion/motion-3.2.12-r2.ebuild
new file mode 100644
index 000000000000..46838f641f4b
--- /dev/null
+++ b/media-video/motion/motion-3.2.12-r2.ebuild
@@ -0,0 +1,68 @@
+# 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-r2.ebuild,v 1.1 2011/12/10 12:07:19 ssuominen Exp $
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="A software motion detector"
+HOMEPAGE="http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ppc ~x86"
+IUSE="ffmpeg mysql postgres +v4l"
+
+RDEPEND="sys-libs/zlib
+ virtual/jpeg
+ ffmpeg? ( virtual/ffmpeg )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql-base )"
+# note: libv4l is only in dependencies for the libv4l1-videodev.h header file
+# used by the -workaround-v4l1_deprecation.patch.
+DEPEND="${RDEPEND}
+ v4l? ( virtual/os-headers media-libs/libv4l )"
+
+pkg_setup() {
+ enewuser motion -1 -1 -1 video
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/ffmpeg08.patch \
+ "${FILESDIR}"/${P}-workaround-v4l1_deprecation.patch
+}
+
+src_configure() {
+ econf \
+ $(use_with v4l) \
+ $(use_with ffmpeg) \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ --without-optimizecpu
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ DOC='CHANGELOG CODE_STANDARD CREDITS FAQ README' \
+ docdir=/usr/share/doc/${PF} \
+ EXAMPLES='thread*.conf' \
+ examplesdir=/usr/share/doc/${PF}/examples \
+ install
+
+ dohtml *.html
+
+ newinitd "${FILESDIR}"/motion.initd-r2 motion
+ newconfd "${FILESDIR}"/motion.confd motion
+
+ mv -vf "${D}"/etc/motion{-dist,}.conf || die
+}
+
+pkg_postinst() {
+ elog "You need to setup /etc/motion.conf before running"
+ elog "motion for the first time."
+ elog "You can install motion detection as a service, use:"
+ elog "rc-update add motion default"
+}