commit:     0af367a2ee1ccbcb4efa2c2299c3245501eb4e5a
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Wed Apr 22 08:38:14 2020 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Wed Apr 22 08:38:14 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0af367a2

media-tv/droidcam: Use your android phone as webcam

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

 media-tv/droidcam/Manifest                         |  1 +
 media-tv/droidcam/droidcam-0_pre20200416.ebuild    | 68 ++++++++++++++++++++++
 .../files/droidcam-0-libjpeg-location.patch        | 13 +++++
 media-tv/droidcam/metadata.xml                     |  8 +++
 4 files changed, 90 insertions(+)

diff --git a/media-tv/droidcam/Manifest b/media-tv/droidcam/Manifest
new file mode 100644
index 0000000..c507a46
--- /dev/null
+++ b/media-tv/droidcam/Manifest
@@ -0,0 +1 @@
+DIST droidcam-0_pre20200416.tar.gz 47695 BLAKE2B 
98970a8b0d530a414017757fe09457ded56993511af067ea10d6588191807117db94aaa704bad301339d05a59b61ab23f92d48a551df7d398c39a8c4cd1e2bfb
 SHA512 
22357880edbcee4ef1d247dffc0fcc95c7c121befd43d53594cdabe9770fa167bffb887c719a2fb924b81e6beceecb66a25c6ed31eac930af6000802efb83c00

diff --git a/media-tv/droidcam/droidcam-0_pre20200416.ebuild 
b/media-tv/droidcam/droidcam-0_pre20200416.ebuild
new file mode 100644
index 0000000..1afe5a6
--- /dev/null
+++ b/media-tv/droidcam/droidcam-0_pre20200416.ebuild
@@ -0,0 +1,68 @@
+# Copyright 2019-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+COMMIT="fee087c7f699cb38fba7934c77c588d246355372"
+
+inherit desktop linux-mod xdg
+
+DESCRIPTION="Use android phone as webcam, using a v4l device driver and app"
+HOMEPAGE="https://www.dev47apps.com/droidcam/linuxx/
+       https://github.com/aramg/droidcam";
+SRC_URI="https://github.com/aramg/${PN}/archive/${COMMIT}.tar.gz -> 
${P}.tar.gz"
+
+KEYWORDS="~amd64"
+LICENSE="droidcam"
+SLOT="0"
+
+# Requires connection to android phone
+RESTRICT="test"
+
+BDEPEND="media-libs/libjpeg-turbo[static-libs]"
+
+RDEPEND="x11-libs/gtk+:2"
+
+S="${WORKDIR}/${PN}-${COMMIT}/linux"
+
+PATCHES="${FILESDIR}/${PN}-0-libjpeg-location.patch"
+
+CONFIG_CHECK="VIDEO_DEV"
+MODULE_NAMES="v4l2loopback-dc(video:${S}/v4l2loopback:${S}/v4l2loopback)"
+BUILD_TARGETS="all"
+
+src_configure() {
+       set_arch_to_kernel
+       default
+}
+
+src_compile() {
+       default
+       linux-mod_src_compile
+}
+
+src_test() {
+       pushd "v4l2loopback"
+       default
+       ./test || die
+       popd
+}
+
+src_install() {
+       linux-mod_src_install
+       dobin "${PN}"
+       dobin "${PN}-cli"
+
+       newicon -s 32x32 icon.png ${PN}.png
+       newicon -s 64x64 icon2.png ${PN}.png
+       make_desktop_entry ${PN} "Droidcam" ${PN} 'AudioVideo;Video'
+}
+
+pkg_postinst() {
+       linux-mod_pkg_postinst
+       xdg_pkg_postinst
+
+       elog "To use this, you'll need to download the android app as well:"
+       elog "Free version: 
https://play.google.com/store/apps/details?id=com.dev47apps.droidcam";
+       elog "Paid version: 
https://play.google.com/store/apps/details?id=com.dev47apps.droidcamx";
+}

diff --git a/media-tv/droidcam/files/droidcam-0-libjpeg-location.patch 
b/media-tv/droidcam/files/droidcam-0-libjpeg-location.patch
new file mode 100644
index 0000000..2b1f9cd
--- /dev/null
+++ b/media-tv/droidcam/files/droidcam-0-libjpeg-location.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index 134f723..44e2c2f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -9,7 +9,7 @@
+ CC    = -no-pie
+ GTK   = `pkg-config --libs --cflags gtk+-2.0`
+ LIBS  = `pkg-config --libs libswscale libavutil`
+-JPEG  = -I/opt/libjpeg-turbo/include /opt/libjpeg-turbo/lib`getconf 
LONG_BIT`/libturbojpeg.a
++JPEG  = -I/usr/include /usr/lib`getconf LONG_BIT`/libturbojpeg.a
+ SRC      = src/connection.c src/decoder.c
+ NO_WARN  = -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
+ 

diff --git a/media-tv/droidcam/metadata.xml b/media-tv/droidcam/metadata.xml
new file mode 100644
index 0000000..1210e7e
--- /dev/null
+++ b/media-tv/droidcam/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>andrewammerl...@riseup.net</email>
+               <name>Andrew Ammerlaan</name>
+       </maintainer>
+</pkgmetadata>

Reply via email to