diff options
Diffstat (limited to 'media-video/motion')
-rw-r--r-- | media-video/motion/Manifest | 2 | ||||
-rw-r--r-- | media-video/motion/files/4.1.1/Fix-build-errors-with-FFmpeg-4.0.patch | 54 | ||||
-rw-r--r-- | media-video/motion/motion-4.1.1-r1.ebuild | 94 |
3 files changed, 150 insertions, 0 deletions
diff --git a/media-video/motion/Manifest b/media-video/motion/Manifest index deb11d5cfcc8..f08b5bce890b 100644 --- a/media-video/motion/Manifest +++ b/media-video/motion/Manifest @@ -1,3 +1,4 @@ +AUX 4.1.1/Fix-build-errors-with-FFmpeg-4.0.patch 1768 BLAKE2B d2ec71166a4c3779007aabd975e3bd003b17713ff1bcd3c94e57183936c5f6fc24abd6ed5231dca94d1d37f66db7a13358c5dc52795200d190d848f0360ec1e6 SHA512 bee1af2f32215b2abc006b9f12c77e138dbe9bb2de41ae9f1022b6c10340cb8e2eb2831459b241c44e3a0789a9df81b7227dfc07beb3e7e3af6f718fb4a4c56d AUX motion.conf 37 BLAKE2B 0a30bc830b519022f8c3bfdedb274329ecb506f3b3e42fb3de1f61513b9ef86c7884a9298c17b19b4afbb83b33ceb4f35f85fd377775e2485bbbfa2feb76833e SHA512 06e2dd29b946f35c78e7cf0ddeca727ca7f3f84e57e38b6688b2a493d487061ea6c959c5b365305a7813e0d3315f719003c681c26265566f46faa6ff88606853 AUX motion.confd 99 BLAKE2B d4548644a683d76d4d359b74a1a78ffe56a6575fa6cb0b902899f5576fa63d22aa2845a8ffef832714f066239d15aa736fb5af944eea46d388c8e27e949f3fc5 SHA512 b0135b220ac2f1857012455726fb5c5aaa73a79f864619cb7fbfbb1e8aaf95b0c4dd51bbc30f29714cc29a271f9196f3d92e160fa75a90ccbcf0024640620d5d AUX motion.confd-r1 272 BLAKE2B bb395beafecf0498158ff0358b489ab251d79e005148715ef89ea882dec945f82faec60c2650e703d4db82e0bef3ccc8abd9768adf23dc8df5161f7fd8f24714 SHA512 8a67b5b0360924e58ba3136a737ce73bb43201a49b2b6e2c632426561b830f6ab55cbbeaa89be7f1683aa8fd322b4f31b9f560e67a93eaceb964c9f56ceef363 @@ -8,5 +9,6 @@ DIST motion-release-4.1.1.tar.gz 447795 BLAKE2B 8c7dfdad89f49ba8ec39689d268b4bc9 DIST release-4.0.1.tar.gz 444779 BLAKE2B e74b193f421e4fe165f36fe251eafe44203bbf8825b0062254bd7e0c9a57b286314c1bbb287c1c768db62649d82b83f4876ef236e446a1f21f7baf90d5ce5b4d SHA512 6ccde3890e6af56f28208321987dd1b9d62a55bbe7cbc3ab5600263602e6e8f47589392c2f3a3a6cb54f927ee76aea94d0e83f26ce8e4047890c891b6c2f8976 EBUILD motion-4.0.1-r1.ebuild 1979 BLAKE2B 943b6b40dad276dc221c61d7d3de0af85992090437bab65fdf4b58ae4ffa22ac53e5e01498e5cf2fa371c751801ecc64d248a655c7c50550520feddad7c2341d SHA512 336da1d0dc347fa610bd810c309dedf82e66137723decba9edaeb44ae68ad0f490483f722fce267f1de8a70406698f6f5701711ec00b11d25cdba1a2a6cb5d95 EBUILD motion-4.0.1-r2.ebuild 2011 BLAKE2B 29f89ea29bc4dc39aaa4b5beb5dbd96b9094226892eda76b025c7ddf874894cfb70f6ba50bf3dff6cfbe7088f04f9b0d8239280270e9a8d2eefd9cde5d1c5093 SHA512 6429e44d029443192c347ae8d0f309244cc63cc67ccf46b9f78c678c7621c808d085fca85d0120da71964d323e10d817c835513ef0a1fb5857be4b4aea36a305 +EBUILD motion-4.1.1-r1.ebuild 2206 BLAKE2B 40d1332ae002f75b2aa83edce1070f66159ded78c2d5b5ecfe280947b59fc837bcd5d00b976411c8c884ea1d6b457545ee7519eeed47e2cb73eb5c02d0167d97 SHA512 822db0bc6a312ee8c38605cb66eab4ebfd38ab0eda97ea8e15a1eeb8b4ef12a048280c2c28c31e8aab43393cc97a8cd81c3671d2a18a9ba2a6a5d16b5a60695f EBUILD motion-4.1.1.ebuild 2132 BLAKE2B 55a3e637fd7da85402f71a744d05c73cf0a4eb1a1d3a0df6a4bd7d94e6a14e64334e567c912a1d117e8ed3c0cf8fa43ea8040d9911d677b6b99065966a4bd51b SHA512 3882e33512a29332ce013c8a61749dbf986e546ac5c0e4662cabe77a1655ef281ecfa7649504446c52c4edb301524ae5bcd198ab7bf7eb6f781c36fc06aad84d MISC metadata.xml 688 BLAKE2B 62d5d1fc2c9581ee8d66557903d17060627060d4cc76d745bee2bbb17980bc81337574986a7bb1b2d6f669041ba09b355fce68655f9961d388f3ae40a65d3fb2 SHA512 f69d8539a16d80a49c147a60f8e831a245814c4853383f9991f4c2762aa2d1b7f22b8993eb7184a49c6c783b75d23ef91a10b6293563aa7e29f561f40fad56d1 diff --git a/media-video/motion/files/4.1.1/Fix-build-errors-with-FFmpeg-4.0.patch b/media-video/motion/files/4.1.1/Fix-build-errors-with-FFmpeg-4.0.patch new file mode 100644 index 000000000000..641d68a8d0c5 --- /dev/null +++ b/media-video/motion/files/4.1.1/Fix-build-errors-with-FFmpeg-4.0.patch @@ -0,0 +1,54 @@ +From 9a9e918ec819277c6c5c2f21b52dd63570e426a7 Mon Sep 17 00:00:00 2001 +From: James Cowgill <jcowgill@users.noreply.github.com> +Date: Sun, 25 Feb 2018 20:13:57 +0000 +Subject: [PATCH] Fix build errors with FFmpeg 4.0 + +--- + ffmpeg.c | 17 +++++++++++++++-- + 1 file changed, 15 insertions(+), 2 deletions(-) + +diff --git a/ffmpeg.c b/ffmpeg.c +index b2780bb..23644db 100644 +--- a/ffmpeg.c ++++ b/ffmpeg.c +@@ -67,6 +67,19 @@ + + #endif + ++/*********************************************/ ++#if (LIBAVCODEC_VERSION_MAJOR >= 57) ++ ++#define MY_CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER ++#define MY_CODEC_FLAG_QSCALE AV_CODEC_FLAG_QSCALE ++ ++#else ++ ++#define MY_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER ++#define MY_CODEC_FLAG_QSCALE CODEC_FLAG_QSCALE ++ ++#endif ++ + /*********************************************/ + AVFrame *my_frame_alloc(void){ + AVFrame *pic; +@@ -538,7 +551,7 @@ static int ffmpeg_set_quality(struct ffmpeg *ffmpeg){ + /* The selection of 8000 in the else is a subjective number based upon viewing output files */ + if (ffmpeg->vbr > 0){ + ffmpeg->vbr =(int)(((100-ffmpeg->vbr)*(100-ffmpeg->vbr)*(100-ffmpeg->vbr) * 8000) / 1000000) + 1; +- ffmpeg->ctx_codec->flags |= CODEC_FLAG_QSCALE; ++ ffmpeg->ctx_codec->flags |= MY_CODEC_FLAG_QSCALE; + ffmpeg->ctx_codec->global_quality=ffmpeg->vbr; + } + } +@@ -663,7 +676,7 @@ static int ffmpeg_set_codec(struct ffmpeg *ffmpeg){ + ffmpeg->ctx_codec->strict_std_compliance = -2; + ffmpeg->ctx_codec->level = 3; + } +- ffmpeg->ctx_codec->flags |= CODEC_FLAG_GLOBAL_HEADER; ++ ffmpeg->ctx_codec->flags |= MY_CODEC_FLAG_GLOBAL_HEADER; + + retcd = ffmpeg_set_quality(ffmpeg); + if (retcd < 0){ +-- +2.16.2 + diff --git a/media-video/motion/motion-4.1.1-r1.ebuild b/media-video/motion/motion-4.1.1-r1.ebuild new file mode 100644 index 000000000000..f4f49ccb2b55 --- /dev/null +++ b/media-video/motion/motion-4.1.1-r1.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools readme.gentoo-r1 systemd user + +DESCRIPTION="A software motion detector" +HOMEPAGE="https://motion-project.github.io" +SRC_URI="https://github.com/Motion-Project/${PN}/archive/release-${PV}.tar.gz -> ${PN}-release-${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="ffmpeg libav mmal mysql postgres sqlite v4l webp" + +RDEPEND=" + virtual/jpeg:= + ffmpeg? ( + libav? ( media-video/libav:= ) + !libav? ( media-video/ffmpeg:0= ) + ) + mmal? ( media-libs/raspberrypi-userland ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:= ) + sqlite? ( dev-db/sqlite:3 ) + webp? ( media-libs/libwebp:= ) +" +DEPEND="${RDEPEND} + v4l? ( + media-libs/libv4l + virtual/os-headers + ) +" + +PATCHES=( + "${FILESDIR}"/${PV}/Fix-build-errors-with-FFmpeg-4.0.patch +) + +DISABLE_AUTOFORMATTING="yes" +DOC_CONTENTS=" +You need to setup /etc/motion/motion.conf before running motion for the +first time. You can use /etc/motion/motion-dist.conf as a template. +Please note that the 'daemon' and 'process_id_file' settings are +overridden by the bundled OpenRC init script and systemd unit where +appropriate. + +To install motion as a service, use: +rc-update add motion default # with OpenRC +systemctl enable motion.service # with systemd +" + +S="${WORKDIR}"/${PN}-release-${PV} + +pkg_setup() { + enewuser ${PN} -1 -1 -1 video +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(use_with ffmpeg) \ + $(use_with mmal) \ + $(use_with mysql) \ + $(use_with postgres pgsql) \ + $(use_with sqlite sqlite3) \ + $(use_with v4l v4l2) \ + $(use_with webp) \ + --without-optimizecpu +} + +src_install() { + emake \ + DESTDIR="${D}" \ + docdir=/usr/share/doc/${PF} \ + examplesdir=/usr/share/doc/${PF}/examples \ + install + + newinitd "${FILESDIR}"/${PN}.initd-r3 ${PN} + newconfd "${FILESDIR}"/${PN}.confd-r1 ${PN} + + systemd_dounit "${FILESDIR}"/${PN}.service + systemd_dotmpfilesd "${FILESDIR}"/${PN}.conf + + keepdir /var/lib/motion + fowners motion:video /var/lib/motion + fperms 0750 /var/lib/motion + + readme.gentoo_create_doc + readme.gentoo_print_elog +} |