diff --git a/licenses/droidcam b/licenses/droidcam new file mode 100644 index 0000000000..fd9976ace6 --- /dev/null +++ b/licenses/droidcam @@ -0,0 +1,8 @@ +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +USE AT YOUR OWN RISK. + +You may redistribute and/or modify any part of this program, +provided this notice and all disclaimers remain intact and preserved, +crediting the original author(s). diff --git a/media-tv/droidcam/Manifest b/media-tv/droidcam/Manifest new file mode 100644 index 0000000000..c507a46657 --- /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 0000000000..1afe5a6e2c --- /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 0000000000..2b1f9cdad4 --- /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 0000000000..1210e7ebc4 --- /dev/null +++ b/media-tv/droidcam/metadata.xml @@ -0,0 +1,8 @@ + + + + + andrewammerlaan@riseup.net + Andrew Ammerlaan + + diff --git a/profiles/license_groups b/profiles/license_groups index 40dae198f0..fb2b520aab 100644 --- a/profiles/license_groups +++ b/profiles/license_groups @@ -1,6 +1,6 @@ FSF-APPROVED EUPL-1.2 OSI-APPROVED EUPL-1.2 -MISC-FREE noweb i3lock-color +MISC-FREE noweb i3lock-color droidcam FREE-SOFTWARE @FSF-APPROVED @OSI-APPROVED @MISC-FREE FREE @FREE-SOFTWARE DFSG @FREE lablgtk-examples meschach VOSTROM