summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChaosEngine <andrzej.pauli@gmail.com>2019-09-17 20:31:51 +0200
committerAmadeusz Piotr Żołnowski <aidecoe@gentoo.org>2019-10-27 12:25:05 +0000
commit09a97c152dbd8ec5ef3e3cf117acf58ba91ccbbe (patch)
tree73136f222fa0283ad0b7d893be866fb24651cc24 /media-video
parentapp-text/pdfjam: EAPI 7 (diff)
downloadgentoo-09a97c152dbd8ec5ef3e3cf117acf58ba91ccbbe.tar.gz
gentoo-09a97c152dbd8ec5ef3e3cf117acf58ba91ccbbe.tar.bz2
gentoo-09a97c152dbd8ec5ef3e3cf117acf58ba91ccbbe.zip
media-video/mjpg-streamer: usinge EAPI=7 and cleaning old ebuilds
Fixes Gentoo bug #694642 (https://bugs.gentoo.org/694642) Signed-off-by: Amadeusz Piotr Żołnowski <aidecoe@gentoo.org>
Diffstat (limited to 'media-video')
-rw-r--r--media-video/mjpg-streamer/Manifest1
-rw-r--r--media-video/mjpg-streamer/files/0_pre20120621-make-var-instead-of-cmd.patch118
-rw-r--r--media-video/mjpg-streamer/files/make-var-instead-of-cmd.patch (renamed from media-video/mjpg-streamer/files/0_pre20120421-make-var-instead-of-cmd.patch)8
-rw-r--r--media-video/mjpg-streamer/files/mjpg-streamer.initd5
-rw-r--r--media-video/mjpg-streamer/files/to-work-with-kernel-3.18.patch (renamed from media-video/mjpg-streamer/files/0_pre20120621-to-work-with-kernel-3.18.patch)44
-rw-r--r--media-video/mjpg-streamer/metadata.xml20
-rw-r--r--media-video/mjpg-streamer/mjpg-streamer-0_pre20120421.ebuild71
-rw-r--r--media-video/mjpg-streamer/mjpg-streamer-0_pre20120621-r2.ebuild (renamed from media-video/mjpg-streamer/mjpg-streamer-0_pre20120621-r1.ebuild)33
-rw-r--r--media-video/mjpg-streamer/mjpg-streamer-0_pre20120621.ebuild73
9 files changed, 58 insertions, 315 deletions
diff --git a/media-video/mjpg-streamer/Manifest b/media-video/mjpg-streamer/Manifest
index 6b067416e363..d7dd01615711 100644
--- a/media-video/mjpg-streamer/Manifest
+++ b/media-video/mjpg-streamer/Manifest
@@ -1,2 +1 @@
-DIST mjpg-streamer-0_pre20120421.tar.bz2 471104 BLAKE2B 56edc0e4aac616a546c52cd4c7ee69e93f8895de6443c1987a10bf186108d77ae6715ea376c3c1f193c25d5e1238fa05bd22ef8d5e1a888c4939b3f2bdfe2520 SHA512 bd9fa11c8a615cf33f84898f6acca6c61ead3614c848d50c22891922e7cb553b422f2f121377040f52d636dd719a2f300d3285cefc34759df8861cc84fdc2e82
DIST mjpg-streamer-0_pre20120621.tar.bz2 471546 BLAKE2B 3ede2a60062bba7c91ddfa0d7151e32cd8dac11a083cc6a88dc350a523174685b2ff066fa99db13b82a6a4960d370b97b27aa3663ac323fa54908bb0108857d0 SHA512 dfc6077ec03fe4f239d8e25b65b7808bd489a954d8cf3aeed444e68fd9536720c2c888a5fa9f4b8d0152dab5ca0bd166a46f2cb22a357ba816eb5bc79ff11332
diff --git a/media-video/mjpg-streamer/files/0_pre20120621-make-var-instead-of-cmd.patch b/media-video/mjpg-streamer/files/0_pre20120621-make-var-instead-of-cmd.patch
deleted file mode 100644
index 98d89c555e04..000000000000
--- a/media-video/mjpg-streamer/files/0_pre20120621-make-var-instead-of-cmd.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-Index: Makefile
-===================================================================
---- Makefile (revision 150)
-+++ Makefile (working copy)
-@@ -63,64 +63,64 @@
- chmod 755 $(APP_BINARY)
-
- output_autofocus.so: mjpg_streamer.h utils.h
-- make -C plugins/output_autofocus all
-+ $(MAKE) -C plugins/output_autofocus all
- cp plugins/output_autofocus/output_autofocus.so .
-
- input_testpicture.so: mjpg_streamer.h utils.h
-- make -C plugins/input_testpicture all
-+ $(MAKE) -C plugins/input_testpicture all
- cp plugins/input_testpicture/input_testpicture.so .
-
-
- ifeq ($(USE_LIBV4L2),true)
- input_uvc.so: mjpg_streamer.h utils.h
-- make -C plugins/input_uvc USE_LIBV4L2=true all
-+ $(MAKE) -C plugins/input_uvc USE_LIBV4L2=true all
- cp plugins/input_uvc/input_uvc.so .
- else
- input_uvc.so: mjpg_streamer.h utils.h
-- make -C plugins/input_uvc all
-+ $(MAKE) -C plugins/input_uvc all
- cp plugins/input_uvc/input_uvc.so .
- endif
-
- input_control.so: mjpg_streamer.h utils.h
-- make -C plugins/input_control all
-+ $(MAKE) -C plugins/input_control all
- cp plugins/input_control/input_control.so .
-
- output_file.so: mjpg_streamer.h utils.h
-- make -C plugins/output_file all
-+ $(MAKE) -C plugins/output_file all
- cp plugins/output_file/output_file.so .
-
- ifeq ($(WXP_COMPAT),true)
- output_http.so: mjpg_streamer.h utils.h
-- make -C plugins/output_http -DWXP_COMPAT all
-+ $(MAKE) -C plugins/output_http -DWXP_COMPAT all
- cp plugins/output_http/output_http.so .
- else
- output_http.so: mjpg_streamer.h utils.h
-- make -C plugins/output_http all
-+ $(MAKE) -C plugins/output_http all
- cp plugins/output_http/output_http.so .
- endif
-
- output_udp.so: mjpg_streamer.h utils.h
-- make -C plugins/output_udp all
-+ $(MAKE) -C plugins/output_udp all
- cp plugins/output_udp/output_udp.so .
-
- input_gspcav1.so: mjpg_streamer.h utils.h
-- make -C plugins/input_gspcav1 all
-+ $(MAKE) -C plugins/input_gspcav1 all
- cp plugins/input_gspcav1/input_gspcav1.so .
-
- input_file.so: mjpg_streamer.h utils.h
-- make -C plugins/input_file all
-+ $(MAKE) -C plugins/input_file all
- cp plugins/input_file/input_file.so .
-
- output_rtsp.so: mjpg_streamer.h utils.h
-- make -C plugins/output_rtsp all
-+ $(MAKE) -C plugins/output_rtsp all
- cp plugins/output_rtsp/output_rtsp.so .
-
- output_ptp2.so: mjpg_streamer.h utils.h
-- make -C plugins/input_ptp2 all
-+ $(MAKE) -C plugins/input_ptp2 all
- cp plugins/input_ptp2/input_ptp2.so .
-
- #input_http.so: mjpg_streamer.h utils.h
--# make -C plugins/input_http all
-+# $(MAKE) -C plugins/input_http all
- # cp plugins/input_http/input_http.so .
-
- # The viewer plugin requires the SDL library for compilation
-@@ -129,22 +129,22 @@
- # execute the following command:
- # make output_viewer.so
- output_viewer.so: mjpg_streamer.h utils.h
-- make -C plugins/output_viewer all
-+ $(MAKE) -C plugins/output_viewer all
- cp plugins/output_viewer/output_viewer.so .
-
- # cleanup
- clean:
-- make -C plugins/input_uvc $@
-- make -C plugins/input_testpicture $@
-- make -C plugins/output_file $@
-- make -C plugins/output_http $@
-- make -C plugins/output_udp $@
-- make -C plugins/output_autofocus $@
-- make -C plugins/input_gspcav1 $@
-- make -C plugins/output_viewer $@
-- make -C plugins/input_control $@
-- make -C plugins/output_rtsp $@
--# make -C plugins/input_http $@
-+ $(MAKE) -C plugins/input_uvc $@
-+ $(MAKE) -C plugins/input_testpicture $@
-+ $(MAKE) -C plugins/output_file $@
-+ $(MAKE) -C plugins/output_http $@
-+ $(MAKE) -C plugins/output_udp $@
-+ $(MAKE) -C plugins/output_autofocus $@
-+ $(MAKE) -C plugins/input_gspcav1 $@
-+ $(MAKE) -C plugins/output_viewer $@
-+ $(MAKE) -C plugins/input_control $@
-+ $(MAKE) -C plugins/output_rtsp $@
-+# $(MAKE) -C plugins/input_http $@
- rm -f *.a *.o $(APP_BINARY) core *~ *.so *.lo
-
- # useful to make a backup "make tgz"
diff --git a/media-video/mjpg-streamer/files/0_pre20120421-make-var-instead-of-cmd.patch b/media-video/mjpg-streamer/files/make-var-instead-of-cmd.patch
index 98d89c555e04..b6f14da2139a 100644
--- a/media-video/mjpg-streamer/files/0_pre20120421-make-var-instead-of-cmd.patch
+++ b/media-video/mjpg-streamer/files/make-var-instead-of-cmd.patch
@@ -1,7 +1,7 @@
-Index: Makefile
-===================================================================
---- Makefile (revision 150)
-+++ Makefile (working copy)
+Index: diff --git a/Makefile b/Makefile
+index c0b2d10..ef264e9 100644
+--- a/Makefile
++++ b/Makefile
@@ -63,64 +63,64 @@
chmod 755 $(APP_BINARY)
diff --git a/media-video/mjpg-streamer/files/mjpg-streamer.initd b/media-video/mjpg-streamer/files/mjpg-streamer.initd
index 53f046e7b1fe..9672a429887e 100644
--- a/media-video/mjpg-streamer/files/mjpg-streamer.initd
+++ b/media-video/mjpg-streamer/files/mjpg-streamer.initd
@@ -7,6 +7,7 @@ MY_NAME=${SVCNAME//-/_}
depend() {
use logger
+ after modules
}
checkconfig() {
@@ -34,8 +35,8 @@ start() {
--user "${MJPG_STREAMER_USER}" \
--group "${MJPG_STREAMER_GROUP}" -w 100 -b -m \
--pidfile "${MJPG_STREAMER_PIDFILE}" \
- -- -i "/usr/lib/input_${INPUT_PLUGIN}.so ${INPUT_PLUGIN_OPTS}" \
- -o "/usr/lib/output_${OUTPUT_PLUGIN}.so ${OUTPUT_PLUGIN_OPTS}"
+ -- -i "/usr/@LIBDIR@/input_${INPUT_PLUGIN}.so ${INPUT_PLUGIN_OPTS}" \
+ -o "/usr/@LIBDIR@/output_${OUTPUT_PLUGIN}.so ${OUTPUT_PLUGIN_OPTS}"
eend $? "Check syslog to see why startup failed."
}
diff --git a/media-video/mjpg-streamer/files/0_pre20120621-to-work-with-kernel-3.18.patch b/media-video/mjpg-streamer/files/to-work-with-kernel-3.18.patch
index 5f16f4ab3f45..a484a27217f4 100644
--- a/media-video/mjpg-streamer/files/0_pre20120621-to-work-with-kernel-3.18.patch
+++ b/media-video/mjpg-streamer/files/to-work-with-kernel-3.18.patch
@@ -1,19 +1,7 @@
-From 03796a1d930212aea460405b86cd41bea8fa5150 Mon Sep 17 00:00:00 2001
-From: Eric Lee <saintgimp@hotmail.com>
-Date: Thu, 26 Feb 2015 19:31:41 -0800
-Subject: [PATCH] Fix mjpg-streamer to work with kernel 3.18
-
-I didn't create this fix, it was originally posted to http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=97983&p=681259. @koosvriezen tried to create a pull request #3 but made kind of a hash of it, so this is the same fix only a proper pull request.
----
- mjpg-streamer/plugins/input_uvc/input_uvc.c | 8 +++++---
- mjpg-streamer/plugins/input_uvc/v4l2uvc.c | 2 ++
- mjpg-streamer/plugins/input_uvc/v4l2uvc.h | 3 +++
- 3 files changed, 10 insertions(+), 3 deletions(-)
-
-diff --git a/mjpg-streamer/plugins/input_uvc/input_uvc.c b/mjpg-streamer/plugins/input_uvc/input_uvc.c
+diff --git a/plugins/input_uvc/input_uvc.c b/plugins/input_uvc/input_uvc.c
index c0b2d10..ef264e9 100644
---- a/mjpg-streamer/plugins/input_uvc/input_uvc.c
-+++ b/mjpg-streamer/plugins/input_uvc/input_uvc.c
+--- a/plugins/input_uvc/input_uvc.c
++++ b/plugins/input_uvc/input_uvc.c
@@ -405,9 +405,13 @@ void *cam_thread(void *arg)
if(pcontext->videoIn->formatIn == V4L2_PIX_FMT_YUYV) {
DBG("compressing frame from input: %d\n", (int)pcontext->id);
@@ -38,10 +26,10 @@ index c0b2d10..ef264e9 100644
/* signal fresh_frame */
pthread_cond_broadcast(&pglobal->in[pcontext->id].db_update);
-diff --git a/mjpg-streamer/plugins/input_uvc/v4l2uvc.c b/mjpg-streamer/plugins/input_uvc/v4l2uvc.c
+diff --git a/plugins/input_uvc/v4l2uvc.c b/plugins/input_uvc/v4l2uvc.c
index 48fd189..329233b 100644
---- a/mjpg-streamer/plugins/input_uvc/v4l2uvc.c
-+++ b/mjpg-streamer/plugins/input_uvc/v4l2uvc.c
+--- a/plugins/input_uvc/v4l2uvc.c
++++ b/plugins/input_uvc/v4l2uvc.c
@@ -450,6 +450,8 @@ int uvcGrab(struct vdIn *vd)
*/
@@ -51,10 +39,10 @@ index 48fd189..329233b 100644
if(debug)
fprintf(stderr, "bytes in used %d \n", vd->buf.bytesused);
-diff --git a/mjpg-streamer/plugins/input_uvc/v4l2uvc.h b/mjpg-streamer/plugins/input_uvc/v4l2uvc.h
+diff --git a/plugins/input_uvc/v4l2uvc.h b/plugins/input_uvc/v4l2uvc.h
index d5296fc..0e3f99f 100644
---- a/mjpg-streamer/plugins/input_uvc/v4l2uvc.h
-+++ b/mjpg-streamer/plugins/input_uvc/v4l2uvc.h
+--- a/plugins/input_uvc/v4l2uvc.h
++++ b/plugins/input_uvc/v4l2uvc.h
@@ -28,6 +28,7 @@
@@ -72,3 +60,17 @@ index d5296fc..0e3f99f 100644
};
/* context of each camera thread */
+
+diff --git a/utils.c b/utils.c
+index b494ca3..2792abe 100644
+--- ai/utils.c
++++ b/utils.c
+@@ -29,7 +29,7 @@
+ #include <wait.h>
+ #include <time.h>
+ #include <limits.h>
+-#include <linux/stat.h>
++//#include <linux/stat.h>
+ #include <sys/stat.h>
+
+ #include "utils.h"
diff --git a/media-video/mjpg-streamer/metadata.xml b/media-video/mjpg-streamer/metadata.xml
index 492364ee19f4..27a772223ceb 100644
--- a/media-video/mjpg-streamer/metadata.xml
+++ b/media-video/mjpg-streamer/metadata.xml
@@ -20,26 +20,24 @@
streaming application with Pan/Tilt
</longdescription>
<use>
- <flag name="input_testpicture">Plugin for sending compiled in, test
+ <flag name="input-testpicture">Plugin for sending compiled in, test
pictures</flag>
- <flag name="input_control">Plugin giving ability to control camera
+ <flag name="input-control">Plugin giving ability to control camera
movement (only specific cameras)</flag>
- <flag name="input_file">Plugin that watches given directory and send
+ <flag name="input-file">Plugin that watches given directory and send
it's content</flag>
- <flag name="input_uvc">Plugin that sends video stream from UVC
+ <flag name="input-uvc">Plugin that sends video stream from UVC
compatible camera</flag>
- <flag name="output_file">Plugin that saves received content under given
+ <flag name="output-file">Plugin that saves received content under given
location</flag>
- <flag name="output_udp">Plugin receiving content over UDP and storing to
+ <flag name="output-udp">Plugin receiving content over UDP and storing to
a directory</flag>
- <flag name="output_http">Small HTTP server plugin which sends WWW
+ <flag name="output-http">Small HTTP server plugin which sends WWW
directory content and streams image content</flag>
- <flag name="output_autofocus">Auto focusing plugin</flag>
- <flag name="output_rtsp">Plugin which provides a mechanism to take
+ <flag name="output-autofocus">Auto focusing plugin</flag>
+ <flag name="output-rtsp">Plugin which provides a mechanism to take
snapshots with a trigger from a UDP packet</flag>
<flag name="www">Installs WWW content</flag>
- <flag name="v4l">Uses <pkg>media-libs/libv4l</pkg> function mapping for
- input_uvc plugin</flag>
</use>
<upstream>
<remote-id type="sourceforge">mjpg-streamer</remote-id>
diff --git a/media-video/mjpg-streamer/mjpg-streamer-0_pre20120421.ebuild b/media-video/mjpg-streamer/mjpg-streamer-0_pre20120421.ebuild
deleted file mode 100644
index 12a604613e80..000000000000
--- a/media-video/mjpg-streamer/mjpg-streamer-0_pre20120421.ebuild
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-
-inherit eutils
-
-DESCRIPTION="MJPG-streamer takes JPGs from Linux-UVC compatible webcams"
-HOMEPAGE="https://sourceforge.net/projects/mjpg-streamer"
-SRC_URI="https://dev.gentoo.org/~aidecoe/distfiles/${CATEGORY}/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-INPUT_PLUGINS="input_testpicture input_control input_file input_uvc"
-OUTPUT_PLUGINS="output_file output_udp output_http output_autofocus output_rtsp"
-IUSE_PLUGINS="${INPUT_PLUGINS} ${OUTPUT_PLUGINS} +input_file +output_http"
-IUSE="${IUSE_PLUGINS} www v4l"
-REQUIRED_USE="|| ( ${INPUT_PLUGINS} )
- || ( ${OUTPUT_PLUGINS} )
- v4l? ( input_uvc )"
-
-RDEPEND="virtual/jpeg
- v4l? ( input_uvc? ( media-libs/libv4l ) )"
-DEPEND="${RDEPEND}
- input_testpicture? ( media-gfx/imagemagick )"
-
-src_prepare() {
- epatch "${FILESDIR}/${PV}-make-var-instead-of-cmd.patch"
-
- local flag switch
-
- for flag in ${IUSE_PLUGINS}; do
- use ${flag} && switch='' || switch='#'
- sed -i \
- -e "s|^#*PLUGINS +\?= ${flag}.so|${switch}PLUGINS += ${flag}.so|" \
- Makefile
- done
-}
-
-src_compile() {
- local v4l=$(use v4l && use input_uvc && echo 'USE_LIBV4L2=true')
- emake ${v4l}
-}
-
-src_install() {
- into /usr
- dobin ${PN//-/_}
- dolib.so *.so
-
- if use www ; then
- insinto /usr/share/${PN}
- doins -r www
- fi
-
- dodoc README TODO
-
- newinitd "${FILESDIR}"/${PN}.initd ${PN}
- newconfd "${FILESDIR}"/${PN}.confd ${PN}
-}
-
-pkg_postinst() {
- elog "Remember to set an input and output plugin for mjpg-streamer."
-
- if use www ; then
- echo
- elog "An example webinterface has been installed into"
- elog "/usr/share/mjpg-streamer/www for your usage."
- fi
-}
diff --git a/media-video/mjpg-streamer/mjpg-streamer-0_pre20120621-r1.ebuild b/media-video/mjpg-streamer/mjpg-streamer-0_pre20120621-r2.ebuild
index e13ff04b0c33..0e44b70eb0ab 100644
--- a/media-video/mjpg-streamer/mjpg-streamer-0_pre20120621-r1.ebuild
+++ b/media-video/mjpg-streamer/mjpg-streamer-0_pre20120621-r2.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=7
inherit eutils
@@ -13,29 +13,34 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-INPUT_PLUGINS="input_testpicture input_control input_file input_uvc"
-OUTPUT_PLUGINS="output_file output_udp output_http output_autofocus output_rtsp"
+INPUT_PLUGINS="input-testpicture input-control input-file input-uvc"
+OUTPUT_PLUGINS="output-file output-udp output-http output-autofocus output-rtsp"
IUSE_PLUGINS="${INPUT_PLUGINS} ${OUTPUT_PLUGINS}"
-IUSE="input_testpicture input_control +input_file input_uvc output_file
- output_udp +output_http output_autofocus output_rtsp
- www v4l"
+IUSE="input-testpicture input-control +input-file input-uvc output-file
+ output-udp +output-http output-autofocus output-rtsp
+ www"
REQUIRED_USE="|| ( ${INPUT_PLUGINS} )
- || ( ${OUTPUT_PLUGINS} )
- v4l? ( input_uvc )"
+ || ( ${OUTPUT_PLUGINS} )"
RDEPEND="virtual/jpeg
- v4l? ( input_uvc? ( media-libs/libv4l ) )"
+ input-uvc? ( media-libs/libv4l )"
DEPEND="${RDEPEND}
- input_testpicture? ( media-gfx/imagemagick )"
+ input-testpicture? ( media-gfx/imagemagick )"
+
+PATCHES=(
+ "${FILESDIR}/make-var-instead-of-cmd.patch"
+ "${FILESDIR}/to-work-with-kernel-3.18.patch"
+)
src_prepare() {
- epatch "${FILESDIR}/${PV}-make-var-instead-of-cmd.patch"
- epatch "${FILESDIR}/${PV}-to-work-with-kernel-3.18.patch"
+ default
local flag switch
for flag in ${IUSE_PLUGINS}; do
use ${flag} && switch='' || switch='#'
+ flag=${flag/input-/input_}
+ flag=${flag/output-/output_}
sed -i \
-e "s|^#*PLUGINS +\?= ${flag}.so|${switch}PLUGINS += ${flag}.so|" \
Makefile
@@ -43,7 +48,7 @@ src_prepare() {
}
src_compile() {
- local v4l=$(use v4l && use input_uvc && echo 'USE_LIBV4L2=true')
+ local v4l=$(use input-uvc && echo 'USE_LIBV4L2=true')
emake ${v4l}
}
@@ -59,7 +64,7 @@ src_install() {
dodoc README TODO
- newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ sed -e "s|@LIBDIR@|$(get_libdir)|g" "${FILESDIR}/${PN}.initd" | newinitd - ${PN}
newconfd "${FILESDIR}"/${PN}.confd ${PN}
}
diff --git a/media-video/mjpg-streamer/mjpg-streamer-0_pre20120621.ebuild b/media-video/mjpg-streamer/mjpg-streamer-0_pre20120621.ebuild
deleted file mode 100644
index ca8898e4a9ee..000000000000
--- a/media-video/mjpg-streamer/mjpg-streamer-0_pre20120621.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-
-inherit eutils
-
-DESCRIPTION="MJPG-streamer takes JPGs from Linux-UVC compatible webcams"
-HOMEPAGE="https://sourceforge.net/projects/mjpg-streamer"
-SRC_URI="https://dev.gentoo.org/~aidecoe/distfiles/${CATEGORY}/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-INPUT_PLUGINS="input_testpicture input_control input_file input_uvc"
-OUTPUT_PLUGINS="output_file output_udp output_http output_autofocus output_rtsp"
-IUSE_PLUGINS="${INPUT_PLUGINS} ${OUTPUT_PLUGINS}"
-IUSE="input_testpicture input_control +input_file input_uvc output_file
- output_udp +output_http output_autofocus output_rtsp
- www v4l"
-REQUIRED_USE="|| ( ${INPUT_PLUGINS} )
- || ( ${OUTPUT_PLUGINS} )
- v4l? ( input_uvc )"
-
-RDEPEND="virtual/jpeg
- v4l? ( input_uvc? ( media-libs/libv4l ) )"
-DEPEND="${RDEPEND}
- input_testpicture? ( media-gfx/imagemagick )"
-
-src_prepare() {
- epatch "${FILESDIR}/${PV}-make-var-instead-of-cmd.patch"
-
- local flag switch
-
- for flag in ${IUSE_PLUGINS}; do
- use ${flag} && switch='' || switch='#'
- sed -i \
- -e "s|^#*PLUGINS +\?= ${flag}.so|${switch}PLUGINS += ${flag}.so|" \
- Makefile
- done
-}
-
-src_compile() {
- local v4l=$(use v4l && use input_uvc && echo 'USE_LIBV4L2=true')
- emake ${v4l}
-}
-
-src_install() {
- into /usr
- dobin ${PN//-/_}
- dolib.so *.so
-
- if use www ; then
- insinto /usr/share/${PN}
- doins -r www
- fi
-
- dodoc README TODO
-
- newinitd "${FILESDIR}"/${PN}.initd ${PN}
- newconfd "${FILESDIR}"/${PN}.confd ${PN}
-}
-
-pkg_postinst() {
- elog "Remember to set an input and output plugin for mjpg-streamer."
-
- if use www ; then
- echo
- elog "An example webinterface has been installed into"
- elog "/usr/share/mjpg-streamer/www for your usage."
- fi
-}