diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2011-12-10 12:07:19 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2011-12-10 12:07:19 +0000 |
commit | d97f28e0f55de87fbec7946eed72b983e256bde1 (patch) | |
tree | 18b95bd5d6cc5ed4989cd10457864403eae438b6 /media-video/motion | |
parent | Initial commit. Bug #363207. Thanks to Michael Orlitzky <michael@orlitzky.com> (diff) | |
download | gentoo-2-d97f28e0f55de87fbec7946eed72b983e256bde1.tar.gz gentoo-2-d97f28e0f55de87fbec7946eed72b983e256bde1.tar.bz2 gentoo-2-d97f28e0f55de87fbec7946eed72b983e256bde1.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.
(Portage version: 2.2.0_alpha79/cvs/Linux x86_64)
Diffstat (limited to 'media-video/motion')
-rw-r--r-- | media-video/motion/ChangeLog | 11 | ||||
-rw-r--r-- | media-video/motion/files/motion-3.2.12-workaround-v4l1_deprecation.patch | 35 | ||||
-rw-r--r-- | media-video/motion/motion-3.2.12-r2.ebuild | 68 |
3 files changed, 113 insertions, 1 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/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" +} |