summaryrefslogtreecommitdiff
path: root/media-video/droidcam
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /media-video/droidcam
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'media-video/droidcam')
-rw-r--r--media-video/droidcam/Manifest2
-rw-r--r--media-video/droidcam/droidcam-1.8.2.ebuild155
2 files changed, 157 insertions, 0 deletions
diff --git a/media-video/droidcam/Manifest b/media-video/droidcam/Manifest
index 31114bbc1550..404f842e0d04 100644
--- a/media-video/droidcam/Manifest
+++ b/media-video/droidcam/Manifest
@@ -1,4 +1,6 @@
AUX droidcam-makefile-fixes.patch 2178 BLAKE2B 223344a2138b0a93f7eaffda4814236acf19a7cf6d4ee6daa03be3b7c601b549ce77219d03f53dbb1ac11493ff991c08f8d035fb91dbed22b590c07628318640 SHA512 73082410683b81794589816a3158ea66ce1c6717f65454f4528e1b00298c88131fec3f460915cfb603ccb85be1b54134869444924bf63c69cee89f03a275b556
DIST droidcam-1.8.1.tar.gz 84566 BLAKE2B ba023c98159003bef39eac2fcff211243aa5fb2cc4369a333c5b78c9708b8c34ff9987d6b84628b32e436bab776e0c8c83f75b7c6a788f85831d3d17dd468833 SHA512 58ce6014004edcbf89b4847ed916f9cd2757865172c61e446a04b2f6d93395db1013f0cb31f0b10161bfd83a1436e684891c3457371a3ad62308509bb85b4cf4
+DIST droidcam-1.8.2.tar.gz 84797 BLAKE2B b2458dd04b467106a6d9a8a9f3d44058641a7c8ca429d5c92f498401c07f6bc364dc056755f21b40faac7e7aec1877250afb119ac3b7f979b24cdeb86f45c384 SHA512 507f513c8d0dffa86afe5368ccab5461931e236b6352269a6eb5e970a79e5f9b386808da3466f3b391e955170b47b24a82663632ddc3c3c84e4de5988b7d3f8f
EBUILD droidcam-1.8.1-r2.ebuild 3465 BLAKE2B 3c93576916f8f61d7b0c6814727b537fa6189bf7aa7fb163cfa1dc7502b6eeea48b8534ebb96a064cf4ccf8e8d9ca0509e03ef1797dce51873c444d2f665b962 SHA512 7959d315ada90ad6d277cd62e66a69e10efbc7623afe8f32436079c0370aa1691167f33f2c533575c8dccc8a36ddb5bf68443f985547f79b868e277ebcf79def
+EBUILD droidcam-1.8.2.ebuild 3465 BLAKE2B 0d89d49d2e90f56e75d9cb4aa55900bc2fdf57b6db9f3b54e03c86888bd2f0b2ca1b1ce270f6454f053afa65bd3e0cda9263d1cd97fe3ce9e2896f9672f18710 SHA512 864c77b17edca69e4a82a6e518cf783d021020937bc76c3b1fee7805b4b84d9c3ac73668f926546abd298f402712279f4de8375459880dd56dd4e3d529f58dff
MISC metadata.xml 1421 BLAKE2B 6d46f5cbd0a226d749b35d8e90a965d4f12fa609b6e95ea6effe87730bce525c0fadb14aa3eb8b99d60f91c7c46a542df5073a55f018f9c06877758360b91e60 SHA512 9dfe075ab79599ecfa3cb9cbf607e4e9a14dd6d002fb3f84bd2d809d962a8bf52b7a0a7166b6805ce4816a57c08e57ab4b224ae1de4e44130bb52f1674ea1e02
diff --git a/media-video/droidcam/droidcam-1.8.2.ebuild b/media-video/droidcam/droidcam-1.8.2.ebuild
new file mode 100644
index 000000000000..5f559ce94e00
--- /dev/null
+++ b/media-video/droidcam/droidcam-1.8.2.ebuild
@@ -0,0 +1,155 @@
+# Copyright 2019-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop linux-mod xdg
+
+DESCRIPTION="Use your phone or tablet as webcam with a v4l device driver and app"
+HOMEPAGE="https://www.dev47apps.com/droidcam/linux/"
+SRC_URI="https://github.com/dev47apps/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+KEYWORDS="~amd64"
+LICENSE="GPL-2"
+SLOT="0"
+
+IUSE="gtk"
+
+# Requires connection to phone/tablet
+RESTRICT="test"
+
+DEPEND="
+ app-pda/libplist
+ app-pda/libusbmuxd
+ dev-libs/glib
+ dev-libs/libappindicator:3
+ dev-libs/libxml2
+ dev-util/android-tools
+ media-libs/alsa-lib
+ media-libs/libjpeg-turbo
+ >=media-libs/speex-1.2.0-r1
+ media-video/ffmpeg
+ gtk? (
+ x11-libs/gdk-pixbuf
+ x11-libs/gtk+:3
+ x11-libs/libX11
+ x11-libs/pango
+ )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+BUILD_TARGETS="all"
+MODULE_NAMES="v4l2loopback-dc(video:${S}/v4l2loopback:${S}/v4l2loopback)"
+MODULESD_V4L2LOOPBACK_DC_ENABLED="yes"
+
+CONFIG_CHECK="~SND_ALOOP VIDEO_DEV VIDEO_V4L2 MEDIA_SUPPORT MEDIA_CAMERA_SUPPORT"
+ERROR_SND_ALOOP="CONFIG_SND_ALOOP is optionally required for audio support"
+
+PATCHES="${FILESDIR}/${PN}-makefile-fixes.patch"
+
+src_prepare() {
+ if ! use gtk; then
+ default
+ sed -i -e '/cflags gtk+/d' Makefile || die
+ else
+ xdg_src_prepare
+ # remove path and extension from Icon and Exec entry
+ sed -i -e 's/Icon=\/opt\/droidcam-icon.png/Icon=droidcam/g' \
+ -e 's/\/usr\/local\/bin\/droidcam/droidcam/g' \
+ droidcam.desktop || die
+ sed -i -e 's%/opt/droidcam-icon.png%/usr/share/icons/hicolor/96x96/apps/droidcam.png%g' src/droidcam.c || die
+ fi
+}
+
+src_configure() {
+ set_arch_to_kernel
+ default
+}
+
+src_compile() {
+ if use gtk; then
+ emake droidcam
+ fi
+ emake droidcam-cli
+
+ if linux_chkconfig_present CC_IS_CLANG; then
+ BUILD_PARAMS+=' CC=${CHOST}-clang'
+ if linux_chkconfig_present LD_IS_LLD; then
+ BUILD_PARAMS+=' LD=ld.lld'
+ if linux_chkconfig_present LTO_CLANG_THIN; then
+ # kernel enables cache by default leading to sandbox violations
+ BUILD_PARAMS+=' ldflags-y=--thinlto-cache-dir= LDFLAGS_MODULE=--thinlto-cache-dir='
+ fi
+ fi
+ fi
+ export KERNEL_DIR || die
+ linux-mod_src_compile
+}
+
+src_test() {
+ pushd "v4l2loopback" || die
+ default
+ ./test || die
+ popd || die
+}
+
+src_install() {
+ if use gtk; then
+ dobin droidcam
+ newicon -s 32 icon.png droidcam.png
+ newicon -s 96 icon2.png droidcam.png
+ domenu droidcam.desktop
+ fi
+ dobin droidcam-cli
+
+ # The cli and gui do not auto load the module if unloaded (why not though?)
+ # so we just put it in modules-load.d to make sure it always works
+ insinto /etc/modules-load.d
+ if linux_config_exists; then
+ if linux_chkconfig_module SND_ALOOP; then
+ newins - "${PN}.conf" <<-EOF
+ v4l2loopback-dc
+ snd_aloop
+ EOF
+ else
+ newins - "${PN}.conf" <<-EOF
+ v4l2loopback-dc
+ EOF
+ fi
+ fi
+
+ einstalldocs
+ linux-mod_src_install
+}
+
+pkg_preinst() {
+ linux-mod_pkg_preinst
+ if use gtk; then
+ xdg_pkg_preinst
+ fi
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+ if use gtk; then
+ xdg_pkg_postinst
+ else
+ elog
+ elog "Only droidcam-cli has been installed since 'gtk' flag was not set"
+ elog
+ fi
+
+ elog "The default resolution for v4l2loopback-dc (i.e. droidcam) is 640x480."
+ elog "You can change this value in /etc/modprobe.d/v4l2loopback-dc.conf"
+ elog
+ elog "Links to the Android/iPhone/iPad apps can be found at"
+ elog "https://www.dev47apps.com/"
+}
+
+pkg_postrm() {
+ linux-mod_pkg_postrm
+ if use gtk; then
+ xdg_pkg_postrm
+ fi
+}